/* ============================================================
   墨隐山房 · 全站样式 style.css
   水墨意境 · 宣纸质感 · 朱红印章
   ============================================================ */

:root {
  --bg: #f8f5f0;
  --bg-alt: #f3efe8;
  --card: #fdfbf7;
  --ink: #1f1c18;
  --ink-soft: #6b6358;
  --primary: #c41e3a;
  --primary-soft: #e8b4bd;
  --accent: #2e8b57;
  --gold: #b8860b;
  --border: #ddd6c9;
  --shadow: 0 10px 30px -12px rgba(31,28,24,0.14);
  --shadow-hover: 0 16px 40px -14px rgba(31,28,24,0.22);
  --radius: 6px;
  --theme-symbol: "墨";
  --theme-name: "水墨常态";
  --theme-banner-bg: radial-gradient(120% 90% at 50% 0%, #fdfbf7 0%, #f8f5f0 45%, #f3efe8 100%);
}

/* ============================================================
   七曜古典国画每日轮换主题体系
   日(日曜) / 一(月曜) / 二(火曜) / 三(水曜) / 四(木曜) / 五(金曜) / 六(土曜)
   ============================================================ */

/* 1. 周一【月曜·素月流光】(theme-mon) - 照搬古诗词站：宋雅素宣、冷砚水墨 */
[data-theme="theme-mon"], body[data-theme="theme-mon"] {
  --bg: #F5F7FA;
  --bg-alt: #EBF0F5;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #2D3A4B;
  --ink-soft: #405167;
  --primary: #3F5E7E;
  --primary-soft: #9BB0C7;
  --accent: #728DAA;
  --gold: #728DAA;
  --border: rgba(63, 94, 126, 0.14);
  --shadow: 0 4px 20px rgba(45, 58, 75, 0.07);
  --shadow-hover: 0 10px 32px rgba(45, 58, 75, 0.14);
  --radius: 4px;
  --theme-symbol: "月";
  --theme-name: "月曜·素月流光";
}

/* 2. 周二【火曜·朱砂丹心】(theme-tue) - 照搬古诗词站：盛唐气象、朱印金石 */
[data-theme="theme-tue"], body[data-theme="theme-tue"] {
  --bg: #FAF4F0;
  --bg-alt: #F4E8DF;
  --card: rgba(255, 255, 255, 0.92);
  --ink: #3A2320;
  --ink-soft: #583935;
  --primary: #A8332A;
  --primary-soft: #B8928C;
  --accent: #C67E28;
  --gold: #C67E28;
  --border: rgba(168, 51, 42, 0.16);
  --shadow: 0 4px 20px rgba(58, 35, 32, 0.08);
  --shadow-hover: 0 10px 32px rgba(58, 35, 32, 0.15);
  --radius: 2px;
  --theme-symbol: "丹";
  --theme-name: "火曜·朱砂丹心";
}

/* 3. 周三【水曜·烟雨空蒙】(theme-wed) - 照搬古诗词站：江南天青、水墨涟漪 */
[data-theme="theme-wed"], body[data-theme="theme-wed"] {
  --bg: #F2F8F6;
  --bg-alt: #E3EFEA;
  --card: rgba(255, 255, 255, 0.88);
  --ink: #1D3D38;
  --ink-soft: #2F5650;
  --primary: #2B6E67;
  --primary-soft: #8BAEA8;
  --accent: #5BA398;
  --gold: #5BA398;
  --border: rgba(43, 110, 103, 0.15);
  --shadow: 0 6px 24px rgba(29, 61, 56, 0.06);
  --shadow-hover: 0 12px 36px rgba(29, 61, 56, 0.13);
  --radius: 8px;
  --theme-symbol: "水";
  --theme-name: "水曜·烟雨空蒙";
}

/* 4. 周四【木曜·松竹长青】(theme-thu) - 照搬古诗词站：魏晋林泉、修竹苍松 */
[data-theme="theme-thu"], body[data-theme="theme-thu"] {
  --bg: #F6F8F3;
  --bg-alt: #EBF0E4;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #283B2C;
  --ink-soft: #3F5543;
  --primary: #3A6643;
  --primary-soft: #9CB2A1;
  --accent: #8C7343;
  --gold: #8C7343;
  --border: rgba(58, 102, 67, 0.16);
  --shadow: 0 4px 18px rgba(40, 59, 44, 0.07);
  --shadow-hover: 0 10px 30px rgba(40, 59, 44, 0.14);
  --radius: 4px;
  --theme-symbol: "竹";
  --theme-name: "木曜·松竹长青";
}

/* 5. 周五【金曜·金石秋韵】(theme-fri) - 照搬古诗词站：秦汉钟鼎、秋金赭黄 */
[data-theme="theme-fri"], body[data-theme="theme-fri"] {
  --bg: #FAF6EE;
  --bg-alt: #F1E9DA;
  --card: rgba(255, 255, 255, 0.92);
  --ink: #3E2918;
  --ink-soft: #5C412C;
  --primary: #8C5627;
  --primary-soft: #BA9D83;
  --accent: #B58428;
  --gold: #B58428;
  --border: rgba(140, 86, 39, 0.18);
  --shadow: 0 4px 20px rgba(62, 41, 24, 0.08);
  --shadow-hover: 0 10px 32px rgba(62, 41, 24, 0.15);
  --radius: 3px;
  --theme-symbol: "金";
  --theme-name: "金曜·金石秋韵";
}

/* 6. 周六【土曜·锦瑟华年】(theme-sat) - 照搬古诗词站：敦煌盛景、团花霞暖 */
[data-theme="theme-sat"], body[data-theme="theme-sat"] {
  --bg: #FDF5F6;
  --bg-alt: #F8E6E9;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #3A1F2B;
  --ink-soft: #583344;
  --primary: #8B2C58;
  --primary-soft: #B88CA0;
  --accent: #BA5D3E;
  --gold: #BA5D3E;
  --border: rgba(139, 44, 88, 0.16);
  --shadow: 0 6px 24px rgba(139, 44, 88, 0.08);
  --shadow-hover: 0 12px 36px rgba(139, 44, 88, 0.15);
  --radius: 6px;
  --theme-symbol: "锦";
  --theme-name: "土曜·锦瑟华年";
}

/* 7. 周日【日曜·桃夭灼华】(theme-sun) - 照搬古诗词站：海棠春深、桃花灼华 */
[data-theme="theme-sun"], body[data-theme="theme-sun"] {
  --bg: #FDF5F7;
  --bg-alt: #FAECF0;
  --card: rgba(255, 255, 255, 0.94);
  --ink: #2E1F27;
  --ink-soft: #422D37;
  --primary: #E05A7B;
  --primary-soft: #F4A7B9;
  --accent: #F4A7B9;
  --gold: #E05A7B;
  --border: rgba(224, 90, 123, 0.22);
  --shadow: 0 4px 18px rgba(224, 90, 123, 0.12);
  --shadow-hover: 0 10px 30px rgba(224, 90, 123, 0.18);
  --radius: 6px;
  --theme-symbol: "桃";
  --theme-name: "日曜·桃夭灼华";
}

/* 全局主题平滑过渡 */
body, .site-header, .site-footer, .painting-card, .btn, .main-nav a, .header-search input {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.25s ease, box-shadow 0.35s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Han Serif CN', 'Songti SC', 'SimSun', serif;
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* 宣纸纹理背景层 */
.paper-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--theme-banner-bg, radial-gradient(120% 90% at 50% 0%, #fdfbf7 0%, #f8f5f0 45%, #f3efe8 100%));
}
.paper-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.5;
  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.045'/%3E%3C/svg%3E");
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- 朱红印章 ---- */
.ink-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: var(--primary);
  color: #fdfbf7;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 16px;
  letter-spacing: 0.05em;
  box-shadow: inset 0 0 0 2px rgba(253,251,247,0.35);
}

.ink-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31,28,24,0.35), transparent);
  margin: 24px 0;
}

/* ---- 站点页头 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(248,245,240,0.98);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-name {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 22px;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.main-nav { display: flex; gap: 32px; }
.main-nav a {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--primary); }
.header-search { display: flex; gap: 8px; }
.header-search input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--card);
  font-family: inherit;
  font-size: 14px;
  width: 180px;
}
.login-link {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 4px;
  transition: all 0.2s;
}
.login-link:hover { border-color: var(--primary); color: var(--primary); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-primary {
  background: linear-gradient(135deg, #e87a90 0%, #d86880 42%, #5b8db8 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(40, 20, 30, 0.25);
  box-shadow: 0 2px 8px -1px rgba(216, 104, 128, 0.35), 0 1px 3px rgba(91, 141, 184, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ee8b9f 0%, #df748c 42%, #6899c3 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px -1px rgba(216, 104, 128, 0.45), 0 2px 6px rgba(91, 141, 184, 0.35);
  transform: translateY(-1px);
}
.btn-outline {
  background: linear-gradient(135deg, rgba(232, 122, 144, 0.08) 0%, rgba(91, 141, 184, 0.08) 100%);
  border-color: rgba(91, 141, 184, 0.35);
  color: #3b5f7d;
}
.btn-outline:hover {
  background: linear-gradient(135deg, rgba(232, 122, 144, 0.16) 0%, rgba(91, 141, 184, 0.18) 100%);
  border-color: #5b8db8;
  color: #2b4963;
  transform: translateY(-1px);
}
.btn-ghost { background-color: transparent; color: var(--ink-soft); padding: 6px 12px; }
.btn-ghost:hover { color: var(--primary); }
.btn-ghost.danger:hover { color: #c0392b; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 4px; }
.btn-lg { padding: 9px 20px; font-size: 13.5px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn.disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 18px 16px 20px;
  border-bottom: 1px solid var(--border);
}
.hero-en { font-size: 11px; letter-spacing: 0.25em; color: var(--primary); display: block; line-height: 1.2; }
.hero-title {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 28px;
  letter-spacing: 0.2em;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.25;
}
.hero-sub {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.3;
}
.hero-desc {
  max-width: 660px;
  margin: 6px auto 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.hero-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.hero-actions .btn { padding: 4px 14px; font-size: 12px; }

/* ---- 区块 ---- */
.section { padding: 56px 0; }
.section-alt { background-color: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-head h2 {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 26px;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.section-head p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.section-title-group { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ---- 首页统计条 ---- */
.site-stats-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 5px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  font-size: 13px;
  color: var(--ink-soft);
}
.hero .site-stats-bar {
  margin: 8px auto 0;
}
.site-stat { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.site-stat-num {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.site-stat-label { font-size: 12px; color: var(--ink-soft); }
.site-stat-divider { width: 1px; height: 12px; background-color: var(--border); opacity: 0.8; }

.more-link { font-size: 13px; color: var(--ink-soft); }
.more-link:hover { color: var(--primary); }

/* ---- 国画卡片网格 ---- */
.painting-grid {
  display: grid;
  gap: 16px;
}
.grid-6 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .grid-6 { grid-template-columns: repeat(6, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.painting-card {
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
/* 无图卡片：清雅书卷式列表样式 */
.painting-card.text-only {
  min-height: 170px;
  background: linear-gradient(135deg, rgba(253, 251, 247, 0.9) 0%, rgba(248, 245, 240, 0.95) 100%);
  border: 1px solid rgba(139, 119, 89, 0.22);
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(139, 119, 89, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  position: relative;
  transition: all 0.3s ease;
}
.painting-card.text-only::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-soft));
  opacity: 0.6;
}
.painting-card.text-only:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 119, 89, 0.18);
  border-color: rgba(139, 119, 89, 0.4);
}
.painting-card.text-only .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-header-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.card-dynasty-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
  color: #fffdf7;
  font-size: 12px;
  font-family: 'KaiTi', 'STKaiti', serif;
  letter-spacing: 1px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.painting-card.text-only .card-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.painting-card.text-only .card-author {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  opacity: 0.9;
  letter-spacing: 0.02em;
}
.painting-card.text-only .card-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 4px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.82;
  letter-spacing: 0.02em;
}
.painting-card.text-only .card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(139, 119, 89, 0.25);
}
.painting-card.text-only .card-meta span {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(139, 119, 89, 0.1);
  color: rgba(74, 68, 60, 0.85);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.02em;
}
.card-author { font-size: 12px; color: var(--ink-soft); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: auto;
  padding-top: 12px;
}

/* ---- 作者卡片 ---- */
.author-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 10px; }
@media (min-width: 640px) { .author-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 900px) { .author-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.author-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fdfbf7 0%, #f9f5ee 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px -6px rgba(31,28,24,0.08);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.author-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background-color: var(--primary);
  transition: height 0.25s ease;
}
.author-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -10px rgba(31,28,24,0.18);
  border-color: #cbbaa5;
  background: #ffffff;
}
.author-card:hover::after {
  height: 100%;
}
.author-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #efeae1;
  border: 2px solid #e5ded3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}
.author-card:hover .author-avatar {
  transform: none;
  border-color: var(--primary-soft);
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-avatar span { font-family: 'KaiTi', 'STKaiti', serif; font-size: 22px; font-weight: bold; color: var(--ink-soft); }
.author-avatar.sm { width: 48px; height: 48px; }
.author-avatar.lg { width: 112px; height: 112px; border-width: 3px; }
.author-avatar.lg span { font-size: 44px; }

.author-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.author-name-row {
  display: flex;
  align-items: center;
  min-width: 0;
}
.author-name {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.author-card:hover .author-name {
  color: var(--primary);
}
.author-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.author-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  padding: 1px 7px;
  background-color: #f4efe4;
  color: #79664e;
  border: 1px solid #dfd4be;
  border-radius: 3px;
  line-height: 1.4;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.author-count {
  display: inline-flex;
  align-items: baseline;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.author-count strong {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  margin-right: 3px;
}
.author-dynasty { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* ---- 页脚 ---- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; background-color: var(--bg); }
.friend-links h3 { font-family: 'KaiTi', serif; font-size: 15px; letter-spacing: 0.2em; color: var(--ink); margin-bottom: 16px; }
.links-list { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.links-list a { font-size: 13px; color: var(--ink-soft); }
.links-list a:hover { color: var(--primary); }
.footer-info { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-soft); }
@media (min-width: 768px) { .footer-info { flex-direction: row; justify-content: space-between; } }

/* ---- 页面标题 ---- */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-family: 'KaiTi', serif; font-size: 30px; letter-spacing: 0.2em; color: var(--ink); }
.page-head p { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* ---- 朝代时间轴 ---- */
.dynasty-timeline {
  margin-bottom: 24px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 8px;
  box-shadow: var(--shadow);
}
.dt-label {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.dt-track {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 12px 4px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.dt-track::-webkit-scrollbar { height: 4px; }
.dt-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.dt-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 76px;
  padding: 4px 4px 0;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s;
}
.dt-node:hover { transform: translateY(-2px); }
.dt-node:hover .dt-name { color: var(--primary); }
.dt-node::before {
  content: '';
  position: absolute;
  top: 11px;
  right: 50%;
  width: 100%;
  height: 2px;
  background-color: var(--border);
  z-index: 0;
}
.dt-node:first-child::before { display: none; }
.dt-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--bg);
  border: 2px solid var(--border);
  transition: all 0.2s;
  z-index: 1;
}
.dt-node.active .dt-dot {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(196,30,58,0.15);
}
.dt-name {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-top: 10px;
  white-space: nowrap;
  transition: color 0.2s;
}
.dt-node.active .dt-name { color: var(--primary); font-weight: 500; }

/* ---- 筛选栏 ---- */
.filter-bar {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.filter-search { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-search input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg);
  font-family: inherit;
  font-size: 14px;
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.filter-group span { font-size: 12px; color: var(--ink-soft); }
.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
}
.tag:hover { border-color: var(--primary); color: var(--primary); }
.tag-active { background-color: var(--primary); border-color: var(--primary); color: #fdfbf7; }

/* ---- 分页 ---- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink-soft);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .cur { background-color: var(--primary); border-color: var(--primary); color: #fdfbf7; }
.pagination .dots { border: none; }

/* ---- 空状态 ---- */
.empty-state {
  text-align: center;
  padding: 80px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-state p { color: var(--ink-soft); }
.empty-state p:first-child { font-family: 'KaiTi', serif; font-size: 18px; margin-bottom: 8px; }

/* ---- 面包屑 ---- */
.breadcrumb { padding: 24px 0; font-size: 13px; color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--ink); }

/* ---- 详情页 ---- */
.detail-layout {
  display: grid;
  gap: 32px;
  padding-bottom: 56px;
}
@media (min-width: 900px) {
  .detail-layout { grid-template-columns: minmax(0,1fr) minmax(0,420px); }
}
.detail-img-wrap {
  position: relative;
  background-color: var(--card);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 280px;
}
.detail-img-wrap img {
  max-height: 70vh;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 水墨微晕骨架屏 */
.detail-skeleton {
  position: absolute;
  inset: 12px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(ellipse 65% 55% at 50% 48%, rgba(65, 58, 50, 0.14) 0%, rgba(95, 86, 75, 0.06) 45%, rgba(243, 239, 232, 0.85) 100%),
    linear-gradient(135deg, #f7f3ec 0%, #ebe4d8 50%, #f4efe6 100%);
  background-size: 200% 200%, 100% 100%;
  box-shadow: inset 0 0 40px rgba(78, 68, 58, 0.08);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s ease;
  animation: inkHaloPulse 3s ease-in-out infinite;
}

/* 宣纸微噪与晕染纹理 */
.detail-skeleton::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 30% 35%, rgba(31, 28, 24, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 65%, rgba(31, 28, 24, 0.1) 0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  filter: blur(1px);
}

/* 水墨微晕印章/印记提示 */
.skeleton-ink-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px dashed rgba(139, 30, 30, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(139, 30, 30, 0.5);
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 18px;
  letter-spacing: 2px;
  padding-left: 2px;
  background: rgba(253, 251, 247, 0.4);
  box-shadow: 0 0 20px rgba(139, 30, 30, 0.08);
}
.skeleton-ink-text {
  position: relative;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 13px;
  color: rgba(107, 99, 88, 0.7);
  letter-spacing: 3px;
}

/* 水墨晕开呼吸动画 */
@keyframes inkHaloPulse {
  0% {
    background-position: 0% 50%, 0% 0%;
    filter: brightness(1) drop-shadow(0 0 0px transparent);
  }
  50% {
    background-position: 100% 50%, 0% 0%;
    filter: brightness(0.97) drop-shadow(0 0 8px rgba(65, 58, 50, 0.08));
  }
  100% {
    background-position: 0% 50%, 0% 0%;
    filter: brightness(1) drop-shadow(0 0 0px transparent);
  }
}

/* 加载中与加载完成状态 */
.detail-img-wrap.is-loading .detail-skeleton {
  opacity: 1;
  visibility: visible;
}
.detail-img-wrap.is-loading img {
  opacity: 0;
}

.detail-img-wrap.is-loaded .detail-skeleton {
  opacity: 0;
  visibility: hidden;
}
.detail-img-wrap.is-loaded img {
  opacity: 1;
}

/* 局部放大镜：细观笔触与印章 */
.detail-img-wrap.magnifier-active {
  cursor: none;
}
.magnifier-lens {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid rgba(253, 251, 247, 0.9);
  box-shadow: 0 6px 28px rgba(31, 28, 24, 0.4), 0 0 0 1px rgba(31, 28, 24, 0.25), inset 0 0 24px rgba(31, 28, 24, 0.12);
  background-color: #efe9dd;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 5;
  display: none;
  overflow: hidden;
}
/* 镜头中心朱红准星 */
.magnifier-lens::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(139, 30, 30, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(253, 251, 247, 0.45);
}
.magnifier-tip {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(107, 99, 88, 0.75);
  letter-spacing: 1px;
  text-align: center;
  font-family: 'KaiTi', 'STKaiti', serif;
}
/* 仅桌面指针设备显示提示与启用放大镜 */
@media (hover: hover) and (pointer: fine) {
  .magnifier-tip { display: block; }
}

/* 分享海报按钮与预览浮层 */
.btn-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius);
  background: #fdfbf6;
  border: 1px solid rgba(139, 30, 30, 0.55);
  color: #8B1E1E;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.btn-seal:hover { background: #f8f1e6; box-shadow: 0 4px 14px rgba(139, 30, 30, 0.14); }
.btn-seal:disabled { opacity: 0.6; cursor: default; }
.poster-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(31, 28, 24, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.poster-panel {
  background: #f6f2ea;
  border: 1px solid rgba(44, 40, 36, 0.25);
  border-radius: 10px;
  padding: 16px;
  width: min(94vw, 560px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 50px rgba(31, 28, 24, 0.45);
}
.poster-canvas-host {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(44, 40, 36, 0.18);
  border-radius: 6px;
  background: #fbf8f0;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-shadow: inset 0 2px 6px rgba(44, 40, 36, 0.06);
}
.poster-canvas {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  flex-shrink: 0 !important;
  aspect-ratio: auto;
  border: 1px solid rgba(44, 40, 36, 0.18);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(44, 40, 36, 0.12);
}
.poster-tip {
  font-size: 12px;
  color: rgba(107, 99, 88, 0.85);
  text-align: center;
  margin: 0;
  font-family: 'KaiTi', 'STKaiti', serif;
  letter-spacing: 1px;
}
.poster-actions { display: flex; gap: 10px; }
.poster-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 6px;
  border: 1px solid rgba(44, 40, 36, 0.35);
  background: rgba(255, 253, 247, 0.9);
  color: #2c2824;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 15px;
  letter-spacing: 2px;
  cursor: pointer;
}
.poster-btn.primary { background: #8B1E1E; border-color: #8B1E1E; color: #f8f2e8; }
.poster-modes { display: flex; gap: 6px; }
.poster-mode-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 6px;
  border: 1px solid rgba(44, 40, 36, 0.3);
  background: rgba(255, 253, 247, 0.75);
  color: rgba(74, 68, 60, 0.9);
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.poster-mode-btn.active {
  background: #2c2824;
  border-color: #2c2824;
  color: #f6f1e8;
}

.poster-textures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.poster-texture-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 2px;
  border-radius: 6px;
  border: 1px solid rgba(139, 119, 89, 0.32);
  background: rgba(255, 253, 247, 0.72);
  color: rgba(74, 68, 60, 0.95);
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.poster-texture-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 2px rgba(0,0,0,0.25);
}
.poster-texture-btn:hover {
  background: #fff;
  border-color: rgba(139, 119, 89, 0.6);
}
.poster-texture-btn.active {
  background: #2c2824;
  border-color: #2c2824;
  color: #fffdf7;
  box-shadow: 0 2px 6px rgba(44, 40, 36, 0.25);
}
.poster-texture-btn.active .poster-texture-dot {
  box-shadow: 0 0 0 1.5px #fff;
}

.poster-seal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
}
.poster-seal-row label {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 14px;
  color: rgba(74, 68, 60, 0.9);
  letter-spacing: 1px;
  white-space: nowrap;
}
.poster-seal-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(44, 40, 36, 0.25);
  background: rgba(255, 253, 247, 0.85);
  color: #2c2824;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 14px;
  letter-spacing: 1px;
  outline: none;
}
.poster-seal-input:focus {
  border-color: rgba(139, 30, 30, 0.55);
  box-shadow: 0 0 0 2px rgba(139, 30, 30, 0.1);
}

/* 轻量提示 toast */
.moyin-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  z-index: 11000;
  max-width: min(86vw, 420px);
  padding: 12px 22px;
  background: rgba(31, 28, 24, 0.92);
  color: #f8f2e8;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 15px;
  letter-spacing: 1px;
  line-height: 1.5;
  border-radius: 8px;
  box-shadow: 0 8px 26px rgba(31, 28, 24, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
}
.moyin-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 横长卷：固定高度，水平滚动 */
.detail-img-wrap.is-horizontal {
  height: 320px;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
}
.detail-img-wrap.is-horizontal img {
  width: auto;
  height: 100%;
  max-width: none;
  max-height: none;
}

/* 竖立轴：固定宽度，垂直方向可滑动浏览全卷 */
.detail-img-wrap.is-vertical {
  width: 280px;
  max-width: 100%;
  height: 520px;
  max-height: 75vh;
  overflow-x: hidden;
  overflow-y: auto;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}
.detail-img-wrap.is-vertical img {
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  display: block;
}

@media (min-width: 768px) {
  .detail-img-wrap.is-horizontal { height: 420px; }
  .detail-img-wrap.is-vertical {
    width: 380px;
    height: 640px;
    max-height: 80vh;
  }
}
.corner { position: absolute; width: 20px; height: 20px; pointer-events: none; }
.corner-tl { left: 4px; top: 4px; border-left: 2px solid var(--primary); border-top: 2px solid var(--primary); }
.corner-br { right: 4px; bottom: 4px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); }
.thumb-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.thumb-item {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  background-color: var(--bg-alt);
  transition: transform 0.2s;
  position: relative;
}
.detail-thumbs-title {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 500;
}
.detail-thumbs-title strong {
  font-weight: 700;
  color: var(--ink);
}
.thumb-title-tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  max-width: calc(100% - 8px);
  background: rgba(31, 28, 24, 0.82);
  color: #fff;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  font-family: var(--font-body, sans-serif);
}
.thumb-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(31, 28, 24, 0.75);
  color: #fff;
  font-size: 11px;
  padding: 0 5px;
  border-radius: 3px;
  line-height: 1.4;
  font-family: sans-serif;
  pointer-events: none;
}
.thumb-item:hover { transform: translateY(-2px); }
.thumb-item.active { border-color: var(--primary); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

.detail-en { font-size: 12px; letter-spacing: 0.2em; color: var(--primary); }
.detail-title {
  font-family: 'KaiTi', serif;
  font-size: 28px;
  letter-spacing: 0.15em;
  color: var(--ink);
  margin-top: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-sub { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.detail-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.8; margin-top: 20px; }

/* 作品简介独立卡片（图片下方） */
.detail-intro-card {
  margin-top: 24px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.detail-intro-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-alt);
}
.detail-intro-seal {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--primary);
  color: #fff;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 15px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(196,30,58,0.3);
}
.detail-intro-title {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--ink);
  margin: 0;
}
.detail-intro-body {
  padding: 20px 24px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.9;
  text-indent: 2em;
}
.detail-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.detail-actions .btn {
  padding: 8px 18px;
  font-size: 13.5px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.detail-actions .btn-primary {
  background: linear-gradient(135deg, #e87a90 0%, #d86880 45%, #5b8db8 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(216, 104, 128, 0.28), 0 1px 3px rgba(91, 141, 184, 0.2);
}
.detail-actions .btn-primary:hover {
  background: linear-gradient(135deg, #ee8b9f 0%, #df748c 45%, #6899c3 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(216, 104, 128, 0.38), 0 2px 5px rgba(91, 141, 184, 0.28);
  transform: translateY(-1px);
}
.detail-actions .btn-outline {
  background: linear-gradient(135deg, rgba(232, 122, 144, 0.12) 0%, rgba(91, 141, 184, 0.14) 100%);
  border: 1px solid rgba(91, 141, 184, 0.45);
  color: #2e5270;
  box-shadow: 0 1px 4px rgba(91, 141, 184, 0.12);
}
.detail-actions .btn-outline:hover {
  background: linear-gradient(135deg, rgba(232, 122, 144, 0.2) 0%, rgba(91, 141, 184, 0.22) 100%);
  border-color: #5b8db8;
  color: #1e3a52;
  box-shadow: 0 3px 8px rgba(91, 141, 184, 0.22);
  transform: translateY(-1px);
}
.detail-actions .btn-seal {
  background: #fdfbf7;
  border: 1px solid rgba(196, 30, 58, 0.4);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.detail-actions .btn-seal:hover {
  border-color: var(--primary);
  background: #fcf4f4;
  color: var(--primary);
  transform: translateY(-1px);
}
.extract-code { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }
.extract-code strong { color: var(--primary); }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13.5px; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--border); }
.spec-table .st-label { width: 72px; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.spec-table .st-val { color: var(--ink); padding-right: 18px; }
.spec-table td:first-child { width: 72px; color: var(--ink-soft); }
.spec-table .spec-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed rgba(139, 30, 30, 0.35);
  transition: color .2s ease, border-color .2s ease;
}
.spec-table .spec-link:hover {
  color: #8B1E1E;
  border-bottom-color: rgba(139, 30, 30, 0.7);
}
.spec-table .st-muted { color: var(--ink-soft); }

.author-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,245,238,0.7) 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.25s ease;
  text-decoration: none;
}
.author-link:hover {
  border-color: #5b8db8;
  background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(240,244,248,0.85) 100%);
  box-shadow: 0 3px 10px rgba(91,141,184,0.15);
  transform: translateY(-1px);
}
.al-seal {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background-color: var(--primary);
  color: #fff;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(139,30,30,0.3);
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}
.al-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.al-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.al-badge {
  font-size: 11px;
  padding: 1px 6px;
  background-color: #f4efe4;
  color: #79664e;
  border: 1px solid #dfd4be;
  border-radius: 3px;
  line-height: 1.3;
}
.al-hint {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}
.al-name {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.author-link:hover .al-name {
  color: #2b4963;
}
.al-arrow {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #5b8db8;
  font-weight: 500;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(91, 141, 184, 0.08);
  border: 1px solid rgba(91, 141, 184, 0.2);
  transition: all 0.2s ease;
}
.author-link:hover .al-arrow {
  background: rgba(91, 141, 184, 0.16);
  border-color: #5b8db8;
  color: #2b4963;
}

.author-works-list {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(253, 251, 247, 0.75);
  border: 1px dashed var(--border);
  border-radius: 6px;
}
.awl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.awl-title {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #554838;
}
.awl-more {
  font-size: 11.5px;
  color: #5b8db8;
  text-decoration: none;
}
.awl-more:hover {
  color: var(--primary);
  text-decoration: underline;
}
.awl-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
}
.awl-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 12.5px;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.awl-bullet {
  font-size: 10px;
  color: #d86880;
  flex-shrink: 0;
  line-height: 1;
}
.awl-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  display: block;
}
.awl-link:hover {
  border-color: #5b8db8;
  background: #f0f5fa;
  color: #2b4963;
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .awl-items { grid-template-columns: 1fr; }
}

/* ---- 作者聚合页 ---- */
.author-hero {
  display: flex;
  gap: 24px;
  padding: 24px;
  margin-bottom: 32px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 640px) { .author-hero { flex-direction: column; align-items: center; text-align: center; } }
.ah-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ah-title-row h1 { font-family: 'KaiTi', serif; font-size: 30px; letter-spacing: 0.15em; color: var(--ink); }
.author-bio { font-size: 14px; color: var(--ink-soft); line-height: 1.8; margin-top: 16px; }
.ah-count { font-size: 13px; color: var(--ink-soft); margin-top: 16px; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background-color: var(--bg-alt);
  color: var(--ink);
}
.badge-green { background-color: rgba(46,139,87,0.15); color: var(--accent); }
.badge-gray { background-color: var(--bg-alt); color: var(--ink-soft); }
.badge-outline { border: 1px solid var(--primary); color: var(--primary); background-color: transparent; }

/* ---- 登录页 ---- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.login-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 24px; }
.login-card h1 { font-family: 'KaiTi', serif; font-size: 22px; letter-spacing: 0.2em; text-align: center; color: var(--ink); margin-bottom: 24px; }
.form-error { background-color: rgba(196,30,58,0.1); color: var(--primary); padding: 10px 14px; border-radius: 4px; font-size: 13px; margin-bottom: 16px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}
.form-row textarea { resize: vertical; line-height: 1.6; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin-bottom: 20px; }
.btn-block { width: 100%; }

/* ---- 后台 ---- */
.admin-body { background-color: #f5f2ec; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: #2b2722;
  color: #e8e2d8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: 'KaiTi', serif;
  font-size: 18px;
  letter-spacing: 0.15em;
}
.sidebar-brand .ink-seal { background-color: var(--primary); }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  padding: 11px 14px;
  border-radius: 4px;
  font-size: 14px;
  color: #b8b0a4;
  transition: all 0.2s;
}
.sidebar-nav a:hover { background-color: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav a.active { background-color: var(--primary); color: #fff; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-foot a { display: block; padding: 9px 14px; font-size: 13px; color: #b8b0a4; border-radius: 4px; }
.sidebar-foot a:hover { background-color: rgba(255,255,255,0.06); color: #fff; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background-color: #fff;
}
.admin-topbar h1 { font-family: 'KaiTi', serif; font-size: 22px; letter-spacing: 0.15em; color: var(--ink); }
.admin-content { padding: 24px; flex: 1; }

/* ---- 后台统计卡片 ---- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-top { display: flex; justify-content: space-between; align-items: center; }
.stat-top span { font-size: 13px; color: var(--ink-soft); }
.stat-num { font-family: 'KaiTi', serif; font-size: 32px; letter-spacing: 0.1em; color: var(--ink); margin-top: 12px; }

/* ---- 后台 SEO 安全功能卡片 ---- */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}
@media (min-width: 768px) {
  .seo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .seo-grid { grid-template-columns: repeat(3, 1fr); }
}
.seo-card {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.seo-card-head { margin-bottom: 12px; }
.seo-card-head h3 {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 0.08em;
}
.seo-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 20px;
  flex: 1;
}
.seo-card .btn { align-self: flex-start; }
.seo-card-wide {
  grid-column: 1 / -1;
}
.seo-card .form-row {
  margin-bottom: 14px;
}
.seo-card .form-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--ink);
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
}

/* ---- 后台简约表格（数据库恢复等） ---- */
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table th {
  background-color: #f9f7f3;
  color: var(--ink);
  font-weight: 600;
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-table .col-name {
  width: 100%;
  white-space: normal;
  word-break: break-all;
}
.admin-table .col-size,
.admin-table .col-time,
.admin-table .col-action {
  width: auto;
}
.admin-table .btn {
  padding: 5px 14px;
  font-size: 13px;
}
.inline-form {
  display: inline;
  margin: 0;
}

.admin-page-title {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.admin-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}
.alert-success {
  background-color: #f0f7f0;
  border: 1px solid rgba(58, 102, 67, 0.2);
  color: #2f4d33;
}
.alert-error {
  background-color: #fdf2f2;
  border: 1px solid rgba(168, 51, 42, 0.2);
  color: #6b2520;
}

/* ---- 后台筛选栏 ---- */
.admin-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background-color: #fff;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.admin-filter-bar input[type="text"],
.admin-filter-bar select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}
.admin-filter-bar input[type="text"]:focus,
.admin-filter-bar select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ---- 后台工具栏 ---- */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-toolbar p { font-size: 13px; color: var(--ink-soft); }

/* ---- 后台数据表 ---- */
.table-wrap {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  background-color: #f5f2ec;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .fw { font-weight: 500; color: var(--ink); }
.data-table .ta-right { text-align: right; }
.data-table .empty { text-align: center; color: var(--ink-soft); padding: 40px 16px; }
.row-thumb { width: 64px; height: 48px; overflow: hidden; border-radius: 3px; background-color: var(--bg-alt); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background-color: var(--bg-alt); display: flex; align-items: center; justify-content: center; }
.row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.row-avatar span { font-family: 'KaiTi', serif; color: var(--ink-soft); }
.url-cell { color: var(--ink-soft); max-width: 300px; overflow: hidden; text-overflow: ellipsis; }

/* ---- 后台表单 ---- */
.admin-form { background-color: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid-1 { grid-template-columns: 1fr; }
.form-row-inline { display: flex; gap: 24px; }
.form-row-inline label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.form-row-merged {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
@media (max-width: 767px) {
  .form-row-merged {
    flex-direction: column;
    gap: 12px;
  }
  .form-row-merged .form-sub-col {
    width: 100%;
  }
}
.form-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.ai-status { font-size: 12px; color: var(--ink-soft); margin-top: 6px; min-height: 16px; }

/* ---- 内联表单 ---- */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.inline-form input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; background-color: #fff; font-family: inherit; font-size: 14px; }
.inline-form input[name="name"] { flex: 0 0 160px; }
.inline-form input[name="url"] { flex: 1; min-width: 200px; }

/* ---- 设置页 ---- */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .settings-grid { grid-template-columns: 1fr 1fr; } }
.settings-card { background-color: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.settings-card h2 { font-family: 'KaiTi', serif; font-size: 18px; letter-spacing: 0.15em; color: var(--ink); margin-bottom: 16px; }
.settings-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 16px; }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
  .main-nav { order: 3; width: 100%; justify-content: center; gap: 20px; }
  .header-search input { width: 140px; }
  .hero-title { font-size: 32px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-title-group { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-stats-bar { border-radius: var(--radius); padding: 6px 12px; }
  .admin-sidebar { display: none; }
  .admin-topbar h1 { font-size: 18px; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* ============================================================
   七曜主题 · 三层水墨背景（定位光晕 + SVG纹样 + 纸色遮罩）
   配方照搬古诗词站：fixed 层纹样随滚动形成视差雅韵
   ============================================================ */

/* 周一·月曜：幽远水墨远山峦峰、清冷月影与轻岚薄雾 */
[data-theme="theme-mon"] .paper-bg {
  background-image:
    radial-gradient(circle at 85% 15%, rgba(114, 141, 170, 0.16) 0%, rgba(114, 141, 170, 0.04) 180px, transparent 260px),
    url("data:image/svg+xml,%3Csvg width='500' height='260' viewBox='0 0 500 260' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='410' cy='60' r='26' fill='%23728DAA' fill-opacity='0.12'/%3E%3Cpath d='M0 260 C70 190 140 210 210 170 C280 130 350 180 430 140 C470 120 490 150 500 160 L500 260 Z' fill='%233F5E7E' fill-opacity='0.05'/%3E%3Cpath d='M0 260 C80 210 160 230 250 195 C330 160 410 210 500 175 L500 260 Z' fill='%233F5E7E' fill-opacity='0.08'/%3E%3Cpath d='M30 110 C50 100 80 120 120 110 M260 85 C290 80 320 95 360 85' fill='none' stroke='%233F5E7E' stroke-width='0.8' stroke-opacity='0.12' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(rgba(245, 247, 250, 0.94), rgba(245, 247, 250, 0.96));
  background-size: auto, 500px 260px, cover;
  background-position: top right, bottom center, center;
  background-repeat: no-repeat, repeat-x, no-repeat;
}

/* 周二·火曜：盛唐金石拓片回纹、篆刻朱印拓片与古卷暗纹 */
[data-theme="theme-tue"] .paper-bg {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(168, 51, 42, 0.08) 0%, transparent 220px),
    url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='15' y='15' width='50' height='50' rx='3' fill='none' stroke='%23A8332A' stroke-width='1.2' stroke-opacity='0.11'/%3E%3Crect x='22' y='22' width='36' height='36' fill='none' stroke='%23A8332A' stroke-width='0.6' stroke-opacity='0.08'/%3E%3Cpath d='M30 30h20v20H30zM35 35h10v10H35z' fill='%23A8332A' fill-opacity='0.05'/%3E%3Cpath d='M100 20 h60 v60 h-60 z M110 30 h40 v40 h-40 z' fill='none' stroke='%23C67E28' stroke-width='0.8' stroke-opacity='0.1' stroke-dasharray='4 2'/%3E%3Cpath d='M30 110 h50 v50 h-50 z M110 110 h50 v50 h-50 z' fill='none' stroke='%23A8332A' stroke-width='0.6' stroke-opacity='0.09'/%3E%3C/svg%3E"),
    linear-gradient(rgba(250, 244, 240, 0.94), rgba(250, 244, 240, 0.97));
  background-size: auto, 180px 180px, cover;
  background-position: top left, center, center;
  background-repeat: no-repeat, repeat, no-repeat;
}

/* 周三·水曜：烟雨江南水波涟漪、轻岚雨丝与澄澈天青 */
[data-theme="theme-wed"] .paper-bg {
  background-image:
    radial-gradient(ellipse at 75% 30%, rgba(43, 110, 103, 0.12) 0%, transparent 280px),
    url("data:image/svg+xml,%3Csvg width='240' height='200' viewBox='0 0 240 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='70' cy='60' rx='55' ry='16' fill='none' stroke='%232B6E67' stroke-width='0.8' stroke-opacity='0.13'/%3E%3Cellipse cx='70' cy='60' rx='35' ry='10' fill='none' stroke='%232B6E67' stroke-width='0.6' stroke-opacity='0.1'/%3E%3Cellipse cx='70' cy='60' rx='16' ry='5' fill='none' stroke='%235BA398' stroke-width='0.6' stroke-opacity='0.16'/%3E%3Cellipse cx='180' cy='140' rx='45' ry='13' fill='none' stroke='%232B6E67' stroke-width='0.8' stroke-opacity='0.12'/%3E%3Cellipse cx='180' cy='140' rx='25' ry='7' fill='none' stroke='%235BA398' stroke-width='0.6' stroke-opacity='0.14'/%3E%3Cpath d='M30 160 Q60 145 90 160 T150 160 M120 40 Q150 25 180 40 T240 40' fill='none' stroke='%232B6E67' stroke-width='0.6' stroke-opacity='0.09'/%3E%3C/svg%3E"),
    linear-gradient(rgba(242, 248, 246, 0.94), rgba(242, 248, 246, 0.97));
  background-size: auto, 240px 200px, cover;
  background-position: top right, center, center;
  background-repeat: no-repeat, repeat, no-repeat;
}

/* 周四·木曜：挺拔修竹幽篁竹影、竹简编纬与文人松竹雅骨 */
[data-theme="theme-thu"] .paper-bg {
  background-image:
    radial-gradient(circle at 15% 15%, rgba(58, 102, 67, 0.1) 0%, transparent 240px),
    url("data:image/svg+xml,%3Csvg width='220' height='260' viewBox='0 0 220 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='45' y1='0' x2='45' y2='260' stroke='%233A6643' stroke-width='2' stroke-opacity='0.12'/%3E%3Cline x1='43' y1='70' x2='47' y2='70' stroke='%233A6643' stroke-width='2.5' stroke-opacity='0.16'/%3E%3Cline x1='43' y1='150' x2='47' y2='150' stroke='%233A6643' stroke-width='2.5' stroke-opacity='0.16'/%3E%3Cline x1='43' y1='230' x2='47' y2='230' stroke='%233A6643' stroke-width='2.5' stroke-opacity='0.16'/%3E%3Cpath d='M45 70 C60 55 85 58 100 65 C85 68 70 72 45 70 Z' fill='%233A6643' fill-opacity='0.11'/%3E%3Cpath d='M45 70 C65 75 90 85 98 100 C85 95 70 85 45 70 Z' fill='%233A6643' fill-opacity='0.09'/%3E%3Cpath d='M45 150 C62 135 88 138 105 145 C90 148 72 152 45 150 Z' fill='%233A6643' fill-opacity='0.11'/%3E%3Cpath d='M160 30 C175 15 198 18 212 25 C198 28 182 32 160 30 Z' fill='%235A8864' fill-opacity='0.08'/%3E%3C/svg%3E"),
    linear-gradient(rgba(246, 248, 243, 0.94), rgba(246, 248, 243, 0.97));
  background-size: auto, 220px 260px, cover;
  background-position: top left, center, center;
  background-repeat: no-repeat, repeat, no-repeat;
}

/* 周五·金曜：钟鼎青铜云雷锦回纹、泥金宣纸与华美古卷 */
[data-theme="theme-fri"] .paper-bg {
  background-image:
    radial-gradient(circle at 80% 25%, rgba(140, 86, 39, 0.1) 0%, transparent 260px),
    url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20 h35 v35 h-18 v-18 h-17 v35 h52 V4 H4 v51 h16 z' fill='none' stroke='%238C5627' stroke-width='1' stroke-opacity='0.13'/%3E%3Cpath d='M100 20 h35 v35 h-18 v-18 h-17 v35 h52 V4 H84 v51 h16 z' fill='none' stroke='%238C5627' stroke-width='1' stroke-opacity='0.13'/%3E%3Cpath d='M20 100 h35 v35 h-18 v-18 h-17 v35 h52 V84 H4 v51 h16 z' fill='none' stroke='%238C5627' stroke-width='1' stroke-opacity='0.13'/%3E%3Cpath d='M100 100 h35 v35 h-18 v-18 h-17 v35 h52 V84 v51 h16 z' fill='none' stroke='%238C5627' stroke-width='1' stroke-opacity='0.13'/%3E%3Ccircle cx='70' cy='70' r='3' fill='%23B8803E' fill-opacity='0.18'/%3E%3C/svg%3E"),
    linear-gradient(rgba(250, 246, 238, 0.94), rgba(250, 246, 238, 0.97));
  background-size: auto, 160px 160px, cover;
  background-position: top right, center, center;
  background-repeat: no-repeat, repeat, no-repeat;
}

/* 周六·土曜：盛唐宝相团花锦绣、汉代瓦当古印与典雅素宣 */
[data-theme="theme-sat"] .paper-bg {
  background-image:
    radial-gradient(circle at 20% 80%, rgba(139, 44, 88, 0.08) 0%, transparent 240px),
    url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='100' cy='100' r='48' fill='none' stroke='%238B2C58' stroke-width='1' stroke-opacity='0.12' stroke-dasharray='4 3'/%3E%3Ccircle cx='100' cy='100' r='20' fill='%238B2C58' fill-opacity='0.05'/%3E%3Ccircle cx='100' cy='100' r='6' fill='%23BA5D3E' fill-opacity='0.18'/%3E%3Cpath d='M100 52 C90 75 90 85 100 95 C110 85 110 75 100 52 Z M100 148 C90 125 90 115 100 105 C110 115 110 125 100 148 Z M52 100 C75 90 85 90 95 100 C85 110 75 110 52 100 Z M148 100 C125 90 115 90 105 100 C115 110 125 110 148 100 Z' fill='%238B2C58' fill-opacity='0.09'/%3E%3C/svg%3E"),
    linear-gradient(rgba(253, 245, 246, 0.94), rgba(253, 245, 246, 0.97));
  background-size: auto, 200px 200px, cover;
  background-position: bottom left, center, center;
  background-repeat: no-repeat, repeat, no-repeat;
}

/* 周日·日曜：海棠春深落英缤纷、桃花花枝横斜与柔粉宣纸 */
[data-theme="theme-sun"] .paper-bg {
  background-image:
    radial-gradient(circle at 85% 15%, rgba(224, 90, 123, 0.15) 0%, transparent 280px),
    radial-gradient(circle at 15% 85%, rgba(244, 167, 185, 0.15) 0%, transparent 260px),
    url("data:image/svg+xml,%3Csvg width='260' height='260' viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 40 Q80 20 120 50 T200 45' fill='none' stroke='%237D5B68' stroke-width='1.2' stroke-opacity='0.14' stroke-linecap='round'/%3E%3Ccircle cx='75' cy='32' r='8' fill='%23E05A7B' fill-opacity='0.16'/%3E%3Ccircle cx='120' cy='50' r='7' fill='%23F4A7B9' fill-opacity='0.22'/%3E%3Ccircle cx='165' cy='42' r='6' fill='%23E05A7B' fill-opacity='0.15'/%3E%3Cpath d='M60 140 C65 130 75 130 80 135 C85 142 75 152 65 158 C55 152 48 142 52 135 C55 130 60 130 60 140 Z' fill='%23E05A7B' fill-opacity='0.14'/%3E%3Cpath d='M190 180 C194 172 202 172 206 176 C210 182 202 190 194 195 C186 190 180 182 184 176 C186 172 190 172 190 180 Z' fill='%23F4A7B9' fill-opacity='0.2'/%3E%3Cpath d='M130 210 C133 204 140 204 143 207 C147 212 140 218 134 222 C127 218 122 212 125 207 C127 204 130 204 130 210 Z' fill='%23E05A7B' fill-opacity='0.12'/%3E%3C/svg%3E"),
    linear-gradient(rgba(255, 248, 250, 0.94), rgba(253, 245, 247, 0.97));
  background-size: auto, auto, 260px 260px, cover;
  background-position: top right, bottom left, center, center;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
}

/* ============================================================
   七曜主题 · 卡片差异化装饰（每主题风骨各不相同）
   ============================================================ */

/* 周一·月曜：细边圆角轻雾如烟 */
[data-theme="theme-mon"] .painting-card,
[data-theme="theme-mon"] .author-link {
  border-radius: 3px;
  border-color: rgba(63, 94, 126, 0.16);
  box-shadow: 0 2px 12px rgba(45, 58, 75, 0.05);
}

/* 周二·火曜：金石小方角 + 右下角印章直角 + 硬阴影 */
[data-theme="theme-tue"] .painting-card,
[data-theme="theme-tue"] .author-link {
  border-radius: 2px;
  border-color: rgba(168, 51, 42, 0.22);
  box-shadow: 2px 2px 0 rgba(168, 51, 42, 0.08), 0 2px 12px rgba(58, 35, 32, 0.06);
  position: relative;
}
[data-theme="theme-tue"] .painting-card::after,
[data-theme="theme-tue"] .author-link::after {
  content: '';
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-right: 2px solid #A8332A;
  border-bottom: 2px solid #A8332A;
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

/* 周三·水曜：8px 大圆角磨砂玻璃水润轻柔 */
[data-theme="theme-wed"] .painting-card,
[data-theme="theme-wed"] .author-link {
  border-radius: 8px;
  border-color: rgba(43, 110, 103, 0.16);
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 周四·木曜：左侧主色粗边（竹简意象） */
[data-theme="theme-thu"] .painting-card,
[data-theme="theme-thu"] .author-link {
  border-radius: 3px;
  border-color: rgba(58, 102, 67, 0.18);
  border-left: 3px solid #3A6643;
}

/* 周五·金曜：outline 内嵌金色双线描边（青铜器描金） */
[data-theme="theme-fri"] .painting-card,
[data-theme="theme-fri"] .author-link {
  border-radius: 2px;
  border-color: rgba(140, 86, 39, 0.22);
  outline: 1px solid rgba(181, 132, 40, 0.15);
  outline-offset: -4px;
}

/* 周六·土曜：暖紫圆角轻影 */
[data-theme="theme-sat"] .painting-card,
[data-theme="theme-sat"] .author-link {
  border-radius: 6px;
  border-color: rgba(139, 44, 88, 0.18);
  box-shadow: 0 4px 16px rgba(139, 44, 88, 0.05);
}

/* 周日·日曜：桃粉白底圆角轻影 */
[data-theme="theme-sun"] .painting-card,
[data-theme="theme-sun"] .author-link {
  border-radius: 6px;
  border-color: rgba(224, 90, 123, 0.25);
  background-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 12px rgba(224, 90, 123, 0.08);
}

/* ============================================================
   七曜主题 · 品牌印章随曜变化（形状/颜色/光晕各具风骨）
   ============================================================ */
[data-theme] .ink-seal { font-size: 0; }
[data-theme] .ink-seal::before { font-size: 16px; }

[data-theme="theme-mon"] .ink-seal { background-color: #3F5E7E; border-radius: 50%; box-shadow: 0 0 8px rgba(63, 94, 126, 0.35); }
[data-theme="theme-mon"] .ink-seal::before { content: '月'; }
[data-theme="theme-tue"] .ink-seal { background-color: #A8332A; border-radius: 2px; box-shadow: 2px 2px 0 #7A1C14; }
[data-theme="theme-tue"] .ink-seal::before { content: '印'; }
[data-theme="theme-wed"] .ink-seal { background-color: #2B6E67; border-radius: 6px; box-shadow: 0 0 8px rgba(43, 110, 103, 0.3); }
[data-theme="theme-wed"] .ink-seal::before { content: '水'; }
[data-theme="theme-thu"] .ink-seal { background-color: #3A6643; border-radius: 3px; box-shadow: 0 0 6px rgba(58, 102, 67, 0.35); }
[data-theme="theme-thu"] .ink-seal::before { content: '竹'; }
[data-theme="theme-fri"] .ink-seal { background-color: #8C5627; border-radius: 2px; box-shadow: 0 0 6px rgba(181, 132, 40, 0.4); }
[data-theme="theme-fri"] .ink-seal::before { content: '金'; }
[data-theme="theme-sat"] .ink-seal { background-color: #8B2C58; border-radius: 4px; box-shadow: 0 0 8px rgba(186, 93, 62, 0.4); }
[data-theme="theme-sat"] .ink-seal::before { content: '锦'; }
[data-theme="theme-sun"] .ink-seal { background-color: #E05A7B; border-radius: 4px; box-shadow: 0 0 8px rgba(224, 90, 123, 0.4); }
[data-theme="theme-sun"] .ink-seal::before { content: '桃'; }

/* 七曜主题切换器与下拉浮层 */
.theme-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.theme-current-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
}
.theme-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 10px;
  z-index: 1000;
  display: none;
}
.theme-dropdown.open {
  display: block;
  animation: themeFadeIn 0.2s ease;
}
@keyframes themeFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.theme-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
  color: var(--ink-soft);
}
.theme-mode-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg-alt);
  color: var(--ink-soft);
}
.theme-mode-tag.is-auto {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.theme-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.theme-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}
.theme-item-btn:hover {
  background: var(--bg-alt);
  border-color: var(--border);
}
.theme-item-btn.active {
  background: var(--bg-alt);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.theme-swatch {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.theme-swatch.swatch-auto { background: #6b6358; }
.theme-swatch.swatch-mon { background: #3F5E7E; }
.theme-swatch.swatch-tue { background: #A8332A; }
.theme-swatch.swatch-wed { background: #2B6E67; }
.theme-swatch.swatch-thu { background: #3A6643; }
.theme-swatch.swatch-fri { background: #8C5627; }
.theme-swatch.swatch-sat { background: #8B2C58; }
.theme-swatch.swatch-sun { background: #E05A7B; }

.theme-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.theme-item-title {
  font-size: 13px;
  line-height: 1.2;
}
.theme-item-sub {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.theme-item-btn.active .theme-item-sub {
  color: var(--primary);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .theme-toggle-label {
    display: none;
  }
  .theme-dropdown {
    right: -40px;
    width: 240px;
  }
}