/* ============================================================
   书语阁 · 全站公共样式（设计系统）
   说明：本文件由原 book_index.html 的 <style> 迁移而来，
        是全站所有页面统一沿用的视觉基线（变量 / 页头 / 卡片 / 栅格 / 响应式）。
   维护：如需改动全站配色或卡片尺寸，只改这里。
   ============================================================ */

    /* ========== 全局变量 ========== */
    :root {
      --primary: #1a5276;
      --primary-light: #2980b9;
      --bg: #f5f7fa;
      --card-bg: #ffffff;
      --text: #2c3e50;
      --text-secondary: #7f8c8d;
      --gold: #f39c12;
      --danger: #e74c3c;
      --radius: 8px;
      --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
      --header-height: 64px;
    }

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

    body {
      font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
      background: var(--bg);
      color: var(--text);
      font-size: 14px;
      line-height: 1.6;
    }

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

    /* ========== 页头 ========== */
    .header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: #fff;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .header-inner {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 16px;
      height: var(--header-height);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .logo {
      flex: 0 0 180px;
      font-size: 24px;
      font-weight: 700;
      color: var(--primary);
      letter-spacing: 1px;
    }
    .logo span { color: var(--primary-light); }

    .search-box {
      flex: 1;
      display: flex;
      justify-content: center;
      padding: 0 24px;
    }
    .search-wrap {
      width: 100%;
      max-width: 560px;
      display: flex;
      border: 2px solid var(--primary-light);
      border-radius: 24px;
      overflow: hidden;
      background: #fff;
      transition: box-shadow 0.2s;
    }
    .search-wrap:focus-within {
      box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.2);
    }
    .search-wrap input {
      flex: 1;
      border: none;
      outline: none;
      padding: 10px 18px;
      font-size: 14px;
      background: transparent;
    }
    .search-wrap button {
      border: none;
      background: var(--primary-light);
      color: #fff;
      padding: 0 24px;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.2s;
    }
    .search-wrap button:hover { background: var(--primary); }

    .user-actions {
      flex: 0 0 180px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
    }
    .btn {
      display: inline-block;
      padding: 7px 18px;
      border-radius: 20px;
      font-size: 13px;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }
    .btn-login {
      color: var(--primary);
      border: 1px solid var(--primary);
      background: transparent;
    }
    .btn-login:hover { background: var(--primary); color: #fff; }
    .btn-register {
      background: var(--primary);
      color: #fff;
      border: 1px solid var(--primary);
    }
    .btn-register:hover {
      background: var(--primary-light);
      border-color: var(--primary-light);
    }

    /* ========== 主导航 ========== */
    .main-nav {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 16px;
      display: flex;
      gap: 28px;
      border-top: 1px solid #eee;
      height: 44px;
      align-items: center;
      overflow-x: auto;
      white-space: nowrap;
    }
    .main-nav a {
      font-size: 14px;
      color: var(--text-secondary);
      padding: 4px 0;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
    }
    .main-nav a:hover,
    .main-nav a.active {
      color: var(--primary-light);
      border-bottom-color: var(--primary-light);
    }

    /* ========== 主体容器 ========== */
    .container {
      max-width: 1280px;
      margin: 0 auto;
      padding: 20px 16px 40px;
    }

    /* ========== 轮播 ========== */
    .banner {
      position: relative;
      height: 340px;
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 24px;
      box-shadow: var(--shadow);
    }
    .banner-slide {
      position: absolute;
      inset: 0;
      opacity: 0;
      transition: opacity 0.8s ease;
      display: flex;
      align-items: center;
      padding: 0 60px;
      color: #fff;
    }
    .banner-slide.active { opacity: 1; z-index: 1; }
    .banner-slide:nth-child(1) {
      background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
    }
    .banner-slide:nth-child(2) {
      background: linear-gradient(135deg, #6c3483 0%, #a569bd 100%);
    }
    .banner-slide:nth-child(3) {
      background: linear-gradient(135deg, #b03a2e 0%, #e67e22 100%);
    }
    .banner-content { max-width: 520px; }
    .banner-content .tag {
      display: inline-block;
      background: rgba(255, 255, 255, 0.2);
      padding: 3px 12px;
      border-radius: 12px;
      font-size: 12px;
      margin-bottom: 12px;
    }
    .banner-content h2 {
      font-size: 30px;
      margin-bottom: 8px;
      font-weight: 700;
    }
    .banner-content .author {
      font-size: 14px;
      opacity: 0.85;
      margin-bottom: 12px;
    }
    .banner-content p {
      font-size: 14px;
      opacity: 0.9;
      margin-bottom: 20px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .banner-actions { display: flex; gap: 12px; }
    .banner-actions .btn-primary {
      background: #fff;
      color: var(--primary);
      font-weight: 600;
      padding: 9px 24px;
    }
    .banner-actions .btn-outline {
      border: 1px solid #fff;
      color: #fff;
      background: transparent;
      padding: 9px 24px;
    }
    .banner-actions .btn-outline:hover { background: rgba(255, 255, 255, 0.15); }
    .banner-dots {
      position: absolute;
      bottom: 16px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 8px;
      z-index: 2;
    }
    .banner-dots span {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.5);
      cursor: pointer;
      transition: background 0.3s;
    }
    .banner-dots span.active {
      background: #fff;
      transform: scale(1.2);
    }

    /* ============================================================
       ★ m12493 需求 24：首页轮播「手动左右切换 + 视频」
       ------------------------------------------------------------
       层级：.banner-slide.active 是 z-index:1，所以箭头必须 ≥2，
       否则被当前幻灯片盖住点不到；dots 也是 2，靠 bottom 错开不重叠。
       ============================================================ */
    .banner-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 3;
      width: 40px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      border: none;
      border-radius: 8px;
      background: rgba(0, 0, 0, 0.28);
      color: #fff;
      font-size: 26px;
      line-height: 1;
      cursor: pointer;
      transition: background 0.25s, transform 0.25s, opacity 0.25s;
      opacity: 0.72;
      -webkit-tap-highlight-color: transparent;
    }
    .banner-nav:hover { background: rgba(0, 0, 0, 0.48); opacity: 1; }
    .banner-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    .banner-nav.prev { left: 14px; }
    .banner-nav.next { right: 14px; }

    /* 视频轮播：视频铺满整条，文案仍压在视频上面 */
    .banner-slide.is-video { padding: 0; }
    .banner-video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: 0;
      background: #000;
    }
    .banner-slide.is-video .banner-content {
      position: relative;
      z-index: 1;
      margin-left: 46px;
      text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
    }

    /* ============================================================
       ★ 三栏主布局（三栏底部对齐 · 无多余留白）
       ============================================================ */
    .main-layout {
      display: flex;
      gap: 20px;
      align-items: stretch;          /* 三栏等高，底部自动对齐 */
    }

    /* 左栏：列高完全由中/右栏决定，面板绝对定位填满 → 不会被分类树撑高整行 */
    .content-left {
      flex: 0 0 168px;
      min-width: 0;
      position: relative;
    }

    .content-center {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
    }

    .content-right {
      flex: 0 0 300px;
      min-width: 0;
      display: flex;
      flex-direction: column;
    }

    /* ========== 通用卡片 ========== */
    .card {
      background: var(--card-bg);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 18px 20px;
      margin-bottom: 20px;
    }
    .card:last-child { margin-bottom: 0; }
    .card-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .card-title .more {
      font-size: 12px;
      color: var(--text-secondary);
      font-weight: 400;
      cursor: pointer;
    }
    .card-title .more:hover { color: var(--primary-light); }

    .content-center .card { padding: 24px 28px; }
    .content-center .card-title { margin-bottom: 20px; }

    /* ★ 底部对齐：中栏最后一张卡（公告）撑满剩余高度 */
    .content-center .notice-card { flex: 1; }
    /* ★ 底部对齐：右栏最后一张卡（推优书籍）撑满剩余高度 */
    .content-right .card:last-child { flex: 1; }

    /* ============================================================
       ★ 左栏：作品分类筛选器（面板填满整列，内部滚动）
       ============================================================ */
    .content-left .filter-widget {
      position: absolute;
      top: 0; right: 0; bottom: 0; left: 0;
    }

    .filter-widget {
      background: #fff;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    .filter-header {
      background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
      color: #fff;
      padding: 12px 10px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 14px;
      font-weight: 600;
      flex-shrink: 0;
    }
    .filter-header .left-icon {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .filter-header .menu-icon {
      font-size: 16px;
      line-height: 1;
    }
    .filter-header .arrow {
      font-size: 10px;
      opacity: 0.8;
      cursor: pointer;
      transition: transform .25s;
      user-select: none;
    }

    .filter-tabs {
      display: flex;
      border-bottom: 1px solid #eee;
      padding: 0 4px;
      flex-shrink: 0;
      background: #fff;
    }
    .filter-tabs span {
      flex: 1;
      text-align: center;
      padding: 10px 0;
      font-size: 12px;
      color: var(--text-secondary);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
      user-select: none;
    }
    .filter-tabs span.active {
      color: var(--danger);
      border-bottom-color: var(--danger);
      font-weight: 600;
    }
    .filter-tabs span:hover { color: var(--danger); }

    /* 分类查找框 */
    .filter-toolbar {
      padding: 8px 8px 0;
      flex-shrink: 0;
    }
    .filter-toolbar input {
      width: 100%;
      border: 1px solid #e3e8ee;
      border-radius: 5px;
      padding: 5px 9px;
      font-size: 12px;
      outline: none;
      background: #f8fafc;
      transition: all .2s;
      font-family: inherit;
      color: var(--text);
    }
    .filter-toolbar input::placeholder { color: #b6c0ca; }
    .filter-toolbar input:focus {
      border-color: var(--primary-light);
      background: #fff;
      box-shadow: 0 0 0 2px rgba(41, 128, 185, .12);
    }

    /* ★ 分类树主体：填满剩余空间 + 内部下滑滚动（轻小说之后的分类靠下滑查看） */
    .filter-body {
      padding: 6px 8px 12px;
      overflow-y: auto;
      flex: 1 1 0;
      min-height: 0;
      overscroll-behavior: contain;
    }

    .cat-group {
      border-bottom: 1px dashed #eef1f4;
      padding: 5px 0;
    }
    .cat-group:last-child { border-bottom: none; }

    .cat-head {
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      padding: 3px 3px;
      border-radius: 4px;
      transition: background .18s;
      user-select: none;
    }
    .cat-head:hover { background: #f2f7fb; }

    .cat-arrow {
      font-size: 9px;
      color: #b0bac4;
      transition: transform .25s;
      flex-shrink: 0;
      width: 9px;
      display: inline-block;
      text-align: center;
    }
    .cat-group.open .cat-arrow {
      transform: rotate(90deg);
      color: var(--primary-light);
    }

    .cat-name {
      font-size: 12.5px;
      font-weight: 600;
      color: #2c3e50;
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color .18s;
    }
    .cat-group.open .cat-name { color: var(--primary-light); }

    .cat-count {
      font-size: 10px;
      color: #b6c0ca;
      flex-shrink: 0;
      background: #f2f5f8;
      border-radius: 8px;
      padding: 0 5px;
      line-height: 15px;
      min-width: 18px;
      text-align: center;
    }

    .cat-subs {
      display: none;
      flex-wrap: wrap;
      gap: 4px;
      padding: 5px 0 4px 13px;
    }
    .cat-group.open .cat-subs { display: flex; }

    .cat-subs span {
      font-size: 11.5px;
      color: var(--text-secondary);
      padding: 2px 6px;
      border-radius: 4px;
      cursor: pointer;
      border: 1px solid transparent;
      background: #f5f8fa;
      transition: all .16s;
      white-space: nowrap;
      line-height: 1.5;
    }
    .cat-subs span:hover {
      color: #fff;
      background: var(--primary-light);
      border-color: var(--primary-light);
      transform: translateY(-1px);
    }
    .cat-subs span.active {
      color: #fff;
      background: #2c3e50;
      border-color: #2c3e50;
      font-weight: 600;
    }

    .cat-empty {
      text-align: center;
      color: #b6c0ca;
      font-size: 12px;
      padding: 24px 0;
    }

    /* 滚动条 */
    .filter-body::-webkit-scrollbar { width: 4px; }
    .filter-body::-webkit-scrollbar-thumb {
      background: #cfd8e0;
      border-radius: 2px;
    }
    .filter-body::-webkit-scrollbar-thumb:hover { background: #b0bac4; }
    .filter-body::-webkit-scrollbar-track { background: transparent; }

    /* ★ 折叠态：面板脱离绝对定位，避免留下一大片空白 */
    .content-left.collapsed { align-self: flex-start; }
    .content-left.collapsed .filter-widget {
      position: static;
      height: auto;
    }

    /* ============================================================
       ★ 中栏：编辑推荐
       ============================================================ */
    .book-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
    }

    .book-card {
      display: flex;
      gap: 12px;
      background: #fff;
      border-radius: var(--radius);
      padding: 12px;
      box-shadow: var(--shadow);
      cursor: pointer;
      transition: box-shadow 0.25s, transform 0.25s;
      min-height: 136px;
    }
    .book-card:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-hover);
    }

    /* ---------- ★ 需求 1：编辑推荐选框（#recommendGrid 的 .book-grid） ----------
       目标：卡片把书籍「完全包裹」，左右两侧留出明确间距、互不粘连。
       注意：.book-grid 仅用于首页编辑推荐；社区/搜索用 .bk-book-grid，
             所以这里的作用域是 .book-grid，不会影响其它页面。 */
    .book-grid {
      gap: 16px 18px;                      /* 行间距 16px / 列间距 18px */
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: stretch;
    }
    .book-grid .book-card {
      min-width: 0;                        /* 关键：防长书名把栅格撑破导致左右粘连 */
      min-height: 152px;
      padding: 14px;
      overflow: hidden;
      position: relative;
      border: 1px solid #e8eef4;
      border-radius: 12px;
      box-shadow: 0 2px 10px rgba(16, 42, 67, .06);
      transition: box-shadow .25s, transform .25s, border-color .25s;
    }
    .book-grid .book-card::after {        /* 内描边收口，保证左右留白视觉一致 */
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 12px;
      pointer-events: none;
      box-shadow: inset 0 0 0 1px rgba(41, 128, 185, .10);
    }
    .book-grid .book-card:hover {
      transform: translateY(-2px);
      border-color: rgba(41, 128, 185, .35);
      box-shadow: 0 10px 26px rgba(16, 42, 67, .13);
    }
    .book-grid .book-card .book-info {
      min-width: 0;
      display: flex;
      flex-direction: column;
      flex: 1 1 auto;
    }
    .book-grid .book-card .intro {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* ---------- ★ 需求 7：编辑推荐展示「7 日点击量」 ----------
       ★ 本轮（m09564）：按需求「仅保留数字」——去掉 📈 图标与「7 日点击」文字，
       只显示数字本身；并保证数字完整落在卡片内（可收缩、不换行、不撑破格子）。 */
    .week-click {
      margin-top: auto;
      padding-top: 6px;
      font-size: 12px;
      color: #1a7f4b;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
      white-space: nowrap;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }
    .week-click b { font-size: 13px; font-weight: 700; }
    .book-cover {
      flex: 0 0 84px;
      width: 84px;
      height: 112px;
      border-radius: 6px;
      background: linear-gradient(135deg, #2980b9, #1a5276);
      position: relative;
      overflow: hidden;
      align-self: flex-start;
      flex-shrink: 0;
    }
    .book-cover::before {
      content: attr(data-char);
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      color: #fff;
      font-weight: 600;
      z-index: 0;
    }
    .book-cover .cover-img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: 1;
      display: block;
    }
    .book-cover .badge {
      position: absolute;
      top: 0;
      right: 0;
      background: var(--gold);
      color: #fff;
      font-size: 11px;
      padding: 2px 6px;
      border-top-right-radius: 6px;
      border-bottom-left-radius: 6px;
      z-index: 2;
    }

    .book-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 4px;
    }
    .book-info h4 {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .book-info .meta {
      font-size: 12px;
      color: #999;
      margin-bottom: 6px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .book-info .meta .dot { margin: 0 4px; color: #ddd; }
    .book-info .intro {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.6;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      margin-bottom: 8px;
      flex: 1;
    }
    .book-info .foot {
      font-size: 12px;
      color: #aaa;
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      overflow: hidden;
      margin-top: auto;
    }
    .book-info .foot .sep { color: #ddd; }
    .book-info .foot .chapter {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .grid-empty {
      grid-column: 1 / -1;
      text-align: center;
      padding: 48px 0;
      color: #b6c0ca;
      font-size: 13px;
      line-height: 2;
    }
    .grid-empty strong {
      display: block;
      font-size: 15px;
      color: var(--text-secondary);
      margin-bottom: 4px;
    }

    /* ============================================================
       ★ 中栏：最新更新
       ============================================================ */
    .update-list li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 4px;
      border-bottom: 1px solid #f0f0f0;
      font-size: 13px;
      gap: 12px;
      transition: background 0.2s;
    }
    .update-list li:last-child { border-bottom: none; }
    .update-list li:hover { background: #fafbfc; }
    .update-list .book-name {
      font-weight: 600;
      color: var(--primary);
      flex: 0 0 120px;
    }
    /* ★ 第 55 轮（m02642）：最新更新改成「一本书一行」后，这一列的内容由章节名换成**作者**
       —— 类名沿用 .chapter 不动（book_responsive.css 的手机端规则也按这个类写的）。 */
    .update-list .chapter {
      flex: 1;
      color: var(--text-secondary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
    }
    .update-list .time {
      font-size: 12px;
      color: #aaa;
      flex-shrink: 0;
      min-width: 72px;
      text-align: right;
    }

    /* ============================================================
       ★ 中栏：公告
       ============================================================ */
    .notice-card { margin-top: 20px; }
    .notice-list {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 32px;
      align-content: flex-start;
    }
    .notice-list li {
      font-size: 13px;
      color: var(--text-secondary);
      cursor: pointer;
      transition: color 0.2s;
      position: relative;
      padding-left: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      line-height: 1.7;
    }
    .notice-list li::before {
      content: "•";
      position: absolute;
      left: 0;
      top: 0;
      color: var(--primary-light);
      font-weight: 700;
    }
    .notice-list li:hover { color: var(--primary-light); }

    /* ========== 右栏：热门榜 ========== */
    .rank-list li {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 0;
      border-bottom: 1px solid #f5f5f5;
      font-size: 13px;
    }
    .rank-list li:last-child { border-bottom: none; }
    .rank-num {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: #ecf0f1;
      color: #7f8c8d;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .rank-num.top1 { background: #f1c40f; color: #fff; }
    .rank-num.top2 { background: #bdc3c7; color: #fff; }
    .rank-num.top3 { background: #e67e22; color: #fff; }
    .rank-list .book-title {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .rank-list .count {
      font-size: 12px;
      color: #aaa;
      flex-shrink: 0;
      min-width: 44px;
      text-align: right;
    }

    /* ============================================================
       ★ 右栏：推优书籍
       ============================================================ */
    .recommend-list {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .recommend-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 11px 2px;
      border-bottom: 1px solid #f5f5f5;
      transition: background 0.2s, padding-left 0.2s;
      cursor: pointer;
    }
    .recommend-item:first-child { padding-top: 0; }
    .recommend-item:last-child {
      padding-bottom: 0;
      border-bottom: none;
    }
    .recommend-item:hover {
      background: #fafbfc;
      padding-left: 4px;
    }
    .recommend-item:hover .recommend-info h4 { color: var(--primary-light); }

    .recommend-cover {
      flex: 0 0 48px;
      width: 48px;
      height: 66px;
      border-radius: 4px;
      background: linear-gradient(135deg, #2980b9, #1a5276);
      position: relative;
      overflow: hidden;
      flex-shrink: 0;
      align-self: center;
    }
    .recommend-cover::before {
      content: attr(data-char);
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      color: #fff;
      font-weight: 600;
      z-index: 0;
    }
    .recommend-cover .cover-img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: 1;
      display: block;
    }
    .recommend-cover .mini-badge {
      position: absolute;
      top: 0;
      right: 0;
      background: var(--gold);
      color: #fff;
      font-size: 10px;
      padding: 1px 4px;
      border-bottom-left-radius: 4px;
      z-index: 2;
    }

    .recommend-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 2px;
    }
    .recommend-info h4 {
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 1px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color 0.2s;
      line-height: 1.5;
    }
    .recommend-info .meta {
      font-size: 12px;
      color: var(--text-secondary);
      margin-bottom: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.5;
    }
    .recommend-info .desc {
      font-size: 12px;
      color: #999;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
      line-height: 1.6;
    }

    /* ============================================================
       ★ 右栏：我的书架
       ============================================================ */
    .shelf-list {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .shelf-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 2px;
      border-bottom: 1px solid #f5f5f5;
      transition: background 0.2s, padding-left 0.2s;
      cursor: pointer;
    }
    .shelf-item:first-child { padding-top: 0; }
    .shelf-item:last-child {
      padding-bottom: 0;
      border-bottom: none;
    }
    .shelf-item:hover {
      background: #fafbfc;
      padding-left: 4px;
    }
    .shelf-item:hover .shelf-info h4 { color: var(--primary-light); }

    .shelf-cover {
      flex: 0 0 40px;
      width: 40px;
      height: 54px;
      border-radius: 3px;
      background: linear-gradient(135deg, #2980b9, #1a5276);
      position: relative;
      overflow: hidden;
      flex-shrink: 0;
      align-self: center;
    }
    .shelf-cover::before {
      content: attr(data-char);
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      color: #fff;
      font-weight: 600;
      z-index: 0;
    }
    .shelf-cover .cover-img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: 1;
      display: block;
    }
    .shelf-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 1px;
    }
    .shelf-info h4 {
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color 0.2s;
      line-height: 1.5;
    }
    .shelf-info .shelf-chapter {
      font-size: 12px;
      color: var(--text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.5;
    }
    .shelf-info .shelf-time {
      font-size: 11px;
      color: #bbb;
      line-height: 1.4;
    }

    /* ========== 页脚 ========== */
    .footer {
      background: #2c3e50;
      color: #bdc3c7;
      padding: 30px 16px;
      text-align: center;
      font-size: 13px;
    }
    .footer .links {
      display: flex;
      justify-content: center;
      gap: 24px;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }
    .footer .links a { color: #bdc3c7; transition: color 0.2s; }
    .footer .links a:hover { color: #fff; }
    .footer .copyright { font-size: 12px; color: #7f8c8d; }

    /* ========== 响应式 ========== */
    @media (max-width: 1180px) {
      .content-left { flex: 0 0 158px; }
      .content-right { flex: 0 0 260px; }
      .book-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 1024px) {
      .main-layout { flex-wrap: wrap; }

      /* 换行后左栏独占一行 → 取消绝对定位，恢复自然高度 + 限高滚动 */
      .content-left {
        flex: 0 0 100%;
        order: 3;
        position: static;
      }
      .content-left .filter-widget {
        position: static;
        height: auto;
      }
      .content-center { flex: 1; order: 1; }
      .content-right { flex: 0 0 280px; order: 2; }

      .content-left.collapsed { align-self: stretch; }

      .content-center .notice-card,
      .content-right .card:last-child { flex: 0 0 auto; }

      .filter-body {
        max-height: 420px;
        min-height: 0;
      }
      .cat-subs span { font-size: 12.5px; padding: 3px 9px; }
      .cat-name { font-size: 14px; }
      .cat-count { font-size: 11px; }
      .book-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 768px) {
      .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 16px;
        gap: 8px;
      }
      .logo { flex: 1; font-size: 20px; }
      .user-actions { flex: 0 0 auto; }
      .search-box {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        padding: 0;
        margin-top: 4px;
      }
      .search-wrap { max-width: 100%; }

      .main-nav { gap: 18px; height: 40px; font-size: 13px; }

      .banner { height: 240px; }
      .banner-slide { padding: 0 24px; }
      .banner-content h2 { font-size: 22px; }
      .banner-content p { font-size: 12px; }

      .main-layout { flex-direction: column; }
      .content-left,
      .content-center,
      .content-right {
        flex: 0 0 100%;
        width: 100%;
        order: initial;
      }

      .content-center .card { padding: 18px 20px; }

      .filter-header { font-size: 15px; padding: 13px 14px; }
      .filter-tabs span { font-size: 14px; }
      .filter-body { max-height: 460px; }
      .cat-name { font-size: 14px; }
      .cat-subs span { font-size: 12.5px; }

      .book-grid { grid-template-columns: 1fr; }

      .update-list .book-name { flex: 0 0 80px; }
      .update-list .chapter { padding: 0 6px; }

      .notice-list {
        flex-direction: column;
        gap: 8px;
      }
    }

    @media (max-width: 480px) {
      .book-grid { grid-template-columns: 1fr; gap: 10px; }
      .card { padding: 14px; }
      .content-center .card { padding: 16px; }
      .banner { height: 200px; }
    }

    /* ========== 大屏 / 2K 适配 ========== */
    @media (min-width: 1440px) {
      .header-inner,
      .main-nav,
      .container { max-width: 1440px; }

      .content-left  { flex: 0 0 178px; }
      .content-right { flex: 0 0 320px; }

      .content-center .card { padding: 28px 34px; }
      .book-grid { gap: 16px; }
    }

    @media (min-width: 1700px) {
      .header-inner,
      .main-nav,
      .container { max-width: 1640px; }

      .content-left  { flex: 0 0 188px; }
      .content-right { flex: 0 0 340px; }

      .content-center .card { padding: 32px 42px; }
      .book-grid { gap: 18px; }
    }

    @media (min-width: 1920px) {
      .header-inner,
      .main-nav,
      .container { max-width: 1840px; }

      .content-left  { flex: 0 0 196px; }
      .content-right { flex: 0 0 360px; }

      .content-center .card { padding: 36px 52px; }
      .book-grid { gap: 20px; }
      .banner { height: 380px; }
      .main-layout { gap: 24px; }
    }

    @media (min-width: 2400px) {
      .header-inner,
      .main-nav,
      .container { max-width: 2040px; }

      .content-left  { flex: 0 0 208px; }
      .content-right { flex: 0 0 380px; }

      .content-center .card { padding: 40px 64px; }
      .book-grid { gap: 22px; }
    }

/* ==========================================================================
 * ★ 需求 9：Ctrl+V 粘贴图片 / 表情包（先发后审，正文不采用标记）
 * ========================================================================*/

/* 评论 / 消息里的图片墙 */
.bk-msg-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bk-msg-imgs.is-small { gap: 4px; margin-top: 6px; }
.bk-msg-img {
  display: block; width: 108px; height: 108px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: #f7f9fb; transition: transform .16s, border-color .16s;
}
.bk-msg-imgs.is-small .bk-msg-img { width: 72px; height: 72px; }
.bk-msg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-msg-img:hover { transform: translateY(-2px); border-color: var(--primary); }
/* 表情包（透明底）按原样展示，不裁切 */
.bk-msg-img img[src$=".svg"], .bk-msg-imgs .is-sticker img { object-fit: contain; padding: 2px; }

/* 输入框下方的「待发送图片」托盘 */
.bk-paste-tray {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px; margin-top: 8px;
  border: 1px dashed var(--border); border-radius: 10px; background: #fbfdff;
}
.bk-paste-tray.hidden { display: none; }
.bk-paste-item { position: relative; display: block; width: 64px; height: 64px; border-radius: 8px; overflow: visible; }
.bk-paste-item img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; display: block;
}
.bk-paste-del {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; line-height: 16px;
  text-align: center; border-radius: 50%; background: var(--danger, #e74c3c); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.22);
}

/* 粘贴提示条 */
.bk-paste-hint {
  font-size: 12px; color: var(--text-secondary); margin-top: 6px; display: flex;
  align-items: center; gap: 10px; flex-wrap: wrap;
}
.bk-paste-hint kbd {
  padding: 1px 5px; border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; background: #fff; font-size: 11px; font-family: inherit;
}
.bk-paste-hint .bk-paste-open { color: var(--primary); cursor: pointer; }
.bk-paste-hint .bk-paste-open:hover { text-decoration: underline; }

/* 表情包面板（Book.paste.pick 弹窗内容） */
.bk-sticker-panel { max-height: 60vh; overflow-y: auto; }
/* ★ m09564 图片七：面板顶部「上传我的表情包」工具条 */
.bk-sticker-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 10px; border: 1px dashed var(--border);
  border-radius: 8px; background: #f8fafc;
}
.bk-sticker-up {
  flex: 0 0 auto; font-size: 13px; font-weight: 600; padding: 6px 12px; cursor: pointer;
  color: #fff; background: var(--primary); border: 0; border-radius: 6px;
  transition: opacity .15s;
}
.bk-sticker-up:hover { opacity: .88; }
.bk-sticker-up[disabled] { opacity: .5; cursor: default; }
.bk-sticker-tip { font-size: 12px; flex: 1 1 200px; line-height: 1.5; }
.bk-sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.bk-sticker-cell {
  display: block; width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; transition: border-color .15s, transform .15s;
}
.bk-sticker-cell:hover { border-color: var(--primary); transform: translateY(-2px); }
.bk-sticker-cell img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 2px; }
.bk-sticker-date { margin-top: 12px; }
.bk-sticker-date-head {
  font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px;
  padding-bottom: 4px; border-bottom: 1px dashed var(--border);
}
.bk-kaomoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-kaomoji { cursor: pointer; font-size: 13px; user-select: none; }
.bk-kaomoji:hover { background: var(--primary); color: #fff; }

/* 审核中心：按日期分组的表情包队列 */
.bk-sticker-group { margin-bottom: 14px; }
.bk-sticker-group > .head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; background: #f6f9fc; border: 1px solid var(--border);
  border-radius: 8px 8px 0 0; font-size: 13px; font-weight: 600;
}
.bk-sticker-group > .body {
  border: 1px solid var(--border); border-top: 0; border-radius: 0 0 8px 8px; padding: 10px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px;
}
.bk-sticker-card { text-align: center; }
.bk-sticker-card img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; display: block; margin-bottom: 4px;
}
.bk-sticker-card .name { font-size: 11px; color: var(--text-secondary); word-break: break-all; }
.bk-sticker-card .ops { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.bk-sticker-card .ops button {
  font-size: 11px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border);
  background: #fff; cursor: pointer;
}
.bk-sticker-card .ops button.ok { color: #1e8e5a; border-color: #9fd8bd; }
.bk-sticker-card .ops button.no { color: #c0392b; border-color: #f0b3ab; }
