@charset "utf-8";
/* ==========================================================================
   tpl_novel_10 — 青春校园轻小说 (Campus Light Novel)
   年轻、活泼、明亮的中文小说站：浅蓝 + 薄荷绿 + 浅紫 + 白，少量珊瑚橙点缀。
   卡片有轻插画感（CSS 渐变占位封面），信息密度高但不低质，移动端优先。
   类名前缀 xy-（校园）。
   ========================================================================== */

:root {
    --xy-bg:        #eef4fd;   /* 页面底：清透浅蓝白 */
    --xy-bg-2:      #e4edfb;
    --xy-surface:   #ffffff;
    --xy-ink:       #2b3245;   /* 主文字：深石板蓝，白底约 11:1 */
    --xy-ink-2:     #5b6478;   /* 次要文字：白底约 5.3:1 */
    --xy-ink-3:     #8a93a8;   /* 弱化文字，仅用于浅色块上的辅助信息 */
    --xy-line:      #e4ebf5;
    --xy-line-2:    #eef2f9;

    --xy-blue:      #3d8bf2;
    --xy-blue-deep: #2c6fd0;   /* 白字达标 ≈4.6:1 */
    --xy-blue-soft: #e6eefc;
    --xy-mint:      #2fbf91;
    --xy-mint-deep: #0a8a5c;
    --xy-mint-soft: #d9f4ea;
    --xy-violet:    #8b6cf0;
    --xy-violet-deep:#6b43e0;
    --xy-violet-soft:#ece5fd;
    --xy-coral:     #ff7a59;
    --xy-coral-deep:#e2542f;
    --xy-coral-soft:#ffe6dd;
    --xy-sky:       #29a3d6;
    --xy-sky-deep:  #1184b0;
    --xy-sky-soft:  #def3fb;
    --xy-pink-deep: #d23d86;
    --xy-pink-soft: #fde4f0;
    --xy-star:      #ffb020;

    --xy-ff: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --xy-ff-read: "PingFang SC", "Microsoft YaHei", "Songti SC", "SimSun", serif;

    --r-sm: 8px;
    --r:    14px;
    --r-lg: 20px;
    --r-pill: 999px;

    --sh-1: 0 4px 14px rgba(45, 80, 160, .07);
    --sh-2: 0 10px 26px rgba(45, 80, 160, .12);
    --sh-blue: 0 10px 24px rgba(61, 139, 242, .28);

    --shell: 1200px;

    --z-tabbar: 90;
    --z-sticky: 100;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.xy-page {
    margin: 0;
    font-family: var(--xy-ff);
    font-size: 14px;
    line-height: 1.65;
    color: var(--xy-ink);
    background:
        radial-gradient(820px 420px at 88% -8%, rgba(139, 108, 240, .14), transparent 60%),
        radial-gradient(720px 420px at 6% 2%, rgba(47, 191, 145, .12), transparent 58%),
        var(--xy-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-bottom: env(safe-area-inset-bottom);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }
ol, ul { margin: 0; padding: 0; list-style: none; }
em, i { font-style: normal; }

.xy-shell {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== 按钮 ===== */
.xy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 700;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s, background .18s, color .18s;
    white-space: nowrap;
}
.xy-btn:hover { transform: translateY(-2px); }
.xy-btn-solid {
    background: linear-gradient(135deg, var(--xy-blue), #5a8bff);
    color: #fff;
    box-shadow: var(--sh-blue);
}
.xy-btn-solid:hover { box-shadow: 0 14px 30px rgba(61,139,242,.4); }
.xy-btn-line {
    background: #fff;
    color: var(--xy-blue-deep);
    border-color: #cfe0fb;
}
.xy-btn-line:hover { border-color: var(--xy-blue); background: var(--xy-blue-soft); }
.xy-btn-ghost {
    background: var(--xy-mint-soft);
    color: var(--xy-mint-deep);
}
.xy-btn-ghost:hover { background: #c7eedd; }
.xy-btn-ghost.is-added { background: var(--xy-line); color: var(--xy-ink-2); }
.xy-btn-ghost.is-loading { opacity: .7; pointer-events: none; }

/* ==========================================================================
   头部
   ========================================================================== */
.xy-masthead {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 0 rgba(61, 139, 242, .06), 0 6px 20px rgba(45, 80, 160, .06);
}

.xy-topbar {
    background: linear-gradient(90deg, var(--xy-blue-soft), var(--xy-violet-soft) 60%, var(--xy-mint-soft));
    font-size: 12.5px;
}
.xy-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 34px;
}
.xy-topbar-tag { color: var(--xy-ink-2); font-weight: 600; }
.xy-topbar-nav { display: flex; gap: 16px; }
.xy-topbar-nav a { color: var(--xy-ink-2); font-weight: 600; transition: color .15s; }
.xy-topbar-nav a:hover, .xy-topbar-nav a.active { color: var(--xy-blue-deep); }

.xy-headmain-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 76px;
}
.xy-logo a { display: inline-flex; align-items: center; gap: 11px; }
.xy-logo-mark {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 15px;
    background: linear-gradient(140deg, var(--xy-blue), var(--xy-violet) 55%, var(--xy-mint));
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(99, 110, 240, .32);
    transform: rotate(-5deg);
}
.xy-logo-text { font-size: 22px; font-weight: 800; letter-spacing: .5px; color: var(--xy-ink); display: flex; flex-direction: column; line-height: 1.15; }
.xy-logo-text em { font-size: 11px; font-weight: 600; color: var(--xy-blue-deep); letter-spacing: 2px; }

.xy-search {
    flex: 1;
    max-width: 540px;
    display: flex;
    align-items: center;
    height: 46px;
    background: #fff;
    border: 2px solid #d6e3fa;
    border-radius: var(--r-pill);
    padding-left: 16px;
    transition: border-color .18s, box-shadow .18s;
}
.xy-search:focus-within { border-color: var(--xy-blue); box-shadow: 0 0 0 4px rgba(61,139,242,.14); }
.xy-search-ico { width: 19px; height: 19px; color: var(--xy-blue); flex: none; }
.xy-search input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: var(--xy-ink);
    padding: 0 10px;
    font-family: inherit;
}
.xy-search input::placeholder { color: var(--xy-ink-3); }
.xy-search button {
    height: 38px;
    margin: 0 4px 0 0;
    padding: 0 24px;
    border: 0;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, var(--xy-blue), #5a8bff);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: filter .15s;
}
.xy-search button:hover { filter: brightness(1.06); }

.xy-head-hot { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--xy-ink-3); }
.xy-head-hot span { flex: none; }
.xy-head-hot a { color: var(--xy-ink-2); transition: color .15s; }
.xy-head-hot a:hover { color: var(--xy-blue-deep); }

/* 频道导航 */
.xy-channels { border-top: 1px solid var(--xy-line-2); }
.xy-channels-inner { position: relative; display: flex; align-items: center; }
.xy-channels-list {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    padding: 8px 0;
}
.xy-channels-list a {
    padding: 7px 11px;
    border-radius: var(--r-pill);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--xy-ink-2);
    transition: color .15s, background .15s;
}
.xy-channels-list a:hover { color: var(--xy-blue-deep); background: var(--xy-blue-soft); }
.xy-channels-list a.active { color: #fff; background: linear-gradient(135deg, var(--xy-blue), var(--xy-violet)); }
.xy-chan-rank.active { background: linear-gradient(135deg, var(--xy-coral), #ff9a73); }
.xy-burger { display: none; }

/* ==========================================================================
   通用区块标题
   ========================================================================== */
.xy-main {
    max-width: calc(var(--shell) + 32px);
    padding: 22px 16px 40px;
}

.xy-sec { margin-top: 30px; }
.xy-sec:first-child { margin-top: 0; }

.xy-sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.xy-sec-emoji {
    width: 34px; height: 34px;
    flex: none;
    display: grid; place-items: center;
    font-size: 18px;
    border-radius: 11px;
    background: var(--xy-blue-soft);
    box-shadow: 0 4px 10px rgba(45,80,160,.08);
}
.xy-sec-title { font-size: 21px; line-height: 1.2; color: var(--xy-ink); letter-spacing: .3px; }
.xy-sec-sub { font-size: 13px; color: var(--xy-ink-3); align-self: flex-end; padding-bottom: 2px; }
.xy-sec-more {
    margin-left: auto;
    align-self: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--xy-blue-deep);
    padding: 5px 14px;
    border-radius: var(--r-pill);
    background: #fff;
    border: 1px solid var(--xy-line);
    transition: transform .15s, box-shadow .15s, color .15s;
}
.xy-sec-more::after { content: " ›"; }
.xy-sec-more:hover { transform: translateX(2px); box-shadow: var(--sh-1); }

/* 主题色：每个推荐分区一种颜色 */
.xy-sec--blue   .xy-sec-emoji { background: var(--xy-blue-soft); }
.xy-sec--blue   .xy-sec-more  { color: var(--xy-blue-deep); }
.xy-sec--mint   .xy-sec-emoji { background: var(--xy-mint-soft); }
.xy-sec--mint   .xy-sec-more  { color: var(--xy-mint-deep); }
.xy-sec--violet .xy-sec-emoji { background: var(--xy-violet-soft); }
.xy-sec--violet .xy-sec-more  { color: var(--xy-violet-deep); }
.xy-sec--sky    .xy-sec-emoji { background: var(--xy-sky-soft); }
.xy-sec--sky    .xy-sec-more  { color: var(--xy-sky-deep); }
.xy-sec--coral  .xy-sec-emoji { background: var(--xy-coral-soft); }
.xy-sec--coral  .xy-sec-more  { color: var(--xy-coral-deep); }

/* ==========================================================================
   首页 Banner
   ========================================================================== */
.xy-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 18px;
    padding: 18px;
    border-radius: var(--r-lg);
    background:
        radial-gradient(420px 300px at 12% 10%, rgba(61,139,242,.16), transparent 60%),
        radial-gradient(380px 280px at 92% 90%, rgba(47,191,145,.16), transparent 60%),
        linear-gradient(135deg, #f4f8ff, #eef0ff 55%, #eafaf3);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: var(--sh-1);
    overflow: hidden;
}
.xy-blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; pointer-events: none; }
.xy-blob-1 { width: 120px; height: 120px; top: -34px; right: 28%; background: radial-gradient(circle at 30% 30%, #ffd6c9, #ff9a73); opacity: .35; }
.xy-blob-2 { width: 80px; height: 80px; bottom: 18px; left: 40%; background: radial-gradient(circle at 30% 30%, #c9f0e1, #2fbf91); opacity: .3; }
.xy-blob-3 { width: 60px; height: 60px; top: 30%; right: 6%; background: radial-gradient(circle at 30% 30%, #d8ccff, #8b6cf0); opacity: .3; }

/* 焦点轮播 */
.xy-hero { align-items: stretch; }
.xy-hero-feature {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
}
.xy-carousel {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    margin-inline: auto;
    border-radius: var(--r);
    overflow: hidden;
    height: clamp(300px, 27vw, 366px);
}
.xy-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 100%;
}
.xy-carousel-track::-webkit-scrollbar { display: none; }
.xy-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(135deg, var(--xy-blue), var(--xy-violet) 70%, var(--xy-mint));
}
.xy-slide-bg { position: absolute; inset: 0; z-index: 0; }
.xy-slide-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.xy-slide-veil {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(20,28,55,.05) 0%, rgba(20,28,55,.18) 45%, rgba(20,28,55,.78) 100%);
}
.xy-slide-body { position: relative; z-index: 1; padding: 20px 22px 22px; color: #fff; width: 100%; }
.xy-slide-cat {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--r-pill);
    background: rgba(255,255,255,.25);
    backdrop-filter: blur(2px);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.xy-slide-title { font-size: 26px; line-height: 1.2; text-shadow: 0 2px 12px rgba(0,0,0,.3); text-wrap: balance; }
.xy-slide-title a { color: #fff; }
.xy-slide-meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 9px 0 8px; font-size: 13px; opacity: .94; }
.xy-slide-meta span::before { content: ""; }
.xy-slide-blurb {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.7;
    opacity: .92;
    max-width: 60ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.xy-slide-actions { display: flex; gap: 10px; }
.xy-slide-actions .xy-btn-line { background: rgba(255,255,255,.92); border-color: transparent; }

.xy-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.82);
    color: var(--xy-ink);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .15s;
    z-index: 2;
}
.xy-carousel-arrow svg { width: 20px; height: 20px; }
.xy-carousel:hover .xy-carousel-arrow { opacity: 1; }
.xy-carousel-arrow:hover { background: #fff; }
.xy-carousel-arrow.prev { left: 12px; }
.xy-carousel-arrow.next { right: 12px; }
.xy-carousel-dots { position: absolute; bottom: 14px; right: 18px; display: flex; gap: 7px; z-index: 2; }
.xy-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s, background .2s; }
.xy-dot.is-active { width: 22px; border-radius: var(--r-pill); background: #fff; }

/* 本周必读 */
.xy-hero-side {
    position: relative; z-index: 1;
    background: rgba(255,255,255,.78);
    border-radius: var(--r);
    padding: 16px;
    box-shadow: var(--sh-1);
}
.xy-hero-side-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 10px; }
.xy-hero-side-head b { font-size: 16px; color: var(--xy-ink); }
.xy-hero-side-head span { font-size: 12px; color: var(--xy-ink-3); }
.xy-pick-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--xy-line);
}
.xy-pick-list li:last-child { border-bottom: 0; }
.xy-pick-no {
    flex: none;
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    color: var(--xy-ink-3);
    background: var(--xy-line-2);
}
.xy-pick-no.hot { color: #fff; background: linear-gradient(135deg, var(--xy-coral), #ff9a73); }
.xy-pick-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--xy-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xy-pick-name:hover { color: var(--xy-blue-deep); }
.xy-pick-cat { flex: none; font-size: 11.5px; color: var(--xy-ink-3); }

/* ==========================================================================
   彩色胶囊分类入口
   ========================================================================== */
.xy-catbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
    background: rgba(255,255,255,.7);
    border-radius: var(--r);
    box-shadow: var(--sh-1);
}
.xy-pill {
    padding: 8px 18px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 700;
    transition: transform .16s cubic-bezier(.22,1,.36,1), box-shadow .16s, filter .16s;
}
.xy-pill:hover { transform: translateY(-3px); box-shadow: var(--sh-1); filter: brightness(1.02); }
.xy-pill:nth-child(6n+1) { background: var(--xy-blue-soft);   color: var(--xy-blue-deep); }
.xy-pill:nth-child(6n+2) { background: var(--xy-mint-soft);   color: var(--xy-mint-deep); }
.xy-pill:nth-child(6n+3) { background: var(--xy-violet-soft); color: var(--xy-violet-deep); }
.xy-pill:nth-child(6n+4) { background: var(--xy-coral-soft);  color: var(--xy-coral-deep); }
.xy-pill:nth-child(6n+5) { background: var(--xy-sky-soft);    color: var(--xy-sky-deep); }
.xy-pill:nth-child(6n+6) { background: var(--xy-pink-soft);   color: var(--xy-pink-deep); }

/* ==========================================================================
   小说卡片网格
   ========================================================================== */
.xy-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}
.xy-card {
    background: #fff;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh-1);
    transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s;
}
.xy-card:hover { transform: translateY(-5px); box-shadow: var(--sh-2); }
.xy-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.xy-card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xy-card:hover .xy-card-cover img { transform: scale(1.05); transition: transform .4s ease; }

/* 渐变占位封面（轻插画感） */
.xy-cover-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.18);
    background: linear-gradient(150deg, var(--xy-blue), var(--xy-violet));
    overflow: hidden;
}
.xy-cover-empty::before {
    content: "";
    position: absolute;
    width: 120%; height: 60%;
    top: -22%; left: -10%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,.45), transparent 55%);
}
.xy-cover-empty::after {
    content: "";
    position: absolute;
    width: 64px; height: 64px;
    right: -16px; bottom: -16px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
}
.xy-card:nth-child(6n+1) .xy-cover-empty { background: linear-gradient(150deg, #3d8bf2, #6b8bff); }
.xy-card:nth-child(6n+2) .xy-cover-empty { background: linear-gradient(150deg, #2fbf91, #5fd6b0); }
.xy-card:nth-child(6n+3) .xy-cover-empty { background: linear-gradient(150deg, #8b6cf0, #b39bff); }
.xy-card:nth-child(6n+4) .xy-cover-empty { background: linear-gradient(150deg, #ff8a66, #ffb088); }
.xy-card:nth-child(6n+5) .xy-cover-empty { background: linear-gradient(150deg, #29a3d6, #5cc6e8); }
.xy-card:nth-child(6n+6) .xy-cover-empty { background: linear-gradient(150deg, #f06ba6, #ff9ac6); }

.xy-tag {
    position: absolute;
    top: 9px; left: 9px;
    z-index: 1;
    padding: 3px 9px;
    border-radius: var(--r-pill);
    font-size: 11.5px;
    font-weight: 800;
    color: #fff;
    background: var(--xy-blue-deep);
    box-shadow: 0 3px 8px rgba(0,0,0,.16);
}
.xy-tag.end { background: var(--xy-violet-deep); }
.xy-card-score {
    position: absolute;
    top: 9px; right: 9px;
    z-index: 1;
    padding: 3px 9px 3px 8px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 800;
    color: var(--xy-ink);
    background: rgba(255,255,255,.94);
    box-shadow: 0 3px 8px rgba(0,0,0,.16);
}
.xy-card-score::before { content: "★ "; color: var(--xy-star); }

.xy-card-body { padding: 11px 12px 13px; }
.xy-card-title { font-size: 15px; line-height: 1.35; }
.xy-card-title a { color: var(--xy-ink); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.xy-card-title a:hover { color: var(--xy-blue-deep); }
.xy-card-meta { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 12px; }
.xy-card-cat { color: var(--xy-mint-deep); background: var(--xy-mint-soft); padding: 2px 9px; border-radius: var(--r-pill); font-weight: 700; }
.xy-card-author { color: var(--xy-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xy-card-blurb {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--xy-ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 41px;
}
.xy-card-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--xy-line-2); }
.xy-card-chap { font-size: 12px; color: var(--xy-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ==========================================================================
   最近更新表格 + 排行榜（轻量）
   ========================================================================== */
.xy-split { display: grid; grid-template-columns: 1fr 318px; gap: 18px; align-items: start; }
.xy-split-main { min-width: 0; }

.xy-table-wrap { background: #fff; border-radius: var(--r); box-shadow: var(--sh-1); overflow: hidden; }
.xy-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.xy-table th {
    text-align: left;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--xy-ink-2);
    background: var(--xy-blue-soft);
}
.xy-table td { padding: 11px 14px; border-top: 1px solid var(--xy-line-2); vertical-align: middle; }
.xy-table tbody tr { transition: background .12s; }
.xy-table tbody tr:hover { background: #f6f9ff; }
.xy-table .col-name a { font-weight: 700; color: var(--xy-ink); }
.xy-table .col-name a:hover { color: var(--xy-blue-deep); }
.xy-table .col-chap a { color: var(--xy-ink-2); }
.xy-table .col-chap a:hover { color: var(--xy-blue-deep); }
.xy-table .col-author { color: var(--xy-ink-2); white-space: nowrap; }
.xy-table .col-time { color: var(--xy-ink-3); white-space: nowrap; font-size: 12.5px; }
.xy-table-cat { color: var(--xy-violet-deep); font-weight: 600; }
.xy-state {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
    color: var(--xy-blue-deep);
    background: var(--xy-blue-soft);
}
.xy-state.end { color: var(--xy-violet-deep); background: var(--xy-violet-soft); }

/* 排行榜 widget */
.xy-rankw { background: #fff; border-radius: var(--r); box-shadow: var(--sh-1); overflow: hidden; }
.xy-rankw-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px 0; }
.xy-rankw-head b { font-size: 17px; color: var(--xy-ink); }
.xy-rankw-tabs { display: flex; gap: 4px; padding: 10px 12px; }
.xy-rankw-tab {
    flex: 1;
    padding: 7px 0;
    border: 0;
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--xy-ink-2);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.xy-rankw-tab:hover { color: var(--xy-blue-deep); }
.xy-rankw-tab.is-active { color: #fff; background: linear-gradient(135deg, var(--xy-blue), var(--xy-violet)); }
.xy-rankw-panel { display: none; padding: 4px 8px 12px; }
.xy-rankw-panel.is-active { display: block; }
.xy-rankw-list li { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 10px; transition: background .12s; }
.xy-rankw-list li:hover { background: #f6f9ff; }
.xy-rankw-no {
    flex: none;
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--xy-ink-3);
    background: var(--xy-line-2);
}
.xy-rankw-no.top1 { color: #fff; background: linear-gradient(135deg, #ff7a59, #ffb020); }
.xy-rankw-no.top2 { color: #fff; background: linear-gradient(135deg, #3d8bf2, #5fc6e8); }
.xy-rankw-no.top3 { color: #fff; background: linear-gradient(135deg, #2fbf91, #5fd6b0); }
.xy-rankw-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--xy-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xy-rankw-name:hover { color: var(--xy-blue-deep); }
.xy-rankw-by { flex: none; max-width: 84px; font-size: 12px; color: var(--xy-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 友情链接 */
.xy-friend-links { display: flex; flex-wrap: wrap; gap: 10px; }
.xy-friend-links a {
    padding: 7px 16px;
    border-radius: var(--r-pill);
    background: #fff;
    border: 1px solid var(--xy-line);
    font-size: 13px;
    color: var(--xy-ink-2);
    transition: color .15s, border-color .15s, transform .15s;
}
.xy-friend-links a:hover { color: var(--xy-blue-deep); border-color: var(--xy-blue); transform: translateY(-2px); }

/* ==========================================================================
   内容盒 / 面包屑 / 空状态（详情、目录、书库、搜索、书架、留言通用）
   ========================================================================== */
.xy-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--xy-ink-3); margin-bottom: 16px; }
.xy-crumb a { color: var(--xy-ink-2); }
.xy-crumb a:hover { color: var(--xy-blue-deep); }
.xy-crumb i { color: var(--xy-line); }
.xy-crumb span { color: var(--xy-ink); font-weight: 600; }

.xy-box { background: #fff; border-radius: var(--r); box-shadow: var(--sh-1); padding: 18px 20px; margin-bottom: 18px;margin-top: 18px; }
.xy-box-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--xy-line-2);flex-wrap: wrap; }
.xy-box-head h2 { font-size: 18px; color: var(--xy-ink); position: relative; padding-left: 13px; }
.xy-box-head h2::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 18px; border-radius: var(--r-pill); background: linear-gradient(var(--xy-blue), var(--xy-violet)); }
.xy-box-sub { font-size: 13px; color: var(--xy-ink-3); }
.xy-box-more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--xy-blue-deep); }
.xy-box-more:hover { text-decoration: underline; }

.xy-empty { text-align: center; padding: 48px 20px; color: var(--xy-ink-3); font-size: 14px; line-height: 1.9; }
.xy-empty a { color: var(--xy-blue-deep); font-weight: 600; }

/* ==========================================================================
   详情页
   ========================================================================== */
.xy-detail { display: grid; grid-template-columns: 180px 1fr; gap: 22px; background: #fff; border-radius: var(--r); box-shadow: var(--sh-1); padding: 22px; margin-bottom: 18px; }
.xy-detail-cover { position: relative; margin: 0; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-2); }
.xy-detail-cover .xy-cover-empty { font-size: 19px; }
.xy-detail-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xy-detail-info { min-width: 0; }
.xy-detail-title { font-size: 26px; line-height: 1.25; color: var(--xy-ink); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; text-wrap: balance; }
.xy-detail-title .xy-state { font-size: 12px; padding: 3px 11px; }
.xy-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0; font-size: 13.5px; color: var(--xy-ink-2); }
.xy-detail-meta a { color: var(--xy-blue-deep); }
.xy-detail-meta a:hover { text-decoration: underline; }
.xy-detail-meta em { color: var(--xy-ink); font-weight: 600; }
.xy-detail-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.xy-detail-stats li {
    flex: 1;
    min-width: 78px;
    text-align: center;
    padding: 12px 6px;
    border-radius: var(--r);
    background: linear-gradient(160deg, #f4f8ff, #eef3fe);
}
.xy-detail-stats b { display: block; font-size: 17px; color: var(--xy-ink); }
.xy-detail-stats span { font-size: 12px; color: var(--xy-ink-3); }
.xy-detail-update { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0; font-size: 13px; color: var(--xy-ink-2); }
.xy-detail-update em { color: var(--xy-ink); }
.xy-detail-latest a { color: var(--xy-blue-deep); font-weight: 600; }
.xy-detail-latest a:hover { text-decoration: underline; }
.xy-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.xy-detail-tags a {
    padding: 5px 13px;
    border-radius: var(--r-pill);
    font-size: 12.5px;
    font-weight: 600;
    background: var(--xy-violet-soft);
    color: var(--xy-violet-deep);
    transition: transform .15s;
}
.xy-detail-tags a:hover { transform: translateY(-2px); }
.xy-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.bookshelf-msg { font-size: 13px; }
.bookshelf-msg.ok { color: var(--xy-mint-deep); }
.bookshelf-msg.err { color: var(--xy-coral-deep); }

.xy-detail-intro { font-size: 14.5px; line-height: 1.95; color: var(--xy-ink); }
.xy-detail-intro p { margin: 0 0 12px; }
.xy-detail-newchap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(135deg, var(--xy-blue-soft), var(--xy-violet-soft)); }
.xy-detail-newchap a { font-weight: 700; color: var(--xy-ink); }
.xy-detail-newchap a:hover { color: var(--xy-blue-deep); }
.xy-detail-newchap span { font-size: 12.5px; color: var(--xy-ink-3); white-space: nowrap; }

/* ==========================================================================
   书库 / 分类页
   ========================================================================== */
.xy-filter { padding: 6px 20px; }
.xy-filter-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--xy-line); }
.xy-filter-row:last-child { border-bottom: 0; }
.xy-filter-label { flex: none; width: 44px; font-size: 13.5px; font-weight: 700; color: var(--xy-ink-3); padding-top: 5px; }
.xy-filter-opts { display: flex; flex-wrap: wrap; }
.xy-filter-opts a { padding: 5px 14px; border-radius: var(--r-pill); font-size: 13.5px; color: var(--xy-ink-2); transition: background .15s, color .15s; }
.xy-filter-opts a:hover { background: var(--xy-blue-soft); color: var(--xy-blue-deep); }
.xy-filter-opts a.active { background: linear-gradient(135deg, var(--xy-blue), var(--xy-violet)); color: #fff; font-weight: 700; }

.xy-list { display: flex; flex-direction: column; gap: 14px; }
.xy-list-item { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px; border-radius: var(--r); background: #fff; box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s; }
.xy-list-item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.xy-list-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; }
.xy-list-cover .xy-cover-empty { font-size: 13px; padding: 8px; }
.xy-list-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xy-list-info { min-width: 0; display: flex; flex-direction: column; }
.xy-list-title { font-size: 17px; color: var(--xy-ink); display: flex; align-items: center; gap: 9px;flex-wrap: wrap; }
.xy-list-title a:hover { color: var(--xy-blue-deep); }
.xy-list-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--xy-ink-2); }
.xy-list-desc { font-size: 13px; line-height: 1.7; color: var(--xy-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;    margin: 5px 0; }
.xy-list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xy-list-chap { font-size: 13px; color: var(--xy-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xy-list-chap:hover { color: var(--xy-blue-deep); }
.xy-list-date { flex: none; font-size: 12px; color: var(--xy-ink-3); }

/* ==========================================================================
   排行榜页（rank-* 非前缀类，沿用 tpl_novel_1 契约）
   ========================================================================== */
.xy-rank-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.xy-rank-tabs a { padding: 8px 18px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--xy-line); font-size: 14px; font-weight: 700; color: var(--xy-ink-2); transition: all .15s; }
.xy-rank-tabs a:hover { color: var(--xy-blue-deep); border-color: var(--xy-blue); }
.xy-rank-tabs a.active { color: #fff; background: linear-gradient(135deg, var(--xy-blue), var(--xy-violet)); border-color: transparent; }

.rank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rank-book-item { display: grid; grid-template-columns: 72px 1fr; gap: 13px; padding: 13px; border-radius: var(--r); background: linear-gradient(160deg, #f7faff, #fff); border: 1px solid var(--xy-line-2); transition: transform .18s, box-shadow .18s; }
.rank-book-item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.rank-book-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 9px; overflow: hidden; box-shadow: var(--sh-1); }
.rank-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-status { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 800; color: #fff; background: var(--xy-blue-deep); }
.rank-status.end { background: var(--xy-violet-deep); }
.rank-book-info { min-width: 0; display: flex; flex-direction: column; }
.rank-book-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.rank-book-title a { color: var(--xy-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-book-title a:hover { color: var(--xy-blue-deep); }
.rank-num { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-size: 12.5px; font-weight: 800; color: var(--xy-ink-3); background: var(--xy-line-2); }
.rank-num.top1, .rank-num.n1 { color: #fff; background: linear-gradient(135deg, #ff7a59, #ffb020); }
.rank-num.top2, .rank-num.n2 { color: #fff; background: linear-gradient(135deg, #3d8bf2, #5fc6e8); }
.rank-num.top3, .rank-num.n3 { color: #fff; background: linear-gradient(135deg, #2fbf91, #5fd6b0); }
.rank-book-author { margin: 5px 0; font-size: 12.5px; color: var(--xy-ink-2); }
.rank-book-desc { font-size: 12.5px; line-height: 1.65; color: var(--xy-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-book-meta { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--xy-coral-deep); font-weight: 700; }

/* 排行榜表格子模板（备用） */
.rank-td-center { text-align: center; }
.rank-book-name { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.rank-book-name a { color: var(--xy-ink); }
.rank-book-sub { font-size: 12px; color: var(--xy-ink-3); margin-top: 4px; }

/* ==========================================================================
   搜索结果页（search-* 非前缀类）
   ========================================================================== */
.xy-kw { color: var(--xy-coral-deep); }
.xy-search-tabs { margin-bottom: 14px; }
.xy-tag-cloud { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 12px 16px; background: #fff; border-radius: var(--r); box-shadow: var(--sh-1); }
.xy-tag-cloud-label { font-size: 13px; font-weight: 700; color: var(--xy-ink-3); }
.xy-tag-cloud a { padding: 4px 12px; border-radius: var(--r-pill); font-size: 12.5px; background: var(--xy-mint-soft); color: var(--xy-mint-deep); transition: transform .15s; }
.xy-tag-cloud a:hover { transform: translateY(-2px); }

.search-list { display: flex; flex-direction: column; gap: 14px; }
.search-item { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px; border-radius: var(--r); background: #fff; box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s; }
.search-item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.search-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; box-shadow: var(--sh-1); }
.search-cover img { width: 100%; height: 100%; object-fit: cover; }
.search-status { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 800; color: #fff; background: var(--xy-blue-deep); }
.search-status.end { background: var(--xy-violet-deep); }
.search-info { min-width: 0; }
.search-name { font-size: 18px; font-weight: 700; }
.search-name a { color: var(--xy-ink); }
.search-name a:hover { color: var(--xy-blue-deep); }
.search-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; font-size: 13px; color: var(--xy-ink-2); }
.search-desc { font-size: 13px; line-height: 1.7; color: var(--xy-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-latest { margin-top: 10px; font-size: 12.5px; color: var(--xy-ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.search-latest a { color: var(--xy-blue-deep); font-weight: 600; }
.search-date { color: var(--xy-ink-3); }

/* ==========================================================================
   章节目录页
   ========================================================================== */
.xy-catalog-head h1 { font-size: 22px; color: var(--xy-ink); }
.xy-catalog-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0; font-size: 13.5px; color: var(--xy-ink-2); }
.xy-catalog-meta em { color: var(--xy-ink); font-weight: 600; }
.xy-catalog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.xy-catalog-actions .xy-btn-ghost { background: var(--xy-violet-soft); color: var(--xy-violet-deep); border-color: transparent; }
.xy-catalog-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    width: 100%;
}
.xy-catalog-item { min-width: 0; }
.xy-catalog-item a {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f6f9ff;
    font-size: 13.5px;
    color: var(--xy-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.xy-catalog-item a:hover { background: var(--xy-blue-soft); color: var(--xy-blue-deep); }
.xy-catalog-item.is-new a { background: var(--xy-coral-soft); color: var(--xy-coral-deep); font-weight: 700; }

/* ==========================================================================
   阅读页
   ========================================================================== */
.xy-read-shell { max-width: 860px; padding-top: 18px; }
.xy-read { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 28px 32px 24px; }
.xy-read-head { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--xy-line-2); }
.xy-read-title { font-size: 24px; line-height: 1.35; color: var(--xy-ink); text-wrap: balance; }
.xy-read-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 10px; font-size: 13px; color: var(--xy-ink-3); }
.xy-read-meta a { color: var(--xy-blue-deep); }

.xy-read-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; padding: 12px 14px; border-radius: var(--r); background: #f6f9ff; }
.xy-read-nav { display: flex; gap: 8px; }
.xy-read-nav a, .xy-read-nav span { padding: 7px 16px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 700; }
.xy-read-nav a { background: #fff; color: var(--xy-blue-deep); border: 1px solid var(--xy-line); transition: all .15s; }
.xy-read-nav a:hover { border-color: var(--xy-blue); background: var(--xy-blue-soft); }
.xy-read-nav span.disabled { color: var(--xy-ink-3); background: #eef1f7; }
.xy-read-settings { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.xy-read-settings-label { font-size: 12.5px; color: var(--xy-ink-3); margin-left: 4px; }
.xy-read-settings button {
    min-width: 38px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--xy-line);
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--xy-ink-2);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
}
.xy-read-settings button:hover { border-color: var(--xy-blue); color: var(--xy-blue-deep); background: var(--xy-blue-soft); }

.xy-read-content {
    font-family: var(--xy-ff-read);
    font-size: 18px;
    line-height: 2;
    color: #33384a;
    padding: 22px 2px;
    word-break: break-word;
}
.xy-read-content p { margin: 0 0 1.1em; text-indent: 2em; }
.xy-read-empty { padding: 60px 0; text-align: center; color: var(--xy-ink-3); }

.xy-read-pager { display: flex; justify-content: center; gap: 12px; margin: 8px 0 18px; }
.xy-read-pager a, .xy-read-pager span { flex: 1; max-width: 180px; text-align: center; padding: 12px; border-radius: var(--r-pill); font-size: 14px; font-weight: 700; }
.xy-read-pager a { background: linear-gradient(135deg, var(--xy-blue), #5a8bff); color: #fff; box-shadow: var(--sh-blue); transition: transform .15s; }
.xy-read-pager a:hover { transform: translateY(-2px); }
.xy-read-pager span.disabled { background: #eef1f7; color: var(--xy-ink-3); }
.xy-read-notice { font-size: 12.5px; line-height: 1.8; color: var(--xy-ink-3); padding-top: 16px; border-top: 1px solid var(--xy-line-2); }

/* 阅读主题：护眼 / 夜间 */
body.read-bg-soft { background: #f6f1e3; }
body.read-bg-soft .xy-read { background: #faf6ea; }
body.read-bg-soft .xy-read-content { color: #5b4a32; }
body.read-bg-soft .xy-read-toolbar { background: #f1ead7; }
body.read-bg-dark { background: #161a26; }
body.read-bg-dark .xy-masthead { background: #1d2230; box-shadow: none; }
body.read-bg-dark .xy-read { background: #1f2433; box-shadow: none; }
body.read-bg-dark .xy-read-title,
body.read-bg-dark .xy-read-content { color: #c4ccdb; }
body.read-bg-dark .xy-read-head { border-color: #2c3243; }
body.read-bg-dark .xy-read-toolbar { background: #262c3d; }
body.read-bg-dark .xy-read-nav a,
body.read-bg-dark .xy-read-settings button { background: #2c3243; border-color: #353d52; color: #aab2c5; }
body.read-bg-dark .xy-read-notice { color: #6b7488; border-color: #2c3243; }
body.read-bg-dark .xy-crumb,
body.read-bg-dark .xy-crumb span { color: #8a93a8; }

/* ==========================================================================
   书架 / 浏览记录
   ========================================================================== */
.xy-history-note { padding: 12px 16px; margin-bottom: 14px; border-radius: var(--r); background: var(--xy-blue-soft); font-size: 13px; line-height: 1.7; color: #355a92; }
.xy-history-clear { color: var(--xy-coral-deep) !important; }
.xy-history-table .col-act { white-space: nowrap; }
.xy-history-btn { display: inline-block; padding: 4px 12px; margin: 2px 3px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; background: #f0f4fb; color: var(--xy-ink-2); transition: all .15s; }
.xy-history-btn:hover { background: var(--xy-blue-soft); color: var(--xy-blue-deep); }
.xy-history-btn.read { background: var(--xy-mint-soft); color: var(--xy-mint-deep); }
.xy-history-btn.del:hover { background: var(--xy-coral-soft); color: var(--xy-coral-deep); }
.xy-history-table .col-latest a { color: var(--xy-ink-2); }
.xy-history-table .col-chap a { color: var(--xy-blue-deep); }

/* ==========================================================================
   留言 / 评论
   ========================================================================== */
.xy-gbook { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }

.gb-list { display: flex; flex-direction: column; gap: 14px; }
.gb-card { display: flex; gap: 12px; }
.gb-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; background: var(--xy-line-2); }
.gb-body { flex: 1; min-width: 0; background: #f6f9ff; border-radius: var(--r); padding: 12px 15px; }
.gb-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.gb-name { font-size: 14px; font-weight: 700; color: var(--xy-ink); }
.gb-time { font-size: 12px; color: var(--xy-ink-3); }
.gb-badge { margin-left: auto; font-size: 11px; color: var(--xy-ink-3); background: #fff; padding: 1px 8px; border-radius: var(--r-pill); }
.gb-content { margin: 0; font-size: 14px; line-height: 1.75; color: var(--xy-ink); word-break: break-word; }
.gb-reply { margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: var(--xy-mint-soft); font-size: 13px; line-height: 1.7; color: #2f5a48; }
.gb-reply b { color: var(--xy-mint-deep); }
.gb-reply-time { display: block; margin-top: 3px; font-size: 11.5px; color: var(--xy-ink-3); }
.gb-child { margin-top: 10px; }
.gb-child .gb-body { background: #fff; border: 1px solid var(--xy-line-2); }

.gb-empty { text-align: center; padding: 40px 20px; }
.gb-empty-icon { width: 44px; height: 44px; color: #c7d4ea; margin: 0 auto 10px; }
.gb-empty-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--xy-ink-2); }
.gb-empty-sub { margin: 4px 0 0; font-size: 13px; color: var(--xy-ink-3); }

.gb-form-body { }
.gb-textarea { width: 100%; min-height: 110px; padding: 13px 15px; border: 1.5px solid var(--xy-line); border-radius: var(--r); font-family: inherit; font-size: 14px; line-height: 1.7; color: var(--xy-ink); resize: vertical; outline: 0; transition: border-color .15s, box-shadow .15s; }
.gb-textarea:focus { border-color: var(--xy-blue); box-shadow: 0 0 0 4px rgba(61,139,242,.12); }
.gb-counter { display: flex; justify-content: space-between; margin: 8px 0; font-size: 12.5px; color: var(--xy-ink-3); }
.gb-counter em { color: var(--xy-blue-deep); font-weight: 700; }
.gb-captcha { display: flex; gap: 10px; margin-bottom: 10px; }
.gb-captcha img { height: 40px; border-radius: 8px; cursor: pointer; border: 1px solid var(--xy-line); }
.gb-captcha input { flex: 1; height: 40px; padding: 0 5px; border: 1.5px solid var(--xy-line); border-radius: var(--r-pill); font-family: inherit; font-size: 14px; outline: 0; }
.gb-captcha input:focus { border-color: var(--xy-blue); }
.gb-msg { font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.gb-msg.ok { color: var(--xy-mint-deep); }
.gb-msg.err { color: var(--xy-coral-deep); }
.gb-submit { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 26px; border: 0; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--xy-blue), #5a8bff); color: #fff; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; box-shadow: var(--sh-blue); transition: transform .15s; }
.gb-submit svg { width: 17px; height: 17px; }
.gb-submit:hover { transform: translateY(-2px); }
.gb-submit:disabled { opacity: .6; pointer-events: none; }
.gb-note { margin: 12px 0 0; font-size: 12px; color: var(--xy-ink-3); line-height: 1.6; }

/* 详情页评论区 */
.nc-wrap { }
.nc-form { margin-bottom: 18px; }
.nc-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.nc-tools-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nc-count { font-size: 12.5px; color: var(--xy-ink-3); }
.nc-count em { color: var(--xy-blue-deep); font-weight: 700; }
.nc-submit { height: 40px; }
.nc-box { margin-top: 6px; }
.nc-loading { padding: 26px; text-align: center; color: var(--xy-ink-3); font-size: 13.5px; }
.nc-loading a { color: var(--xy-blue-deep); }
.nc-listhead { font-size: 14px; font-weight: 700; color: var(--xy-ink); margin-bottom: 12px; }
.nc-listhead em { color: var(--xy-blue-deep); }
.nc-list { display: flex; flex-direction: column; gap: 14px; }

/* ==========================================================================
   分页
   ========================================================================== */
.xy-pager, .rank-page, .nc-page { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; margin-top: 22px; }
.xy-pager a, .xy-pager span,
.rank-page a, .rank-page span,
.nc-page a, .nc-page span {
    min-width: 38px;
    height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    background: #fff;
    border: 1px solid var(--xy-line);
    color: var(--xy-ink-2);
    transition: all .15s;
}
.xy-pager a:hover, .rank-page a:hover, .nc-page a:hover { border-color: var(--xy-blue); color: var(--xy-blue-deep); background: var(--xy-blue-soft); }
.xy-pager .current, .rank-page .current, .nc-page .current { color: #fff; background: linear-gradient(135deg, var(--xy-blue), var(--xy-violet)); border-color: transparent; }
.xy-pager .disabled, .rank-page .disabled, .nc-page .disabled { color: var(--xy-ink-3); background: #f1f4fa; cursor: not-allowed; }
.xy-pager .page-total, .rank-page .page-total, .nc-page .page-total { background: transparent; border: 0; color: var(--xy-ink-3); font-weight: 600; }

/* ==========================================================================
   页脚 + 移动端 Tabbar
   ========================================================================== */
.xy-footer { margin-top: 36px; padding: 28px 0 24px; background: #fff; border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--xy-blue), var(--xy-violet), var(--xy-mint)) 1; }
.xy-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-bottom: 16px; }
.xy-footer-links a { font-size: 13.5px; color: var(--xy-ink-2); }
.xy-footer-links a:hover { color: var(--xy-blue-deep); }
.xy-footer-note { text-align: center; font-size: 12.5px; line-height: 1.9; color: var(--xy-ink-3); }
.xy-copyright { color: var(--xy-ink-2); font-weight: 600; margin-top: 6px; }

.xy-tabbar { display: none; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
    .xy-grid { grid-template-columns: repeat(4, 1fr); }
    .rank-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .xy-hero { grid-template-columns: 1fr; }
    .xy-hero-side { order: 2; }
    .xy-split { grid-template-columns: 1fr; }
    .xy-gbook { grid-template-columns: 1fr; }
    .xy-head-hot { display: none; }
}

@media (max-width: 768px) {
    .xy-topbar { display: none; }
    .xy-headmain-inner { height: 60px; gap: 12px; }
    .xy-logo-mark { width: 40px; height: 40px; font-size: 21px; border-radius: 13px; }
    .xy-logo-text { font-size: 18px; display:none; }
    .xy-logo-text em { display: none; }
    .xy-search { height: 42px; max-width: none; }
    .xy-search button { padding: 0 16px; }
    /* 防止 iOS 输入聚焦缩放：字号 ≥16px */
    .xy-search input, .gb-textarea, .gb-captcha input { font-size: 16px; }

    /* 频道导航折叠为汉堡下拉 */
    .xy-channels-inner { min-height: 0; }
    .xy-burger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 44px; height: 44px; padding: 11px; margin: 5px 0; border: 0; border-radius: 10px; background: var(--xy-blue-soft); cursor: pointer; }
    .xy-burger span { height: 2.5px; border-radius: 2px; background: var(--xy-blue-deep); transition: transform .2s, opacity .2s; }
    .xy-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .xy-burger.is-open span:nth-child(2) { opacity: 0; }
    .xy-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
    .xy-channels-list {
        position: absolute;
        top: calc(100% + 6px);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 8px;
        background: #fff;
        border-radius: var(--r);
        box-shadow: var(--sh-2);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height .25s ease, opacity .2s, visibility .2s;
        z-index: 5;
    }
    .xy-channels-list.is-open { max-height: 70vh; overflow: auto; opacity: 1; visibility: visible; }
    .xy-channels-list a { padding: 11px 14px; border-radius: 10px; }

    .xy-main { padding: 16px 12px 30px; }
    .xy-shell { padding: 12px; }
    .xy-sec { margin-top: 24px; }
    .xy-sec-title { font-size: 18px; }
    .xy-sec-sub { display: none; }
    .xy-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .xy-slide-title { font-size: 21px; }
    .xy-slide-blurb { -webkit-line-clamp: 2; }
    .xy-carousel { height: clamp(220px, 56vw, 320px); }
    .xy-carousel-arrow { display: none; }

    /* 表格在小屏隐藏次要列 */
    .xy-table .col-author, .xy-table .col-time { display: none; }

    .xy-detail { grid-template-columns: 120px 1fr; gap: 16px; padding: 16px;display: block; }
    .xy-detail-title { font-size: 21px; }
    .xy-detail-stats li { min-width: 64px; padding: 9px 4px; }
    .xy-detail-stats b { font-size: 12px; }

    .search-item, .xy-list-item { grid-template-columns: 80px 1fr; gap: 12px; }
    .search-name { font-size: 16px; }
    .xy-list-title { font-size: 15px; }
    .xy-history-table .col-cat, .xy-history-table .col-author, .xy-history-table .col-latest { display: none; }

    .xy-catalog-list { grid-template-columns: repeat(1, minmax(0, 1fr)); }

    .xy-read-shell { padding: 12px; }
    .xy-read { padding: 18px 16px; border-radius: var(--r); }
    .xy-read-title { font-size: 20px; }
    .xy-read-content { font-size: 17px; }

    /* 移动端触控目标 ≥40px */
    .xy-read-settings button { height: 40px; min-width: 44px; }
    .xy-read-nav a, .xy-read-nav span { padding: 11px 16px; }
    .xy-rankw-tab { padding: 11px 0; }

    /* 轮播圆点：保持小视觉，扩大触控热区 ≥40px */
    .xy-dot { position: relative; }
    .xy-dot::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; }

    /* 移动端底部 Tabbar */
    .xy-tabbar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: var(--z-tabbar);
        background: rgba(255,255,255,.97);
        border-top: 1px solid var(--xy-line);
        box-shadow: 0 -4px 18px rgba(45,80,160,.08);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .xy-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; font-size: 11px; color: var(--xy-ink-3); }
    .xy-tabbar svg { width: 22px; height: 22px; }
    .xy-tabbar a.active { color: var(--xy-blue-deep); }
    /*body.xy-page { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }*/
    body.xy-read-page .xy-footer { margin-bottom: 0; }
}

@media (max-width: 520px) {
    .xy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rank-grid { grid-template-columns: 1fr; }
    .xy-slide-title { font-size: 19px; }
    .xy-slide-actions .xy-btn { height: 36px; padding: 0 16px; flex: 1; }
    .xy-detail { grid-template-columns: 96px 1fr;display: block; }
    .xy-detail-actions .xy-btn { flex: 1; }
    .xy-pick-cat { display: none; }
    .xy-detail-cover {width: 130px;
        height: 175px;
        margin: 0 auto;}
    .xy-detail-info { margin-top: 10px; }

    /* 窄屏分类胶囊紧凑化，减少换行拥挤 */
    .xy-catbar { padding: 12px; gap: 8px; }
    .xy-pill { padding: 7px 14px; font-size: 13px; }
    /* 超长标签在 320px 不撑破布局 */
    .xy-detail-tags a, .xy-tag-cloud a { overflow-wrap: break-word; }
}

/* 可访问性：尊重减少动效 */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .xy-card:hover, .xy-list-item:hover, .search-item:hover, .rank-book-item:hover, .xy-btn:hover, .xy-pill:hover, .xy-friend-links a:hover { transform: none; }
}

/* 焦点可见性 */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--xy-blue);
    outline-offset: 2px;
}
