/* 成语大全 - 前台+后台共用样式（中国风 · 浅色） */
@font-face {
  font-family: 'MaShanZheng';
  src: url('fonts/MaShanZheng-Regular.ttf') format('truetype');
  font-display: swap;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f7f4ee; color: #333; line-height: 1.7; }
a { color: #b03a2e; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* 头部 */
.site-header { background: #fff; border-bottom: 1px solid #e8e2d6; position: sticky; top: 0; z-index: 10; }
.header-in { display: flex; align-items: center; gap: 20px; padding: 12px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: #2c2c2c; }
.logo:hover { text-decoration: none; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: #b03a2e; color: #fff; border-radius: 6px; font-family: "STKaiti", "KaiTi", serif; font-size: 20px; }
.search-bar { flex: 1; display: flex; min-width: 240px; }
.search-bar input { flex: 1; padding: 9px 14px; border: 2px solid #b03a2e; border-right: 0; border-radius: 6px 0 0 6px; font-size: 14px; outline: none; }
.search-bar button { padding: 0 22px; background: #b03a2e; color: #fff; border: 0; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 14px; }
.top-nav { display: flex; gap: 16px; margin-left: auto; }
.top-nav a { color: #666; font-size: 14px; }

/* 分类导航条 */
.cat-nav { background: linear-gradient(180deg, #b8402f, #a53424); box-shadow: 0 2px 6px rgba(120,40,25,.25); }
.cat-nav-in { display: flex; gap: 2px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.cat-nav-in::-webkit-scrollbar { display: none; }
.cat-nav-in a { color: rgba(255,244,230,.92); font-size: 15px; padding: 11px 18px; white-space: nowrap; letter-spacing: 1px; transition: background .15s; }
.cat-nav-in a:hover { background: rgba(0,0,0,.14); color: #fff; text-decoration: none; }
.cat-nav-in a.on { background: rgba(0,0,0,.20); color: #fff; font-weight: 700; box-shadow: inset 0 -3px 0 #f2d492; }

/* 首页：古书封面（蓝布函套 · 线装 · 题签 · 朱印） */
.hero-book {
  position: relative; text-align: center; margin-top: 26px;
  padding: 72px 28px 64px; min-height: 340px;
  border-radius: 8px; overflow: hidden; border: 1px solid #101f31;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 4px),
    linear-gradient(160deg, #33517a 0%, #24406b 45%, #1a2f4e 100%);
  box-shadow:
    inset 0 0 0 3px rgba(226,214,180,.14),
    inset 0 0 80px rgba(0,0,0,.38),
    0 16px 40px rgba(18,30,48,.45);
}
/* 线装缝线 */
.hero-book .stitch { position: absolute; left: 30px; top: 16px; bottom: 16px; width: 16px; }
.hero-book .stitch::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; border-left: 2px solid rgba(233,222,193,.5); }
.hero-book .stitch::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 22px, rgba(233,222,193,.85) 22px 26px, transparent 26px 48px);
}
/* 题签（书名） */
.hero-slip {
  position: absolute; left: 66px; top: 34px; z-index: 2; margin: 0;
  background: linear-gradient(180deg, #f9f3de, #efe5c4);
  border: 1px solid #cbb98d; border-radius: 2px;
  padding: 26px 12px 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.hero-slip::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; bottom: 6px; border-left: 2px solid rgba(143,45,28,.35); border-right: 2px solid rgba(143,45,28,.35); }
.hero-slip .slip-title {
  display: block; writing-mode: vertical-rl; letter-spacing: 12px;
  font-family: 'MaShanZheng', "STKaiti", "KaiTi", serif;
  font-size: 36px; line-height: 1.2; color: #8f2d1c;
}
.hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.hero-book .sub { position: relative; color: rgba(240,231,208,.85); margin: 0 0 28px; letter-spacing: 3px; font-size: 15px; }
.hero-book .big-search { box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.hero-book .big-search input { background: #fdf8ea; border-color: #e6d9b4; color: #3a2f22; }
.hero-book .big-search input::placeholder { color: #9a8c72; }
.hero-book .big-search button { background: linear-gradient(180deg, #c9a227, #a8841a); letter-spacing: 3px; }
.hero-book .big-search button:hover { background: #97780f; }
/* 朱红印章 */
.hero-seal {
  position: absolute; right: 36px; bottom: 30px; z-index: 2; width: 62px; height: 62px;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; justify-items: center;
  background: #b03024; color: #f6e7d0; border-radius: 6px; transform: rotate(6deg);
  font-family: 'MaShanZheng', "STKaiti", "KaiTi", serif; font-size: 22px; line-height: 1;
  box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 0 8px rgba(255,225,180,.35); opacity: .94;
}
.big-search { position: relative; max-width: 620px; margin: 0 auto; display: flex; box-shadow: 0 4px 16px rgba(176,58,46,.18); border-radius: 8px; }
.big-search input { flex: 1; padding: 14px 18px; font-size: 16px; border: 2px solid #b03a2e; border-right: 0; border-radius: 8px 0 0 8px; outline: none; background: #fffdf7; }
.big-search input::placeholder, .search-bar input::placeholder { color: #757575; opacity: 1; }
.big-search button { padding: 0 34px; font-size: 16px; background: linear-gradient(180deg,#bc4231,#a53424); color: #fff; border: 0; border-radius: 0 8px 8px 0; cursor: pointer; letter-spacing: 2px; white-space: nowrap; }
.big-search button:hover { background: #93301f; }

.block { margin: 30px 0; }
.block-title { font-family: "STKaiti", "KaiTi", serif; font-size: 21px; letter-spacing: 2px; border-left: 4px solid #b03a2e; padding-left: 12px; margin: 0 0 16px; color: #2c2c2c; }
.block-title .more { float: right; font-size: 13px; font-weight: 400; color: #6b6b6b; font-family: "Microsoft YaHei", sans-serif; letter-spacing: 0; }

.letter-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.letter-nav a { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #e5dfd2; border-radius: 6px; font-weight: 700; color: #2c2c2c; }
.letter-nav a:hover { background: #b03a2e; color: #fff; text-decoration: none; }

.chip-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-block; padding: 6px 16px; background: #fff; border: 1px solid #e5dfd2; border-radius: 999px; font-size: 14px; color: #555; }
.chip:hover { border-color: #b03a2e; color: #b03a2e; text-decoration: none; }

.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff; border: 1px solid #e8e2d6; border-radius: 10px; padding: 16px; }
.chain a { font-family: "STKaiti", "KaiTi", serif; font-size: 18px; color: #2c2c2c; }
.chain a:hover { color: #b03a2e; text-decoration: none; }
.chain .arrow { color: #b03a2e; }
.big-chain { font-size: 20px; line-height: 2.2; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { position: relative; background: #fffdf8; border: 1px solid #e8e0cd; border-top: 3px solid #b03a2e; border-radius: 8px; padding: 16px; display: block; color: inherit; transition: box-shadow .15s, transform .15s; }
.card:hover { text-decoration: none; box-shadow: 0 6px 16px rgba(176,58,46,.14); transform: translateY(-2px); }
.card h3 { margin: 0 0 4px; font-family: "STKaiti", "KaiTi", serif; font-size: 21px; letter-spacing: 2px; color: #a53424; }
.card .py { color: #6b6b6b; font-size: 12px; }
.card p { margin: 8px 0 0; font-size: 13px; color: #666; }

/* 面包屑 / 列表页 */
.crumbs { font-size: 13px; color: #6b6b6b; margin: 16px 0; }
.crumbs strong { color: #555; }
.page-title { font-family: "STKaiti", "KaiTi", serif; font-size: 26px; margin: 10px 0 4px; }
.count { color: #6b6b6b; font-size: 13px; margin-top: 0; }
.empty { color: #6b6b6b; padding: 30px 0; text-align: center; width: 100%; }

/* 内容页：3D 翻书字典 */
.book-scene { perspective: 2400px; perspective-origin: 50% 20%; margin: 18px 0 46px; }
.book { position: relative; }
.book-pages {
  position: relative;
  background: #fcf6e3;
  background-image:
    radial-gradient(ellipse at 20% 8%, rgba(190,160,110,.10), transparent 55%),
    radial-gradient(ellipse at 85% 92%, rgba(190,160,110,.08), transparent 50%);
  border: 1px solid #e2d4ae; border-radius: 3px 10px 10px 3px;
  box-shadow: inset 0 0 60px rgba(160,130,80,.14), 0 6px 18px rgba(110,85,45,.18);
}
/* 左侧书脊 */
.book-pages::before {
  content: ""; position: absolute; left: -8px; top: 3px; bottom: 3px; width: 8px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, #93815a, #c6b689);
  box-shadow: inset 0 0 6px rgba(60,45,20,.4);
}
/* 右侧纸页叠边 */
.book-pages::after {
  content: ""; position: absolute; right: -8px; top: 5px; bottom: 5px; width: 8px;
  border-radius: 0 4px 4px 0;
  background: repeating-linear-gradient(180deg, #f2e9cf 0 2px, #dccca4 2px 4px);
}
.book-page { position: relative; padding: 34px 40px 30px; }
.book:not(.book-js) .book-page + .book-page { border-top: 1px dashed #ddd0b4; }
.pgno { position: absolute; bottom: 8px; right: 18px; font-size: 11px; color: #a5946e; letter-spacing: 2px; }

/* 翻页模式（JS 启用后各板块变成可翻书页） */
.book-js .book-page {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 34px 40px 30px;
  transform-origin: left center; backface-visibility: hidden;
  background: #fcf6e3;
  background-image:
    radial-gradient(ellipse at 20% 8%, rgba(190,160,110,.10), transparent 55%),
    radial-gradient(ellipse at 85% 92%, rgba(190,160,110,.08), transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(150,120,70,.055) 31px 32px);
}
.book-js .book-page.cur { z-index: 3; }
.book-js .book-page.under { z-index: 2; }
.book-js .book-page.lift { z-index: 6; animation: pageOut .55s ease-in forwards; box-shadow: -14px 10px 26px rgba(90,65,30,.35); }
.book-js .book-page.drop { z-index: 6; animation: pageIn .55s ease-out; box-shadow: -14px 10px 26px rgba(90,65,30,.35); }
@keyframes pageOut { to { transform: rotateY(-160deg); opacity: 0; } }
@keyframes pageIn { from { transform: rotateY(-160deg); opacity: 0; } to { transform: rotateY(0); opacity: 1; } }

/* 翻页控件 */
.book-nav {
  position: absolute; top: 50%; margin-top: -24px; width: 46px; height: 46px;
  border-radius: 50%; background: #fffdf4; border: 1px solid #d9c9a0; color: #8f2d1c;
  font-size: 24px; line-height: 44px; text-align: center; padding: 0; cursor: pointer; z-index: 8;
  box-shadow: 0 3px 10px rgba(110,85,45,.28); font-family: Georgia, "Times New Roman", serif;
}
.book-nav:hover { background: #b03a2e; border-color: #b03a2e; color: #fff; }
.book-nav[disabled] { opacity: .35; pointer-events: none; }
.book-nav.prev { left: -24px; }
.book-nav.next { right: -24px; }
.book-pager {
  position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap;
  font-size: 13px; color: #8a7b5f; background: #fffdf4; border: 1px solid #e2d4ae;
  border-radius: 999px; padding: 3px 16px; letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(110,85,45,.15);
}

.detail-head { text-align: center; position: relative; }
.detail-head h1 { margin: 0; }
.detail-head .py { font-size: 16px; color: #6f6045; margin: 12px 0 6px; letter-spacing: 2px; }
.idiom-fig { margin: 18px auto 4px; text-align: center; }
.idiom-fig img { max-width: 320px; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 3px 12px rgba(120,95,50,.20); border: 1px solid #e3d5b5; }

/* 田字格标题 */
.tzg-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.tzg {
  position: relative; width: 66px; height: 66px; box-sizing: border-box;
  border: 2px solid #b03a2e; border-radius: 2px; background: #fffdf4;
  display: flex; align-items: center; justify-content: center;
  font-family: "STKaiti", "KaiTi", "楷体", serif; font-size: 40px; line-height: 1;
  color: #2b2b2b; text-shadow: 0 1px 0 rgba(0,0,0,.06);
  box-shadow: 0 2px 5px rgba(140,110,60,.15), inset 0 0 12px rgba(190,160,110,.12);
}
.tzg::before, .tzg::after { content: ""; position: absolute; pointer-events: none; }
.tzg::before { left: 3px; right: 3px; top: 50%; border-top: 1px dashed rgba(176,58,46,.55); }
.tzg::after { top: 3px; bottom: 3px; left: 50%; border-left: 1px dashed rgba(176,58,46,.55); }

/* 首字印章 */
.seal {
  position: absolute; top: -6px; right: 0;
  width: 46px; height: 46px; border-radius: 6px;
  background: #b03a2e; color: #fdf6e3;
  display: flex; align-items: center; justify-content: center;
  font-family: "STKaiti", "KaiTi", serif; font-size: 26px;
  transform: rotate(4deg);
  box-shadow: 0 2px 6px rgba(176,58,46,.35), inset 0 0 6px rgba(255,235,200,.35);
  opacity: .92;
}

/* 书页正文排版 */
.book-page .sec p, .book-page .liju { font-family: "STKaiti", "KaiTi", serif; font-size: 17px; line-height: 2; color: #4a4136; }
.book-page .sec h2 { font-family: "STKaiti", "KaiTi", serif; font-size: 18px; letter-spacing: 2px; color: #9c3524; margin: 0 0 8px; padding-left: 10px; border-left: 3px solid #b03a2e; }
.book-page .liju li { border-bottom: 1px dashed #ddd0b4; padding: 6px 0; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 12px; color: #6b6b6b; border-bottom: 1px dashed #e8e2d6; padding-bottom: 14px; }
.terms a { color: #b03a2e; text-decoration: none; border-bottom: 1px dashed #d8b4ae; }
.terms a:hover { color: #8e2b21; border-bottom-style: solid; }
.meta span { background: #f7f4ee; border-radius: 4px; padding: 2px 10px; }
.meta .ai-tag { background: #eef4ff; color: #4a72c4; }
.sec { margin: 20px 0; }
.sec h2 { font-size: 16px; color: #b03a2e; margin: 0 0 8px; }
.sec p { margin: 0; white-space: pre-wrap; }
.liju { margin: 0; padding-left: 20px; }
.liju li { margin: 4px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.story { background: #fbf9f4; border: 1px solid #efe9db; border-radius: 10px; padding: 18px 22px; }

.side { background: #fff; border: 1px solid #e8e2d6; border-radius: 12px; padding: 20px 24px; margin-bottom: 30px; }
.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-list li { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed #f0ebe0; padding: 8px 0; }
.rel-list li a { font-family: "STKaiti", "KaiTi", serif; font-size: 17px; }
.rel-list .py { font-size: 12px; color: #6b6b6b; }
.actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 900px) {
  .detail-and-side { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
  .book-col { min-width: 0; }
}

/* 分页 */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; background: #fff; border: 1px solid #e5dfd2; border-radius: 6px; font-size: 14px; color: #555; }
.pagination a:hover { border-color: #b03a2e; color: #b03a2e; text-decoration: none; }
.pagination .cur { background: #b03a2e; border-color: #b03a2e; color: #fff; }

/* 页脚 */
.site-footer { border-top: 1px solid #e8e2d6; background: #fff; margin-top: 40px; padding: 22px 0; color: #6b6b6b; font-size: 13px; text-align: center; }
.footer-links { margin: 0 0 14px; line-height: 2.1; }
.footer-links .fl-title { color: #8a7f6f; letter-spacing: 1px; }
.footer-links a { margin: 0 5px; color: #6b6b6b; }
.footer-links a:hover { color: #b03a2e; }
.footer-links .fl-more { color: #b03a2e; }

/* 友情链接页 */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.link-list li a { display: block; padding: 11px 14px; background: #fff; border: 1px solid #e8e2d6; border-radius: 8px; font-size: 14px; color: #4a3f33; text-align: center; transition: border-color .12s, color .12s; }
.link-list li a:hover { border-color: #b03a2e; color: #b03a2e; text-decoration: none; }
.apply-card { background: #fff; border: 1px solid #e8e2d6; border-radius: 12px; padding: 18px 22px; font-size: 14px; line-height: 1.95; color: #4a3f33; }
.apply-card p { margin: 6px 0; }
.apply-card ul { margin: 8px 0; padding-left: 22px; }
.apply-card li { margin: 3px 0; }

/* 404 */
.empty-page { text-align: center; padding: 80px 0; }
.empty-page h1 { font-size: 80px; margin: 0; color: #e5dfd2; }

/* flash */
.flash { padding: 10px 16px; border-radius: 8px; margin: 14px 0; font-size: 14px; }
.flash.ok { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.flash.err { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }

/* ===== 后台 ===== */
body.admin { background: #f4f2ec; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
.admin-shell { display: flex; min-height: 100vh; }

/* 侧边栏 */
.admin-side { width: 216px; background: #2b2320; color: #b9aea2; flex-shrink: 0; display: flex; flex-direction: column; }
.admin-side .brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; color: #f3ead9; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.07); }
.admin-side .brand:hover { text-decoration: none; }
.admin-side .brand .mark { width: 36px; height: 36px; flex-shrink: 0; background: #b03a2e; color: #fdf6e3; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: "STKaiti", "KaiTi", serif; font-size: 22px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.admin-side .brand b { font-size: 15px; font-weight: 600; letter-spacing: 1px; display: block; }
.admin-side .brand small { display: block; font-size: 11px; color: #8d8175; font-weight: 400; margin-top: 2px; letter-spacing: 0; }
.menu-group { padding: 14px 18px 4px; font-size: 11px; color: #7a6e62; letter-spacing: 2px; }
.admin-side a.menu { display: flex; align-items: center; gap: 9px; padding: 10px 18px; color: #c9beb0; font-size: 14px; border-left: 3px solid transparent; transition: background .12s, color .12s; }
.admin-side a.menu::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #6b5f53; flex-shrink: 0; transition: background .12s; }
.admin-side a.menu:hover { background: rgba(255,255,255,.05); text-decoration: none; color: #f3ead9; }
.admin-side a.menu:hover::before { background: #d8c9b4; }
.admin-side a.menu.cur { background: rgba(176,58,46,.16); border-left-color: #c9483a; color: #fff; }
.admin-side a.menu.cur::before { background: #e0a494; }
.admin-side .side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.07); padding: 6px 0 12px; }

/* 主区 */
.admin-main { flex: 1; padding: 22px 30px 40px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid #e5dfd0; }
.admin-top h1 { font-family: "STKaiti", "KaiTi", serif; font-size: 24px; margin: 0; color: #33291f; letter-spacing: 2px; }
.admin-top .who { color: #8a7f6f; font-size: 13px; }
.admin-top .who b { color: #b03a2e; font-weight: 600; }

/* 面板 */
.panel { background: #fffdf8; border: 1px solid #e9e2d2; border-radius: 10px; padding: 22px 24px; box-shadow: 0 1px 4px rgba(120,100,60,.06); margin-bottom: 20px; }
.panel > h3:first-child { font-family: "STKaiti", "KaiTi", serif; font-size: 18px; color: #33291f; letter-spacing: 2px; margin: 0 0 14px; padding-left: 11px; border-left: 3px solid #b03a2e; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { background: #fffdf8; border: 1px solid #e9e2d2; border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(120,100,60,.06); }
.stat b { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 700; color: #b03a2e; }
.stat span { font-size: 13px; color: #8a7f6f; letter-spacing: 1px; }

/* 表格 */
table.tb { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tb th, table.tb td { text-align: left; padding: 10px 10px; border-bottom: 1px solid #f0ebdd; vertical-align: middle; }
table.tb th { color: #8a7f6f; font-weight: 600; font-size: 13px; letter-spacing: 1px; background: #faf6ec; border-bottom: 1px solid #e9e2d2; white-space: nowrap; }
table.tb tbody tr:hover { background: #faf6ec; }
table.tb td .ops a { margin-right: 10px; white-space: nowrap; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 20px; border: 1px solid #a53424; border-radius: 6px; background: linear-gradient(180deg, #b8402f, #a23223); color: #fff; font-size: 14px; letter-spacing: 1px; cursor: pointer; transition: filter .12s; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.gray { background: linear-gradient(180deg, #8a8478, #6f6a5f); border-color: #6f6a5f; }
.btn.green { background: linear-gradient(180deg, #4a7c3f, #3c6a33); border-color: #3c6a33; }
.btn.sm { padding: 4px 12px; font-size: 12px; }

/* 友情链接管理（行内编辑） */
.link-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.link-add input.f[name=name] { width: 200px; }
.link-add input.f[name=url] { flex: 1; min-width: 260px; }
.link-add input.f[name=sort] { width: 78px; }
.inline-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #6f6557; white-space: nowrap; }
.lk-row { display: grid; grid-template-columns: 46px 170px minmax(200px, 1fr) 74px 52px 74px 132px; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #f0ebdd; margin: 0; font-size: 14px; }
.lk-row.lk-head { background: #faf6ec; color: #8a7f6f; font-size: 12px; letter-spacing: 1px; border-bottom: 1px solid #e9e2d2; }
.lk-row:hover { background: #faf6ec; }
.lk-row .lk-id { color: #a89c8b; font-size: 13px; }
.lk-row .f { padding: 6px 9px; }
.lk-row .ops { display: flex; gap: 6px; }
.lk-row .chk { display: flex; align-items: center; justify-content: center; }
.hint { color: #8a7f6f; font-size: 12px; margin: 10px 0 0; line-height: 1.7; }
@media (max-width: 860px) {
  .lk-row { grid-template-columns: 1fr 1fr; }
  .lk-row.lk-head { display: none; }
  .lk-row .lk-id { display: none; }
  .lk-row .ops { grid-column: 1 / -1; }
}

/* 表单 */
input.f, select.f, textarea.f { width: 100%; padding: 9px 12px; border: 1px solid #d8d2c2; border-radius: 6px; font-size: 14px; font-family: inherit; background: #fffdf9; transition: border-color .12s, box-shadow .12s; }
input.f:focus, select.f:focus, textarea.f:focus { outline: none; border-color: #b03a2e; box-shadow: 0 0 0 3px rgba(176,58,46,.10); }
textarea.f { min-height: 90px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #6f6557; margin-bottom: 5px; letter-spacing: 1px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* AI 进度/日志 */
.progress { height: 10px; background: #efe9db; border-radius: 999px; overflow: hidden; margin: 12px 0; }
.progress b { display: block; height: 100%; background: linear-gradient(90deg, #b8402f, #d4653f); width: 0; transition: width .3s; }
#log { max-height: 260px; overflow-y: auto; font-size: 13px; background: #2b2320; color: #d8cfc2; border-radius: 8px; padding: 14px 16px; margin-top: 12px; display: none; font-family: Consolas, "Courier New", monospace; }

/* 登录页 */
.login-box { max-width: 380px; margin: 90px auto; background: #fffdf8; border: 1px solid #e9e2d2; border-radius: 12px; padding: 36px; box-shadow: 0 10px 30px rgba(120,95,50,.12); }
.login-box .login-mark { width: 56px; height: 56px; margin: 0 auto 14px; background: #b03a2e; color: #fdf6e3; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: "STKaiti", "KaiTi", serif; font-size: 32px; box-shadow: 0 4px 10px rgba(176,58,46,.3); }
.login-box h1 { text-align: center; color: #33291f; font-family: "STKaiti", "KaiTi", serif; font-size: 24px; letter-spacing: 4px; margin: 0 0 24px; }
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .hero-book { padding: 46px 18px 54px; min-height: 0; }
  .hero-slip { position: static; display: inline-block; margin: 0 auto 20px; padding: 12px 20px; }
  .hero-slip .slip-title { writing-mode: horizontal-tb; letter-spacing: 8px; font-size: 30px; }
  .hero-book .stitch { display: none; }
  .hero-inner { padding-bottom: 46px; }
  .hero-book .big-search button { padding: 0 18px; }
  .hero-seal { width: 50px; height: 50px; font-size: 17px; right: 14px; bottom: 14px; }
  .book-page, .book-js .book-page { padding: 24px 18px 28px; }
  .book-nav { width: 38px; height: 38px; line-height: 36px; font-size: 20px; margin-top: -19px; }
  .book-nav.prev { left: -18px; }
  .book-nav.next { right: -18px; }
  .tzg { width: 52px; height: 52px; font-size: 31px; }
  .tzg-row { gap: 8px; }
  .seal { width: 38px; height: 38px; font-size: 21px; }
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; display: flex; overflow-x: auto; }
  .admin-side .brand { display: none; }
  .admin-side a.menu { white-space: nowrap; }
}
