/* =========================================================
   PC 前台样式 v2 —— 简洁大气的图书馆门户
   结构：白色吸顶头部 / 学校大图 Hero + 检索 / 快捷服务 /
        栏目动态 / 数字资源 / 绿色页脚
   ========================================================= */

:root {
    --green: #48a743;
    --green-deep: #3a8c36;
    --bg: #f5f7f6;
    --card: #ffffff;
    --text: #1f2937;
    --text-2: #6b7280;
    --line: #e8ebef;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 18px rgba(16, 24, 40, .05);
    --maxw: 1200px;
}

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

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

img { max-width: 100%; border: 0; display: inline-block; }
a { color: var(--text); text-decoration: none; transition: color .15s ease; }
ul { list-style: none; }
input, button { font: inherit; outline: none; }

/* ---------- 吸顶头部：logo + 导航 ---------- */
.up {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 0 var(--line), 0 4px 16px rgba(16, 24, 40, .04);
}

#logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    /* background 方式：只显示长图最左侧的图形，文字部分天然被裁掉 */
    /* 裁切微调：x/y 位移修正图形位置，115% 让图形撑满方块、文字彻底出画 */
    background: url('../img/logo.png') no-repeat -1px -7px / auto 115%;
    box-shadow: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.logo-text-en {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .6px;
    color: var(--text-2);
}

.k { display: none; }

.nav-toggle { display: none; }

#menu { }

.nav { text-align: right; }

.nav ul { display: inline-block; vertical-align: top; }

.nav ul > li {
    display: inline-block;
    position: relative;
}

.nav ul > li > a {
    display: block;
    padding: 0 20px;
    line-height: 66px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.nav ul > li > a:hover {
    color: var(--green);
    box-shadow: inset 0 -3px 0 var(--green);
}

/* 下拉子栏目 */
.nav ul li ul {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%) translateY(6px);
    min-width: 168px;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .14);
    opacity: 0;
    visibility: hidden;
    transition: all .18s ease;
    z-index: 1000;
}

.nav ul li:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 最后一个菜单项的子菜单右对齐，防止屏幕右侧被裁切 */
.nav ul > li:last-child > ul {
    left: auto;
    right: 0;
    transform: translateY(6px);
}

.nav ul > li:last-child:hover > ul {
    transform: translateY(0);
}

.nav ul li ul li {
    display: block;
    float: none;
}

.nav ul li ul li a {
    display: block;
    padding: 11px 18px;
    line-height: 1.4;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-2);
    text-align: center;
    white-space: nowrap;
}

.nav ul li ul li a:hover {
    color: var(--green);
    background: #f4faf3;
}

/* ---------- Hero：学校大图 + 站名 + 检索 ---------- */
.hero {
    position: relative;
    min-height: 430px;
    background: url('../img/banner/ts2hover.png') no-repeat center calc(50% + 60px) / cover;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .28);   /* 中性压暗（无色偏），白色检索条更突出 */
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(760px, 92%);
    text-align: center;
    color: #fff;
    padding: 0 0 28px;      /* 数值越小内容越靠下 */
}

.hero-sub {
    margin: 12px 0 30px;
    font-size: 15px;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, .85);
}

/* 检索条：旧版结构 + 精致化（悬浮投影 / 标签圆角过渡 / 聚焦绿光 / 按钮反色悬停） */
/* ---------- 检索：类型标签 + 一体式胶囊搜索条 ---------- */
.hero .jq22-search-form {
    width: min(640px, 100%);
    margin: 0 auto;
    background: none;
    padding: 0;
}

.hero .search-bd { margin-bottom: 16px; }

.hero .search-bd ul {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.hero .search-bd li {
    position: relative;
    padding: 4px 2px 10px;
    font-size: 15px;
    color: rgba(255, 255, 255, .75);
    cursor: pointer;
    transition: color .15s ease;
}

.hero .search-bd li:hover { color: #fff; }

.hero .search-bd li.selected {
    color: #fff;
    font-weight: 600;
}

.hero .search-bd li.selected::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: #fff;
}

.hero .search-hd { padding: 0; }

.hero .search-hd form { display: none; }

.hero .search-hd form.v2-active {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 999px;
    padding: 6px 6px 6px 0;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
}

.hero .search-hd .search-input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 0;
    background: url(../img/zoom.jpg) no-repeat 18px center #fff;
    border-radius: 999px 0 0 999px;
    padding: 0 12px 0 46px;
    color: var(--text);
    font-size: 15px;
}

.hero .search-hd .search-input:focus { outline: none; }

.hero .search-hd .btn-search {
    flex: none;
    height: 46px;
    padding: 0 30px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.hero .search-hd .btn-search:hover { background: var(--green-deep); }

.hero .search-hd .pholder { display: none; }




/* ---------- 版块标题 ---------- */
.sec {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 30px 20px;
}

/* 最后一个版块（数字资源）与页脚之间多留空隙 */
.sec:last-of-type {
    padding-bottom: 48px;
}

.sec-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 700;
}

.sec-title::before {
    content: '';
    width: 6px;
    height: 24px;
    border-radius: 3px;
    background: var(--green);
}

.sec-title .more {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-2);
}

.sec-title .more:hover { color: var(--green); }

/* ---------- 快捷服务 ---------- */
.quick {
    max-width: var(--maxw);
    margin: 26px auto 36px;      /* 底部留白，与下方内容拉开 */
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 14px;              /* 行距 16px：瓷砖行与资源彩块之间透气 */
}

.quick a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 64px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    text-align: center;
    transition: transform .15s ease, filter .15s ease;
}

.quick a img { width: 30px; flex: none; }

.quick a:hover {
    transform: translateY(-4px);
    filter: brightness(1.08);
}

/* ---------- 栏目页 / 文章页 ---------- */
#page {
    max-width: var(--maxw);
    margin: 26px auto 30px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

#page-bgbtm {
    display: flex;
    gap: 26px;
    align-items: stretch;
    padding: 28px;
}

#content { flex: 1; min-width: 0; }

.post .title { font-size: 24px; font-weight: 700; margin-bottom: 10px; }

.post .title a { color: var(--text); }
.post .title a:hover { color: var(--green); }

.post .meta {
    color: var(--text-2);
    font-size: 13px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.post .meta a { color: var(--text-2); }
.post .meta a:hover { color: var(--green); }

.post .entry {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
    word-wrap: break-word;
}

.post .entry img { max-width: 100%; height: auto; border-radius: 8px; }

.post .entry p { margin-bottom: 10px; }

.post .entry table {
    max-width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.post .entry td, .post .entry th { border: 1px solid var(--line); padding: 6px 10px; }

/* 文章列表行（栏目页） */
.news ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 12px 6px;
    transition: background .15s ease;
}

.news ul li:hover { background: #f7faf7; }

.news ul a { color: var(--text); }
.news ul a:hover { color: var(--green); }

.newsl {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.newsr { flex: none; color: var(--text-2); font-size: 13px; }

/* 上下篇 */
.pfxz-big {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.pfxz {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pfxz a { color: var(--green); font-weight: 500; }

/* ---------- 侧栏 ---------- */
#sidebar {
    width: 280px;
    flex: none;
    order: -1;
    align-self: flex-start;
    position: sticky;          /* 滚动时吸顶跟随，不再滚进页脚区域 */
    top: 86px;                 /* 头部 66px + 间距 */
    max-height: calc(100vh - 106px);
    overflow-y: auto;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

#sidebar ul { margin: 0; }
#sidebar li ul { margin: 0; padding-bottom: 12px; }
#sidebar li li { padding-left: 10px; line-height: 2; }

#s_h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--green);
}

#sidebar-ul a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 14px;
}

#sidebar-ul a:hover { background: #f4faf3; color: var(--green); }

#sidebar-ul li[style*="bold"] a { color: var(--green); font-weight: 600; }

/* ---------- 分页 ---------- */
#pagesize {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 4px;
}

#pagesize li {
    min-width: 34px;
    height: 34px;
    line-height: 32px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}

#pagesize li a { display: block; padding: 0 8px; color: var(--text); }

#pagesize li.xl-active { background: var(--green); border-color: var(--green); }
#pagesize li.xl-active a { color: #fff; }

#pagesize li.xl-disabled { opacity: .5; }

/* ---------- 页脚 ---------- */
.down {
    background: var(--green-deep);
    color: rgba(255, 255, 255, .92);
    text-align: center;
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
    font-size: 13px;
    line-height: 2;
}

.down h4 { font-weight: 400; }

.down-links { margin-bottom: 6px; }

.down-links a { color: rgba(255, 255, 255, .92); padding: 0 10px; }

.down-links a:hover { color: #fff; text-decoration: underline; }

.down-links .sep { color: rgba(255, 255, 255, .5); padding: 0 4px; }

.down-addr { color: rgba(255, 255, 255, .78); font-size: 12px; }

.down-copy { margin-top: 4px; color: rgba(255, 255, 255, .92); }

.down-copy .powered-mail { color: rgba(255, 255, 255, .95); }
.down-copy .powered-mail:hover { color: #fff; text-decoration: underline; }

.admin-dot { color: #fff; padding: 0 2px; }
.admin-dot:hover { color: #fff; }

/* ---------- 返回顶部 ---------- */
.fhdb {
    position: fixed;
    right: 18px;
    bottom: 60px;
    z-index: 999;
    width: 42px;
    padding: 9px 0;
    text-align: center;
    background: #fff;
    color: var(--green);
    font-size: 12px;
    line-height: 1.2;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .16);
    cursor: pointer;
}

.fhdb {
    transition: opacity .3s ease;
}

.fhdb:hover { color: var(--green-deep); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 992px) {
    .duo { grid-template-columns: 1fr; }
    .v2-carousel { min-height: 220px; }
    .quick { grid-template-columns: repeat(2, 1fr); }
    #page-bgbtm { flex-direction: column; }
    #sidebar { width: 100%; }
}

@media (max-width: 640px) {
    #logo { padding: 10px 12px; }
    #logo .img { height: 38px; }
    .nav ul > li > a { padding: 0 10px; line-height: 54px; font-size: 13px; }
    .quick { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   检索标签强制接管：旧模板在 li 上写死了内联背景色（红/蓝块），
   内联样式优先级最高，必须用 !important 覆盖才能统一
   ========================================================= */
.hero .search-bd li {
    background: none !important;
    color: rgba(255, 255, 255, .75) !important;
}

.hero .search-bd li:hover {
    color: #fff !important;
}

.hero .search-bd li.selected {
    color: #fff !important;
    font-weight: 600 !important;
}

/* ---------- 轮播 + 馆内新闻（左右组合） ---------- */
.duo {
    display: grid;
    grid-template-columns: minmax(320px, 400px) 1fr;   /* 轮播收窄一些 */
    gap: 20px;
    align-items: stretch;
}

.v2-carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #dfe3e8;
    min-height: 380px;
}

.v2-slides li {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity .8s ease, visibility 0s linear .8s;
}

.v2-slides li.v2-on {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transition: opacity .8s ease;
}

.v2-slides li:first-child { display: block; }

.v2-slides li a {
    display: block;
    height: 100%;
    position: relative;
}

.v2-slides li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v2-slides .cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .6));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-dots {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.v2-dots .v2-dot {
    width: 22px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: rgba(255, 255, 255, .55);
    color: #333;
    font-size: 12px;
    font-style: normal;
    border-radius: 3px;
    cursor: pointer;
}

.v2-dots .v2-dot.v2-on {
    background: var(--green);
    color: #fff;
}

.news-panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.news-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.news-head::before {
    content: '';
    width: 5px;
    height: 18px;
    border-radius: 3px;
    background: var(--green);
}

.news-head .more {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2px 12px;
    transition: all .15s ease;
}

.news-head .more:hover {
    color: var(--green);
    border-color: var(--green);
}

.news-panel ul { padding: 6px 0; }

.news-panel li { border-bottom: 1px solid var(--line); }
.news-panel li:last-child { border-bottom: 0; }
.news-panel li.empty { padding: 16px; color: var(--text-2); text-align: center; }

.news-panel li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 14px;
    transition: background .15s ease;
}

.news-panel li a:hover { background: #f7faf7; }

.news-panel .bt {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 13px;
}

.news-panel .dt { flex: none; color: var(--text-2); font-size: 11px; }

@media (max-width: 992px) {
    .duo { grid-template-columns: 1fr; }
    .v2-carousel { min-height: 240px; }
}


/* ---------- 页脚水印：宽度收缩式隐藏（不占位、不破坏居中），悬停展开 ---------- */



/* ---------- 页面骨架：内容不足一屏时，页脚也固定在底部 ---------- */
#big {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.c { flex: 1; }

/* =========================================================
   Responsive（单套代码适配全设备）
   ========================================================= */

/* ≤1080px：头部收紧，轮播收窄 */
@media (max-width: 1080px) {
    .up { flex-wrap: wrap; justify-content: center; gap: 0 12px; padding: 0 12px; }
    .nav ul > li > a { padding: 0 12px; line-height: 56px; font-size: 14px; }
    .duo { grid-template-columns: minmax(320px, 420px) 1fr; }
}

/* ≤880px：全部单列堆叠 */
@media (max-width: 880px) {
    /* 头部：logo 左、汉堡右，单行不换行 */
    .up {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0 14px;
    }

    .logo-text { font-size: 16px; letter-spacing: .5px; }
    .logo-text-en { display: none; }        /* 小屏隐藏英文副标题 */
    .logo-mark { width: 40px; height: 40px; }
    .nav-toggle { display: inline-flex; }

    .duo { grid-template-columns: 1fr; }
    .v2-carousel { min-height: 240px; }
    .res-grid, .home-blocks { grid-template-columns: 1fr; }
    .quick { grid-template-columns: repeat(2, 1fr); }
    #page { margin: 16px 12px 24px; }
    #page-bgbtm { flex-direction: column; }
    #content { width: 100%; float: none; }
    #sidebar {
        width: 100%;
        order: 1;                  /* 小屏侧栏排到内容下方，先看列表 */
        position: static;
        max-height: none;
        overflow-y: visible;
        top: auto;
    }

    /* 菜单收进汉堡按钮（强制生效，避免桌面规则泄漏） */
    .nav-toggle {
        display: inline-flex !important;
        flex-direction: column;
        gap: 5px;
        margin-left: auto;
        background: none;
        border: 0;
        cursor: pointer;
        padding: 8px;
    }

    .nav-toggle span {
        width: 22px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: all .25s ease;
    }

    .nav-toggle.v2-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.v2-open span:nth-child(2) { opacity: 0; }
    .nav-toggle.v2-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* 菜单面板：全宽下拉，白底深字 */
    .nav {
        display: none !important;
        position: absolute !important;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 14px 28px rgba(16, 24, 40, .14);
        text-align: left;
        z-index: 1000;
        padding: 6px 0;
    }

    #menu.v2-mobile-open .nav { display: block !important; }

    .nav ul { display: block !important; width: 100%; }

    .nav ul > li {
        display: block !important;
        width: 100%;
        border-bottom: 1px solid var(--line);
    }

    .nav ul > li > a {
        display: block !important;
        width: 100%;
        box-sizing: border-box;
        line-height: 46px !important;
        height: auto !important;
        padding: 0 16px !important;
        text-align: left !important;
        color: var(--text) !important;
        font-size: 15px !important;
        font-weight: 400 !important;
    }

    .nav ul > li:has(> ul) > a::after {
        content: '›';
        float: right;
        color: #c0c6cc;
        font-size: 16px;
    }

    /* 子菜单：默认收起，父项 v2-open 展开 */
    .nav ul li ul {
        display: none !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        min-width: 0 !important;
        box-shadow: none !important;
        background: #fafbfc;
    }

    .nav ul li.v2-open > ul { display: block !important; }

    .nav ul li ul li a {
        padding-left: 34px !important;
        line-height: 42px !important;
        color: var(--text-2) !important;
    }

    .nav ul li ul li a:hover { background: #f4faf3; }
}

/* 触屏设备：点按父菜单开合子菜单（配合 v2-pc.js） */
.nav ul > li.v2-open > ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav ul > li:last-child.v2-open > ul {
    transform: translateY(0);
}

/* ≤520px：手机竖屏 */
@media (max-width: 520px) {
    body { font-size: 14px; }
    .logo-text { font-size: 14px; }
    .logo-mark { width: 34px; height: 34px; }
    .up { padding: 0 12px; }
    .hero { min-height: 300px; }
    .hero .search-hd .btn-search { width: 96px; padding: 0 10px; font-size: 14px; }
    .hero .search-bd li, .hero .search-bd span { width: auto; flex: 1; font-size: 13px; }
    .quick { grid-template-columns: 1fr 1fr; padding: 0 12px; }
    .quick a { padding: 12px 8px; font-size: 13px; }
    .nav ul > li > a { padding: 0 8px; font-size: 13px; }
    .sec { padding: 20px 12px; }
    #content { padding: 16px; }
    .post .title { font-size: 20px; }
    .xypwz { grid-template-columns: 1fr; }
}

/* =========================================================
   首页增强模块：数据速览 / 开放时间 / 好书推荐
   ========================================================= */

/* 开放时间行 */
.hours-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    border-bottom: 1px solid var(--line);
}

.hours-list li:last-child { border-bottom: 0; }

.hours-list li span:first-child { font-weight: 600; }
.hours-list li span:last-child { color: var(--green); font-weight: 600; }

/* 好书推荐封面墙 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 14px;
}

.book-card {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    transition: transform .15s ease, box-shadow .15s ease;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 24, 40, .12);
}

.book-card {
    border: 1px solid var(--line);
}

.book-card img,
.book-card .no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 132px;
    background: linear-gradient(135deg, var(--green), #6fbf6a);
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    object-fit: cover;
}

.book-card .bt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    height: auto;
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text);
    overflow: hidden;
}



/* =========================================================
   卡片栅格（数字资源 / 开放时间 / 好书推荐）
   ========================================================= */
.res-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.res-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.res-card .res-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.res-card .res-head::before {
    content: '';
    width: 5px;
    height: 18px;
    border-radius: 3px;
    background: var(--green);
}

.res-card ul { padding: 6px 0; }

.res-card li { border-bottom: 1px solid var(--line); }
.res-card li:last-child { border-bottom: 0; }
.res-card li.empty { padding: 16px; color: var(--text-2); text-align: center; }

.res-card li a {
    display: block;
    padding: 11px 18px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.res-card li a:hover { color: var(--green); background: #f7faf7; }

@media (max-width: 992px) {
    .res-grid { grid-template-columns: 1fr; }
}

/* ---------- 栏目页文章列表行 ---------- */
#pageul li.xx a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px;
    background: #fff;
    transition: background .15s ease;
}

#pageul li.xx a:hover { background: #f7faf7; }

#pageul .newsl { color: var(--text); font-size: 15px; }

#pageul li.xx a:hover {
    background: #f7faf7;
    padding-left: 10px;
}

#pageul li.xx a:hover .newsl { color: var(--green); }

#pageul .newsl {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 15px;
}

#pageul .newsr { flex: none; margin-left: auto; color: var(--text-2); font-size: 13px; }

/* ---------- 溢出兜底：所有列表行永不撑破容器 ---------- */
#pageul { overflow: hidden; }

#pageul li.xx { min-width: 0; overflow: hidden; }

/* 只有标题参与省略；日期保持原宽（右侧 / 小屏换行） */
#pageul .newsl,
.newsl,
.news-panel .bt,
.nr_wzlib_left {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.word-break { word-break: break-all; }

/* ---------- 小屏：列表日期换到标题下方 ---------- */
@media (max-width: 640px) {
    #pageul li.xx a,
    .news-panel li a,
    .nr_wzlib {
        flex-wrap: wrap;
    }

    #pageul .newsr,
    .news-panel .dt {
        flex-basis: 100%;
        text-align: left;
    }
}
