/* ============================================================
   词语成语词典网 · 前台样式（水墨意境）
   设计依据：docs/DESIGN.md
   宣纸白 #F8F5F0 / 焦墨 #1A1A1A / 浓墨 #333 / 淡墨 #666
   朱红印章 #C41E3A / 青绿 #2E8B57 / 金 #D4AF37
   ============================================================ */

/* ---------- 字体 ---------- */
@font-face {
  font-family: 'AlimamaDongFangDaKai';
  src: url('https://resource-static.bj.bcebos.com/fonts-skill/AlimamaDongFangDaKai-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Source Han Serif CN';
  src: url('https://resource-static.bj.bcebos.com/fonts-skill/SourceHanSerifCN-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* ---------- 基础 ---------- */
:root {
  --paper: #F8F5F0;
  --paper-2: #FFFFF0;
  --ink: #1A1A1A;
  --ink-2: #333333;
  --ink-3: #666666;
  --ink-4: #999999;
  --seal: #C41E3A;
  --green: #2E8B57;
  --gold: #D4AF37;
  --line: rgba(26, 26, 26, 0.14);
  --font-kai: 'AlimamaDongFangDaKai', 'STKaiti', 'KaiTi', 'Kaiti SC', serif;
  --font-song: 'Source Han Serif CN', 'Songti SC', 'SimSun', serif;
  --shadow-card: 0 10px 30px -14px rgba(26, 26, 26, 0.18);
  --shadow-hover: 0 16px 40px -16px rgba(26, 26, 26, 0.26);
}

/* ============================================================
   每日主题·七曜自动换色系统（同步 gushi 每日自动换主题体验）
   theme-sun(日·海棠粉) / theme-mon(月·黛蓝) / theme-tue(火·绛紫) / 
   theme-wed(水·青绿) / theme-thu(木·茶褐) / theme-fri(金·金黄) / theme-sat(土·米黄)
   ============================================================ */
[data-theme="theme-sun"] body,
body[data-theme="theme-sun"] {
  --paper: #FDF5F7;
  --paper-2: #FFF8FA;
  --ink: #2E1F27;
  --ink-2: #422D37;
  --ink-3: #7D5B68;
  --ink-4: #A68894;
  --seal: #E05A7B;
  --line: rgba(224, 90, 123, 0.22);
  background: radial-gradient(120% 90% at 50% 0%, #FFF8FA 0%, #FDF5F7 45%, #FAECF0 100%) fixed !important;
}
[data-theme="theme-mon"] body,
body[data-theme="theme-mon"] {
  --paper: #F5F7FA;
  --paper-2: #FAFBFD;
  --ink: #1B263B;
  --ink-2: #2E4057;
  --ink-3: #5A6B85;
  --ink-4: #8B9AB5;
  --seal: #2E4057;
  --line: rgba(27, 38, 59, 0.2);
  background: radial-gradient(120% 90% at 50% 0%, #FAFBFD 0%, #F5F7FA 45%, #EAEFF5 100%) fixed !important;
}
[data-theme="theme-tue"] body,
body[data-theme="theme-tue"] {
  --paper: #FAF4F0;
  --paper-2: #FDF8F5;
  --ink: #3B1F24;
  --ink-2: #4E2A31;
  --ink-3: #7D5B61;
  --ink-4: #A6858C;
  --seal: #8B4A57;
  --line: rgba(78, 42, 49, 0.2);
  background: radial-gradient(120% 90% at 50% 0%, #FDF8F5 0%, #FAF4F0 45%, #F0E6E1 100%) fixed !important;
}
[data-theme="theme-wed"] body,
body[data-theme="theme-wed"] {
  --paper: #F2F8F6;
  --paper-2: #F8FCFA;
  --ink: #1F2E2A;
  --ink-2: #2E4440;
  --ink-3: #5B7A72;
  --ink-4: #8BA69D;
  --seal: #2E8B6A;
  --line: rgba(46, 139, 106, 0.22);
  background: radial-gradient(120% 90% at 50% 0%, #F8FCFA 0%, #F2F8F6 45%, #E0EEE9 100%) fixed !important;
}
[data-theme="theme-thu"] body,
body[data-theme="theme-thu"] {
  --paper: #F6F8F3;
  --paper-2: #FBFCF8;
  --ink: #2A2E24;
  --ink-2: #3B4032;
  --ink-3: #6B7560;
  --ink-4: #98A18D;
  --seal: #6B7C4F;
  --line: rgba(107, 124, 79, 0.22);
  background: radial-gradient(120% 90% at 50% 0%, #FBFCF8 0%, #F6F8F3 45%, #E8EBE0 100%) fixed !important;
}
[data-theme="theme-fri"] body,
body[data-theme="theme-fri"] {
  --paper: #FDFBF7;
  --paper-2: #FFFAF0;
  --ink: #3A2E1F;
  --ink-2: #4A3D2C;
  --ink-3: #7D6E57;
  --ink-4: #A6967E;
  --seal: #C49A3A;
  --line: rgba(196, 154, 58, 0.25);
  background: radial-gradient(120% 90% at 50% 0%, #FFFAF0 0%, #FDFBF7 45%, #F8F1E0 100%) fixed !important;
}
[data-theme="theme-sat"] body,
body[data-theme="theme-sat"] {
  --paper: #FAF6EE;
  --paper-2: #FFFCF5;
  --ink: #3B2F24;
  --ink-2: #4A3D2F;
  --ink-3: #7D6E5E;
  --ink-4: #A69885;
  --seal: #A67B4F;
  --line: rgba(166, 123, 79, 0.25);
  background: radial-gradient(120% 90% at 50% 0%, #FFFCF5 0%, #FAF6EE 45%, #F0E8D8 100%) fixed !important;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-song);
  color: var(--ink-2);
  background: radial-gradient(120% 90% at 50% 0%, var(--paper-2) 0%, var(--paper) 45%, var(--paper-deep) 100%) fixed;
  line-height: 1.75;
  font-size: 16px;
}
/* 宣纸噪点 */
body.paper-texture::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
.site { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--seal); }
img, svg { vertical-align: middle; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
::selection { background: rgba(196, 30, 58, 0.16); }
:focus-visible { outline: 2px solid rgba(196, 30, 58, 0.5); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-kai); color: var(--ink); font-weight: 400; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 26px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 8px;
  background: var(--seal); color: #F8F5F0;
  font-family: var(--font-kai); font-size: 24px;
  box-shadow: inset 0 0 0 2px rgba(248, 245, 240, 0.35), 0 4px 10px -4px rgba(196, 30, 58, 0.5);
}
.brand-seal.sm { width: 30px; height: 30px; font-size: 17px; border-radius: 6px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.3; }
.brand-txt strong { font-family: var(--font-kai); font-size: 21px; color: var(--ink); font-weight: 400; letter-spacing: 2px; }
.brand-txt em { font-style: normal; font-size: 11px; color: var(--ink-4); letter-spacing: 1px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--ink-3);
  transition: color 0.25s, background 0.25s;
}
.main-nav a:hover { color: var(--ink); background: rgba(26, 26, 26, 0.06); }
.hd-search { margin-left: auto; display: flex; }
.hd-search input {
  width: 210px; height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-right: none;
  border-radius: 19px 0 0 19px;
  background: rgba(255, 255, 240, 0.8);
  font-family: var(--font-song); font-size: 14px; color: var(--ink);
}
.hd-search input::placeholder { color: var(--ink-4); }
.hd-search button {
  height: 38px; padding: 0 18px; border: none; cursor: pointer;
  border-radius: 0 19px 19px 0;
  background: var(--ink-2); color: #F8F5F0;
  font-family: var(--font-kai); font-size: 14px; letter-spacing: 2px;
  transition: background 0.25s;
}
.hd-search button:hover { background: var(--ink); }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  text-align: center;
  overflow: hidden;
}
.hero-vtext {
  position: absolute; right: 4%; top: 30px;
  writing-mode: vertical-rl;
  font-family: var(--font-kai); font-size: 88px; line-height: 1;
  color: rgba(26, 26, 26, 0.055);
  user-select: none; pointer-events: none;
}
.hero-title {
  font-size: 42px; letter-spacing: 6px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  animation: rise 0.6s ease-out both;
}
.hero-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 10px;
  background: var(--seal); color: #F8F5F0; font-size: 30px;
  box-shadow: inset 0 0 0 2px rgba(248, 245, 240, 0.35), 0 6px 14px -6px rgba(196, 30, 58, 0.55);
  transform: rotate(-4deg);
}
.hero-sub { margin-top: 14px; color: var(--ink-3); letter-spacing: 4px; font-size: 15px; animation: rise 0.6s 0.1s ease-out both; }
.hero-search { margin: 30px auto 0; display: flex; max-width: 560px; animation: rise 0.6s 0.2s ease-out both; }
.hero-search input {
  flex: 1; height: 50px; padding: 0 20px;
  border: 1px solid var(--line); border-right: none;
  border-radius: 25px 0 0 25px;
  background: rgba(255, 255, 240, 0.9);
  font-family: var(--font-song); font-size: 16px; color: var(--ink);
  box-shadow: var(--shadow-card);
}
.hero-search input::placeholder { color: var(--ink-4); }
.hero-search button {
  width: 108px; height: 50px; border: none; cursor: pointer;
  border-radius: 0 25px 25px 0;
  background: var(--seal); color: #F8F5F0;
  font-family: var(--font-kai); font-size: 17px; letter-spacing: 4px;
  box-shadow: var(--shadow-card);
  transition: background 0.25s;
}
.hero-search button:hover { background: #A7162E; }
.hero-stat { margin-top: 18px; font-size: 14px; color: var(--ink-4); letter-spacing: 1px; }
.hero-stat strong { color: var(--seal); font-weight: 400; font-family: var(--font-kai); font-size: 17px; }

/* ---------- 分隔与板块 ---------- */
.ink-divider {
  height: 1px; border: none; margin: 8px 0 36px;
  background: linear-gradient(90deg, transparent, rgba(26, 26, 26, 0.3), transparent);
}
.home-sec { padding: 30px 0 10px; }
.sec-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.sec-head h2 { font-size: 26px; letter-spacing: 3px; }
.sec-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(26, 26, 26, 0.22), transparent); }
.sec-line::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--seal); margin-right: 10px; vertical-align: 2px;
}

/* ---------- 频道卡片 ---------- */
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.channel-card {
  display: flex; flex-direction: column; padding: 24px 26px 20px;
  background: linear-gradient(160deg, #FFFFF0 0%, #F8F3E8 100%);
  border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.channel-card::after {
  content: attr(data-deco);
  position: absolute; right: -6px; bottom: -28px;
  font-family: var(--font-kai); font-size: 110px; line-height: 1;
  color: rgba(26, 26, 26, 0.045); pointer-events: none;
}
.channel-card:hover { box-shadow: var(--shadow-hover); }
.channel-card.idiom::after { color: rgba(46, 139, 87, 0.07); }
.ch-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px dashed var(--line);
}
.ch-title-wrap { display: flex; align-items: baseline; gap: 10px; }
.ch-head h2 { font-size: 22px; letter-spacing: 2px; color: var(--ink); margin: 0; }
.ch-count { font-size: 13px; color: var(--ink-4); }
.ch-more {
  display: inline-flex; align-items: center;
  font-size: 13px; color: var(--seal);
  padding: 4px 12px;
  border: 1px solid rgba(196, 30, 58, 0.3);
  border-radius: 4px;
  background: rgba(196, 30, 58, 0.05);
  transition: all 0.2s;
  text-decoration: none;
}
.ch-more:hover {
  background: var(--seal); color: #FFF;
  border-color: var(--seal);
}
.ch-entry-wrap { margin-top: 14px; }
.ch-entry-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}

/* ---------- 字数浏览 ---------- */
.len-row { display: flex; flex-wrap: wrap; gap: 14px; }
.len-chip {
  padding: 10px 22px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 240, 0.6); color: var(--ink-2); font-size: 15px;
  transition: all 0.25s;
}
.len-chip span { margin-left: 8px; font-size: 12px; color: var(--ink-4); }
.len-chip:hover { border-color: rgba(26, 26, 26, 0.4); background: var(--ink-2); color: #F8F5F0; }
.len-chip:hover span { color: rgba(248, 245, 240, 0.7); }

/* ---------- 词条卡片网格 ---------- */
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.entry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.entry-grid .entry-card { min-width: 0; }
.entry-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px;
  background: rgba(255, 255, 240, 0.75);
  border: 1px solid var(--line); border-radius: 3px;
  transition: all 0.25s;
}
.entry-card:hover {
  border-color: rgba(26, 26, 26, 0.35);
  background: #FFFFF0;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.entry-card:hover .e-name { color: var(--seal); }
.e-name { font-family: var(--font-kai); font-size: 19px; color: var(--ink); letter-spacing: 1px; }
.e-py { font-size: 12px; color: var(--ink-4); letter-spacing: 0.5px; }

/* ---------- 频道页 ---------- */
.crumb { padding: 22px 0 4px; font-size: 13px; color: var(--ink-4); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumb i { font-style: normal; opacity: 0.6; }
.crumb a:hover { color: var(--seal); }
.crumb span { color: var(--ink-3); }
.channel-hero { text-align: center; padding: 26px 0 30px; }
.channel-hero h1 { font-size: 34px; letter-spacing: 6px; }
.channel-hero p { margin-top: 10px; color: var(--ink-3); font-size: 15px; }
.channel-hero strong { color: var(--seal); font-weight: 400; font-family: var(--font-kai); }
.letter-index {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 20px; margin: 0 0 26px;
  background: rgba(255, 255, 240, 0.6);
  border: 1px solid var(--line); border-radius: 4px;
}
.lnk {
  min-width: 46px; padding: 6px 10px; text-align: center;
  border: 1px solid var(--line); border-radius: 4px;
  font-size: 15px; color: var(--ink-2); background: rgba(248, 245, 240, 0.6);
  transition: all 0.2s;
}
.lnk i { font-style: normal; font-size: 11px; color: var(--ink-4); margin-left: 4px; }
.lnk:hover { border-color: var(--ink-2); color: var(--ink); }
.lnk.off { opacity: 0.35; pointer-events: none; }

/* ---------- 列表页 ---------- */
.list-head { text-align: center; padding: 20px 0 22px; }
.list-head h1 { font-size: 28px; letter-spacing: 3px; }
.list-sub { margin-top: 8px; font-size: 14px; color: var(--ink-4); }
.letter-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 20px; }
.lt {
  width: 42px; height: 42px; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 16px; color: var(--ink-2); background: rgba(255, 255, 240, 0.7);
  transition: all 0.2s;
}
.lt i { font-style: normal; font-size: 10px; color: var(--ink-4); line-height: 1; }
.lt:hover { border-color: var(--ink-2); }
.lt.cur { background: var(--ink-2); border-color: var(--ink-2); color: #F8F5F0; }
.lt.cur i { color: rgba(248, 245, 240, 0.7); }
.lt.off { opacity: 0.3; pointer-events: none; }
.st-pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 30px 0 8px; }
.st-pager .pg {
  min-width: 38px; height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 4px;
  font-size: 14px; color: var(--ink-3); background: rgba(255, 255, 240, 0.7);
}
.st-pager .pg:hover { border-color: var(--ink-2); color: var(--ink); }
.st-pager .pg.cur { background: var(--ink-2); border-color: var(--ink-2); color: #F8F5F0; }
.st-pager .pg.off { opacity: 0.4; pointer-events: none; }
.st-pager .pg.gap { border: none; background: transparent; min-width: 20px; padding: 0 4px; color: var(--ink-4); cursor: default; }
.back-home { text-align: center; padding: 18px 0 30px; }
.back-home a { font-size: 14px; color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.back-home a:hover { color: var(--seal); border-color: rgba(196, 30, 58, 0.4); }

/* ---------- 详情页 ---------- */
.card {
  background: linear-gradient(170deg, #FFFFF0 0%, #FAF5EA 100%);
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow-card);
  padding: 34px 38px;
}
.detail { margin-top: 18px; position: relative; overflow: hidden; }
.detail::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--seal), rgba(196, 30, 58, 0.06));
  opacity: 0.75;
}
.detail-head { text-align: center; padding-bottom: 6px; }
.ch-badge {
  display: inline-block; padding: 3px 14px; margin-bottom: 12px;
  border: 1px solid rgba(196, 30, 58, 0.35); border-radius: 999px;
  color: var(--seal); font-size: 12px; letter-spacing: 2px;
  background: rgba(196, 30, 58, 0.05);
}
.detail .ink-divider { margin: 18px 0 6px; }
.word-title { font-size: 44px; letter-spacing: 8px; line-height: 1.25; }
.pinyin-line { margin-top: 10px; display: flex; justify-content: center; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.py { font-size: 18px; color: var(--ink-3); letter-spacing: 1px; }
.zy { font-size: 15px; color: var(--ink-4); letter-spacing: 2px; }
.sec { margin-top: 26px; }
.sec h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; letter-spacing: 2px; margin-bottom: 12px;
}
.sec h2::before {
  content: ''; width: 8px; height: 8px; background: var(--seal);
  border-radius: 2px; transform: rotate(45deg); flex-shrink: 0;
}
.sec-body { font-size: 16px; color: var(--ink-2); }
.sec-body.def { font-size: 17px; }
.quote {
  padding: 14px 18px; border-left: 3px solid rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.06); color: var(--ink-3); font-style: normal;
}
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  padding: 5px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--ink-3); background: rgba(248, 245, 240, 0.7);
  transition: all 0.2s;
}
.tag:hover { color: var(--seal); border-color: rgba(196, 30, 58, 0.4); }
.example { color: var(--ink-3); font-style: normal; }
.detail-nav {
  margin-top: 34px; padding-top: 20px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.pn {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 4px;
  font-size: 14px; color: var(--ink-3); max-width: 40%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all 0.2s;
}
.pn:hover { border-color: var(--ink-2); color: var(--ink); }
.pn.off { opacity: 0.4; pointer-events: none; }
.pn.back { border-style: dashed; }
.related { margin-top: 22px; padding: 26px 30px; }
.related h2 { font-size: 20px; letter-spacing: 2px; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.empty { color: var(--ink-4); font-size: 14px; }

/* ---------- 搜索页 ---------- */
.search-sec { padding: 46px 0 60px; max-width: 760px; margin: 0 auto; }
.search-tip { text-align: center; margin-top: 14px; font-size: 13px; color: var(--ink-4); }
.search-status { text-align: center; margin: 26px 0 6px; font-size: 14px; color: var(--ink-3); letter-spacing: 1px; }
.search-status .loading::after {
  content: '…'; animation: dots 1.2s steps(4) infinite;
}
.search-results { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.sr-group { margin-top: 16px; }
.sr-group h2 { font-size: 18px; letter-spacing: 2px; margin: 14px 0 10px; display: flex; align-items: center; gap: 8px; }
.sr-group h2::before { content: ''; width: 6px; height: 6px; background: var(--seal); border-radius: 50%; }
.sr-item {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px;
  background: rgba(255, 255, 240, 0.75);
  border: 1px solid var(--line); border-radius: 3px;
  transition: all 0.2s;
}
.sr-item:hover { border-color: rgba(26, 26, 26, 0.35); box-shadow: var(--shadow-card); }
.sr-item .sr-name { font-family: var(--font-kai); font-size: 19px; color: var(--ink); }
.sr-item .sr-name b { color: var(--seal); font-weight: 400; }
.sr-item .sr-py { font-size: 13px; color: var(--ink-4); }
.sr-item .sr-def { flex-basis: 100%; font-size: 14px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item .sr-type {
  margin-left: auto; font-size: 11px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid rgba(46, 139, 87, 0.4); color: var(--green);
}
.sr-item.w .sr-type { border-color: rgba(196, 30, 58, 0.35); color: var(--seal); }
.search-empty { text-align: center; padding: 40px 0; }
.empty-title { font-family: var(--font-kai); font-size: 22px; color: var(--ink-3); letter-spacing: 2px; }
.search-empty p { margin-top: 10px; font-size: 14px; color: var(--ink-4); }
.search-empty a { color: var(--seal); border-bottom: 1px solid rgba(196, 30, 58, 0.3); }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 60px; position: relative; }
.mtn { display: block; width: 100%; height: 90px; }
.foot-in { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 30px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-kai); font-size: 17px; color: var(--ink-2); letter-spacing: 2px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--ink-4); }
.foot-nav a:hover { color: var(--seal); }
.foot-copy { font-size: 12px; color: var(--ink-4); letter-spacing: 0.5px; }

/* ---------- 动画 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dots { to { visibility: hidden; } }
main > * { animation: rise 0.45s ease-out both; }
main > *:nth-child(2) { animation-delay: 0.06s; }
main > *:nth-child(3) { animation-delay: 0.12s; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .channels { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .header-in { flex-wrap: wrap; padding: 10px 0; gap: 10px; }
  .brand { order: 1; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
  .hd-search { order: 2; margin-left: auto; }
  .hd-search input { width: 130px; }
  .hero { padding: 44px 0 36px; }
  .hero-title { font-size: 30px; letter-spacing: 3px; gap: 10px; }
  .hero-seal { width: 40px; height: 40px; font-size: 22px; }
  .hero-vtext { font-size: 56px; top: 10px; }
  .word-title { font-size: 32px; letter-spacing: 4px; }
  .card { padding: 24px 18px; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .pn { max-width: 100%; flex: 1; text-align: center; }
  .detail-nav { justify-content: center; }
}
@media (max-width: 480px) {
  .hd-search input { width: 110px; }
  .hero-search input { padding: 0 14px; }
  .hero-search button { width: 84px; letter-spacing: 2px; }
  .lt { width: 36px; height: 36px; font-size: 14px; }
  .len-chip { padding: 8px 16px; font-size: 14px; }
}

/* ---------- 打印 ---------- */
@media print {
  .site-header, .site-footer, .detail-nav, .related, .back-home { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ============================================================
   详情页 v2（按"一言九鼎"设计稿，dt-* 独立作用域，不影响其他页面）
   ============================================================ */
.dt-hero{max-width:860px;margin:30px auto 0;padding:0 22px;text-align:center}
.dt-seal{width:58px;height:58px;margin:0 auto 18px;display:flex;align-items:center;justify-content:center;
  background:#A93C2E;color:#F7F2E6;font-family:var(--fk);font-weight:700;font-size:25px;
  border-radius:9px;box-shadow:0 5px 14px rgba(169,60,46,.35);transform:rotate(-3deg)}
.dt-name{font-family:var(--fk);font-weight:700;font-size:clamp(40px,9vw,68px);letter-spacing:.12em;
  color:var(--ink);line-height:1.25;text-balance}
.dt-py{margin-top:8px;font-size:clamp(15px,2.4vw,19px);letter-spacing:.14em;color:#6E6456}
.dt-py .dt-zy{display:block;font-size:13px;color:#9A8F7D;letter-spacing:.08em;margin-top:2px}
.dt-tags{margin-top:16px;display:flex;justify-content:center;flex-wrap:wrap;gap:10px}
.dt-tag{font-size:13px;padding:5px 14px;border-radius:999px;letter-spacing:.05em;
  border:1px solid #D8CDB4;background:rgba(255,255,255,.55);color:#6E6456}
.dt-tag.cat{color:#4E6B52;border-color:rgba(78,107,82,.3);background:rgba(78,107,82,.08)}
.dt-tag.sent{background:#A93C2E;color:#F7F2E6;border-color:#A93C2E}
.dt-summary{max-width:860px;margin:24px auto 0;padding:0 22px}
.dt-quote-line{font-family:var(--fk);font-size:clamp(19px,3.4vw,26px);color:var(--ink);font-weight:600;
  line-height:1.7;text-align:center;padding:20px 24px;border-top:1px solid #D8CDB4;border-bottom:1px solid #D8CDB4;text-pretty}
.dt-doc{max-width:860px;margin:32px auto 20px;padding:0 22px}
.dt-block{background:rgba(255,252,243,.72);border:1px solid #D8CDB4;border-radius:14px;
  padding:24px 26px;margin-bottom:18px}
.dt-block.plain{background:transparent}
.dt-bt{display:flex;align-items:center;gap:11px;font-family:var(--fk);font-weight:700;font-size:18px;
  color:var(--ink);margin-bottom:14px}
.dt-bt::before{content:"";width:4px;height:18px;border-radius:2px;background:#A93C2E;flex-shrink:0}
.dt-bt .sub{font-size:12px;color:#9A8F7D;font-weight:400;letter-spacing:.05em}
.dt-bb{font-size:15.5px;color:#6E6456;line-height:2}
.dt-bb p+p{margin-top:10px}
.dt-bb b{color:var(--ink);font-weight:600}
.dt-concise{background:linear-gradient(135deg,rgba(169,60,46,.07),rgba(62,92,110,.07));
  border:1.5px dashed rgba(169,60,46,.45);border-radius:12px;padding:15px 19px;
  font-size:16.5px;font-weight:500;color:var(--ink);line-height:1.9}
.dt-chars{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.dt-charbox{background:#EFE8D4;border:1px solid #D8CDB4;border-radius:10px;padding:15px 10px;text-align:center;min-width:0}
.dt-charbox .ch{font-family:var(--fk);font-weight:700;font-size:32px;color:#8C2F24;display:block;line-height:1.15}
.dt-charbox .mean{margin-top:7px;display:block;font-size:13px;color:#6E6456;line-height:1.6}
.dt-quote{display:block;margin:4px 0 14px;padding:13px 17px;border-left:4px solid #A93C2E;
  background:rgba(169,60,46,.05);font-family:var(--fk);font-size:15px;color:var(--ink);line-height:1.9;text-pretty}
.dt-quote .src{display:block;margin-top:8px;font-family:inherit;font-size:13px;color:#9A8F7D}
.dt-examples{display:flex;flex-direction:column;gap:10px}
.dt-example{padding:11px 17px;border-radius:10px;background:#EFE8D4;border:1px solid #D8CDB4;
  font-size:15px;color:#6E6456;line-height:1.9;text-pretty}
.dt-example .mark{color:#A93C2E;font-weight:700;margin-right:8px}
.dt-chiplabel{font-size:13px;color:#9A8F7D;margin-bottom:9px;letter-spacing:.1em}
.dt-chips{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:6px}
.dt-chips .chip,.dt-chips a.chip{font-size:14px;padding:6px 14px;border-radius:999px;
  background:rgba(255,255,255,.6);border:1px solid #D8CDB4;color:#6E6456;text-decoration:none;transition:all .18s}
.dt-chips a.chip:hover{background:#4E6B52;color:#F7F2E6;border-color:#4E6B52}
.dt-chips a.chip.ant{color:#8C2F24;border-color:rgba(169,60,46,.3);background:rgba(169,60,46,.06)}
.dt-chips a.chip.ant:hover{background:#A93C2E;color:#F7F2E6;border-color:#A93C2E}
.dt-compare{border:1px solid #D8CDB4;border-radius:12px;overflow:hidden}
.dt-compare .row{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:start;padding:13px 17px}
.dt-compare .row+.row{border-top:1px solid #D8CDB4}
.dt-compare .kw{font-family:var(--fk);font-weight:700;color:#8C2F24;font-size:16px}
.dt-compare .txt{font-size:14.5px;color:#6E6456;line-height:1.8;min-width:0;text-pretty}
.dt-memo{background:linear-gradient(135deg,rgba(62,92,110,.08),rgba(78,107,82,.08));
  border:1px solid rgba(62,92,110,.25);border-radius:12px;padding:15px 19px;
  font-size:15px;color:#6E6456;line-height:1.9;text-pretty}
.dt-nav{max-width:860px;margin:22px auto 26px;padding:0 22px;display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.dt-nav .pn{font-size:14px;padding:9px 18px;border-radius:999px;border:1px solid #D8CDB4;
  color:#6E6456;text-decoration:none;background:rgba(255,255,255,.6);transition:all .18s}
.dt-nav a.pn:hover{border-color:#A93C2E;color:#A93C2E}
.dt-nav .pn.off{opacity:.45;cursor:default}
.dt-nav .pn.back{background:#A93C2E;color:#F7F2E6;border-color:#A93C2E}
.dt-nav .pn.back:hover{background:#8C2F24;color:#F7F2E6}
@media(max-width:600px){
  .dt-chars{grid-template-columns:repeat(2,1fr)}
  .dt-compare .row{grid-template-columns:1fr;gap:4px}
  .dt-block{padding:18px 16px}
}

/* ============ 搜索联想下拉（动态 search.asp） ============ */
.hd-search,.hero-search{position:relative}
.suggest{position:absolute;top:100%;left:0;right:0;margin-top:6px;background:#fff;border:1px solid #e5ddcb;border-radius:6px;box-shadow:0 8px 24px rgba(26,26,26,.12);max-height:360px;overflow-y:auto;z-index:60;text-align:left}
.suggest a{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;padding:9px 12px;border-bottom:1px solid #f2ede1;color:inherit;text-decoration:none}
.suggest a:last-child{border-bottom:0}
.suggest a.on,.suggest a:hover{background:#faf6ec}
.suggest .sg-name{font-weight:600;font-size:15px}
.suggest .sg-py{color:#999;font-size:12px}
.suggest .sg-type{margin-left:auto;font-size:11px;color:#A7162E;border:1px solid #e3c9c9;border-radius:4px;padding:1px 5px;white-space:nowrap}
.suggest .sg-def{flex-basis:100%;color:#777;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 搜索结果页分页条 */
.sr-pager{margin:24px 0;display:flex;gap:8px;justify-content:center;align-items:center;flex-wrap:wrap}
.sr-pager a,.sr-pager span.cur{padding:6px 12px;border:1px solid #e5ddcb;border-radius:4px;text-decoration:none;color:inherit;background:#fff}
.sr-pager span.cur{background:#A7162E;color:#fff;border-color:#A7162E}
.sr-pager span.gap{border:0;background:none}

/* ==========================================================================
   七曜主题悬浮微部件 (Theme Switcher Widget)
   ========================================================================== */
.theme-switcher-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  font-family: var(--font-song), serif;
}

.theme-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.theme-trigger-btn:hover {
  transform: translateY(-2px);
  border-color: var(--seal);
}

.theme-trigger-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--seal);
  color: #FFFDF8;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-kai), serif;
  font-weight: bold;
}

.theme-dropdown-panel {
  position: absolute;
  bottom: 46px;
  right: 0;
  width: 280px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 14px;
  backdrop-filter: blur(12px);
  display: none;
  animation: themeFadeIn 0.2s ease-out;
}

.theme-dropdown-panel.show {
  display: block;
}

@keyframes themeFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.theme-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

.theme-panel-title {
  font-weight: bold;
  color: var(--ink);
  font-family: var(--font-kai), serif;
  font-size: 15px;
}

.theme-auto-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(196, 30, 58, 0.1);
  color: var(--seal);
  cursor: pointer;
}

.theme-grid-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.theme-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 6px 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink-2);
}

.theme-option-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.theme-option-btn.active {
  border-color: var(--seal);
  background: rgba(0, 0, 0, 0.05);
}

.theme-color-chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-family: var(--font-kai), serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-day-label {
  font-size: 11px;
  color: var(--ink-3);
}

.theme-panel-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.03);
  padding: 6px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.theme-reset-row {
  text-align: right;
}

.theme-reset-link {
  font-size: 11px;
  color: var(--seal);
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 768px) {
  .theme-switcher-widget {
    bottom: 16px;
    right: 14px;
  }
  .theme-trigger-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .theme-dropdown-panel {
    width: 250px;
    max-width: calc(100vw - 28px);
    right: 0;
    bottom: 40px;
    padding: 10px;
  }
  .theme-grid-list {
    gap: 4px;
  }
  .theme-color-chip {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
}
