/* ============================================================
   富贵导航 · 新模板（参照目标站布局重写，非复制其代码/素材）
   设计令牌：浅灰底 + 白卡片 + 靛蓝主色 + 12px 圆角
   ============================================================ */
:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --border: #eef0f3;
    --inner-bg: #f7f8fa;
    --text: #222222;
    --muted: #666666;
    --muted2: #999999;
    --chip-bg: #f5f6f8;
    --chip-text: #777777;
    --primary: #2b3a9e;
    --primary-2: #3b82f6;
    --primary-soft: #eef1fb;
    --danger: #ff4d4f;
    --shadow: 0 8px 20px rgba(0, 0, 0, .07);
    --radius: 12px;
}

html[data-theme="dark"],
html.dark {
    --bg: #0f1115;
    --card: #171a21;
    --border: #262b36;
    --inner-bg: #1f242e;
    --text: #e8eaf0;
    --muted: #aab1c2;
    --muted2: #8b93a5;
    --chip-bg: #1f242e;
    --chip-text: #9aa2b3;
    --primary: #8fb4ff;
    --primary-2: #3b82f6;
    --primary-soft: #1f2a44;
    --shadow: 0 8px 20px rgba(0, 0, 0, .4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    transition: background-color .25s, color .25s;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { border: 0; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 20px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.tb-burger {
    display: none;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 7px;
}
.tb-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--muted);
    margin: 4px 0;
}
.tb-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
}
.tb-nav::-webkit-scrollbar { display: none; }
.tb-nav a {
    font-size: 13.5px;
    color: var(--muted);
    white-space: nowrap;
    position: relative;
    padding: 14px 0;
    transition: color .15s;
}
.tb-nav a:hover { color: var(--primary); }
.tb-nav a.on { color: var(--text); font-weight: 700; }
.tb-nav a.on::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 7px;
    transform: translateX(-50%);
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.tb-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.tb-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.tb-link i { font-size: 14px; }
.tb-link:hover { color: var(--primary); }
.tb-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
    max-width: 190px;
}
.tb-user i { font-size: 15px; }
.tb-user span { overflow: hidden; text-overflow: ellipsis; }
.ys-theme-toggle {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s, color .15s;
    padding: 0;
}
.ys-theme-toggle i { font-size: 17px; }
.ys-theme-toggle:hover { background: var(--inner-bg); color: var(--text); }
.ys-theme-toggle--inline { position: static; }

/* ---------------- 三栏骨架 ---------------- */
.layout {
    max-width: 1520px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 260px;
    gap: 22px;
    align-items: start;
}
.main { min-width: 0; }

/* ---------------- 左侧分类栏 ---------------- */
.side {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 14px 16px;
    overflow-y: auto;
    scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }
.side-close { display: none; }
.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 4px;
}
.logo img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    flex: 0 0 34px;
}
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logo-desc {
    font-size: 10px;
    color: var(--muted2);
    letter-spacing: .4px;
    line-height: 1.4;
}
.side-menu {
    margin-top: 18px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.side-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 13px;
    color: var(--muted);
    transition: color .15s, background-color .15s;
}
.side-menu a:hover { color: var(--primary); background: var(--inner-bg); }
.side-menu a.on { color: var(--primary); background: var(--inner-bg); font-weight: 600; }
.side-menu a .mi {
    width: 18px;
    text-align: center;
    font-size: 15px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.side-menu a .mi i { font-size: 16px; }
.zn-side-btns {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
}
.zn-side-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 12px;
    background: var(--inner-bg);
    color: var(--muted);
    transition: all .15s;
}
.zn-side-btn:hover { color: var(--primary); background: var(--primary-soft); }
.zn-sb-ico { font-size: 15px; display: inline-flex; }
.zn-sb-tx { flex: 1; }
.zn-sb-arrow { font-size: 13px; opacity: .6; }

/* ---------------- 卡片 & 版块 ---------------- */
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.sec-head .sec-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    font-weight: 700;
    color: #334155;
}
html[data-theme="dark"] .sec-head .sec-title { color: var(--text); }
.sec-head .sec-title i { font-size: 18px; color: var(--primary); }
.zn-cat-more {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted2);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.zn-cat-more:hover { color: var(--primary); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--chip-text);
    cursor: pointer;
    user-select: none;
    transition: all .15s;
    border: 0;
}
.tab:hover { color: var(--primary); }
.tab.on { background: var(--primary-2); color: #fff; }

/* ---------------- 首页搜索区 ---------------- */
.hero-search {
    background: var(--inner-bg);
    border-radius: var(--radius);
    padding: 32px 20px 30px;
    margin-bottom: 14px;
    text-align: center;
    position: relative;
    /* 必须比下面的 .hero-row 高：两者都建了层叠上下文，
       同层级时后出现在 DOM 的推荐卡片会盖住搜索联想下拉（2026-11-04 修） */
    z-index: 5;
}
.hs-tabs {
    display: flex;
    justify-content: center;
    gap: 22px;
}
.hs-tab {
    font-size: 20px;
    font-weight: 700;
    color: var(--muted2);
    cursor: pointer;
    position: relative;
    padding-bottom: 4px;
    transition: color .15s;
    user-select: none;
}
.hs-tab:hover { color: var(--text); }
.hs-tab.on { color: var(--primary); }
.hs-tab.on::before {
    content: '';
    position: absolute;
    left: -5px;
    right: -5px;
    bottom: 2px;
    height: 9px;
    border-radius: 5px;
    background: #c9d4f5;
    opacity: .5;
    z-index: -1;
}
html[data-theme="dark"] .hs-tab.on::before { background: #2b3a9e; opacity: .6; }
.hs-box {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 620px;
    margin: 14px auto 0;
    background: var(--card);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 5px 5px 5px 16px;
    position: relative;
}
.hs-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.6;
    padding: 8px 0;
}
.hs-box input::placeholder { color: var(--muted2); }
.hs-box button {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}
.hs-box button:hover { opacity: .88; }
.hs-box button i { font-size: 19px; }
.hs-engines {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 13px;
}
.hs-engine {
    color: var(--muted);
    cursor: pointer;
    position: relative;
    padding-bottom: 8px;
    transition: color .15s;
    user-select: none;
}
.hs-engine:hover { color: var(--text); }
.hs-engine.on { color: var(--primary); font-weight: 700; }
.hs-engine.on::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--primary);
}
/* 搜索联想 */
.hs-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 60;
    display: none;
    /* 纵向 flex：只有结果列表滚，底部「查看全部」始终固定在面板底边 */
    flex-direction: column;
    max-height: 340px;
    overflow: hidden;
    text-align: left;
}
/* 面板下方空间不够时向上弹（JS 会给 .is-up） */
.hs-suggest.is-up {
    top: auto;
    bottom: calc(100% + 6px);
}
.hs-suggest.show { display: flex; }

/* 结果列表：独立滚动，滚到尽头不带动页面一起滚 */
.hs-suggest .s-list {
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.hs-suggest .s-list.is-scrollable { overscroll-behavior: contain; }

/* 滚动条要看得见：不然内容被切一半，用户不知道还能往下滑 */
.hs-suggest .s-list::-webkit-scrollbar { width: 8px; }
.hs-suggest .s-list::-webkit-scrollbar-track { background: transparent; }
.hs-suggest .s-list::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 999px;
}
.hs-suggest .s-list::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, .3); }

/* 底部固定出口：联想只给 8 条，剩下 70 多条得有个明确去处 */
.hs-suggest .s-all {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 12px;
    background: var(--card);
    border-top: 1px solid var(--border);
    border-radius: 0 0 9px 9px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.hs-suggest .s-all:hover { background: var(--inner-bg); }
.hs-suggest .s-all-arrow { font-size: 14px; line-height: 1; }

html[data-theme="dark"] .hs-suggest .s-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .16);
}
html[data-theme="dark"] .hs-suggest .s-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .3);
}

/* 搜索区所在的卡片不能裁剪：下拉面板本来就是浮在卡片外的，
   .panel 的 overflow:hidden 会把它拦腰切断（表现为「滑不下去」） */
.panel--search,
.panel:has(.hero-search) {
    overflow: visible;
}
.hs-suggest a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}
.hs-suggest a:hover { background: var(--inner-bg); }
.hs-suggest .s-ico {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    flex: 0 0 24px;
    object-fit: cover;
    background: var(--chip-bg);
}
.hs-suggest .s-name {
    font-weight: 600;
    white-space: nowrap;   /* 窄屏下别把站名折成两三行 */
    flex: 0 0 auto;
}
.hs-suggest .s-desc {
    color: var(--muted2);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
    flex: 1 1 auto;
    min-width: 0;          /* 少了这句，flex 子项不会收缩，长描述会把名字挤变形 */
}
.hs-suggest .s-empty { padding: 16px; text-align: center; color: var(--muted2); font-size: 12px; }
@media (max-width: 640px) {
    .hs-suggest .s-desc { max-width: none; }
}

/* ---------------- 首页横幅 ---------------- */
.hero-row {
    display: grid;
    /* 推荐位只放「推荐」站点，数量不定：有几张铺几列，不留空格子 */
    grid-template-columns: repeat(var(--hero-cols, 4), minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.hero-card {
    position: relative;
    min-height: 118px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(135deg, #2b3a9e, #3b82f6);
    transition: transform .15s, box-shadow .15s;
}
.hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.hero-card .hc-logo {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, .18);
    flex: 0 0 54px;
}
.hero-card .hc-info { min-width: 0; }
.hero-card .hc-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-card .hc-desc {
    margin-top: 4px;
    font-size: 11.5px;
    opacity: .82;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-card .hc-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    backdrop-filter: blur(4px);
}
.hero-card.c2 { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.hero-card.c3 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.hero-card.c4 { background: linear-gradient(135deg, #b45309, #f59e0b); }

/* ---------------- 站点卡片 ---------------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}
.zn-card-hit-wrap { position: relative; min-width: 0; }
.zn-card-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 46px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 8px 0 10px;
    transition: box-shadow .15s, transform .15s, border-color .15s;
    min-width: 0;
}
.zn-card-wrap:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #dde4f5; }
html[data-theme="dark"] .zn-card-wrap:hover { border-color: #3a4256; }
.zn-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
    height: 100%;
}
.zn-chip-ico {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 22px;
    background: var(--chip-bg);
}
.zn-chip-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}
.zn-card-wrap:hover .zn-chip-name { color: var(--text); }
/*
 * 详情箭头不再占位，改为浮在卡片右端。
 * 原来它是 flex 项，吃掉 22px，加上内边距和图标，卡片里给名字只剩 50px，
 * 1366 宽度下 4 个汉字就会出省略号（「萌谷导…」）。浮起来后名字能用到 77px。
 * 默认 pointer-events:none —— 否则鼠标还没移上去，点到卡片右侧会误跳详情页。
 */
.zn-chip-arrow {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted2);
    background: var(--card);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s, background-color .15s, color .15s;
}
.zn-card-wrap:hover .zn-chip-arrow { opacity: 1; pointer-events: auto; }
/*
 * 箭头浮上来时会盖住名字右端 18px，所以悬停时给名字留出这块空位，
 * 让浏览器重新按省略号截断。
 * 不要用 mask 做淡出——遮罩会把省略号本身一起淡掉，看起来像字被切了一半。
 */
.zn-card-wrap:hover .zn-chip-name { padding-right: 20px; }
/* 触屏没有 hover，箭头常显，否则根本点不到详情；同时给名字让出同样的空位 */
@media (hover: none) {
    .zn-chip-arrow { opacity: 1; pointer-events: auto; }
    .zn-chip-name { padding-right: 20px; }
}
.zn-chip-arrow:hover { background: var(--primary-soft); color: var(--primary); }
.zn-chip-arrow i { font-size: 15px; }

/* ---------------- 右侧栏 ---------------- */
.rside {
    position: sticky;
    top: 70px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rside .panel { margin-bottom: 0; }
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    padding: 14px 10px;
}
.stats .st-col + .st-col { border-left: 1px solid var(--border); }
.stats .st-label { font-size: 11px; color: var(--muted2); }
.stats .st-val { margin-top: 5px; font-size: 13px; font-weight: 700; }
.r-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.r-title { font-size: 14px; font-weight: 700; }
.r-act { font-size: 11px; color: var(--muted2); cursor: pointer; }
.r-act:hover { color: var(--primary); }
.visit-list { margin-top: 6px; }
.visit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    background: var(--inner-bg);
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 12px;
    font-weight: 500;
}
.visit-item img {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex: 0 0 20px;
    object-fit: cover;
}
.visit-item .v-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-tip { margin-top: 10px; font-size: 12px; color: var(--muted2); text-align: center; padding: 8px 0; }
.latest-list { margin-top: 4px; }
.latest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12.5px;
}
.latest-item:nth-child(odd) { background: var(--inner-bg); }
.latest-item:hover { background: var(--inner-bg); }
.latest-item .idx {
    flex: 0 0 20px;
    font-size: 12px;
    font-weight: 800;
    font-style: italic;
    color: #c3c8d4;
    text-align: center;
}
.latest-item .idx.t1 { color: var(--danger); }
.latest-item .idx.t2 { color: #ff7a45; }
.latest-item .idx.t3 { color: #faad14; }
.latest-item .ico {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex: 0 0 22px;
    overflow: hidden;
    background: var(--chip-bg);
}
.latest-item .ico img { width: 100%; height: 100%; object-fit: cover; }
.latest-item .lt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 视频卡 */
.xjj-stage {
    position: relative;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: #0b0d12;
    aspect-ratio: 1 / 1.05;
}
.xjj-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0b0d12;
}
.xjj-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    font-size: 10px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border-radius: 999px;
    padding: 2px 8px;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}
.xjj-badge.show { opacity: 1; }
.xjj-btns { display: flex; gap: 8px; margin-top: 8px; }
.xjj-btns button {
    flex: 1;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
}
.xjj-btns button:last-child { background: var(--primary); border-color: var(--primary); color: #fff; }
.xjj-btns button:hover { opacity: .9; }

/* 视频卡：默认折叠成一行，点标题展开 */
.xjj-panel.is-collapsed { padding-top: 12px; padding-bottom: 12px; }
.xjj-head { cursor: pointer; user-select: none; border-radius: 8px; }
.xjj-head:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.xjj-head .r-title { display: inline-flex; align-items: center; gap: 5px; transition: color .15s; }
.xjj-head .r-title i { font-size: 16px; color: var(--primary); }
.xjj-head:hover .r-title { color: var(--primary); }
.xjj-acts { display: inline-flex; align-items: center; gap: 10px; }
.xjj-caret { font-size: 15px; color: var(--muted2); transition: transform .2s ease; }
.xjj-panel:not(.is-collapsed) .xjj-caret { transform: rotate(180deg); }

/*
 * 展开但还没播放时的封面。
 * 有它就不用一进来就拉视频流——右边栏在 10 个页面里都有，自动播放等于每翻一页都重新下载一次。
 */
.xjj-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: radial-gradient(120% 90% at 50% 40%, rgba(17, 20, 28, .55), rgba(11, 13, 18, .88));
    color: #fff;
    font-size: 12px;
    letter-spacing: .5px;
    cursor: pointer;
}
.xjj-cover[hidden] { display: none; }
.xjj-cover i { font-size: 44px; opacity: .9; transition: transform .15s, opacity .15s; }
.xjj-cover:hover i { transform: scale(1.06); opacity: 1; }

/* ---------------- 页脚 ---------------- */
.site-footer {
    margin-top: 24px;
    background: var(--card);
    border-top: 1px solid var(--border);
}
.ft-inner { max-width: 1520px; margin: 0 auto; padding: 30px 20px 24px; }
.ft-tip {
    font-size: 12px;
    color: var(--muted);
    background: var(--inner-bg);
    border: 1px dashed #dbe4f3;
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.8;
}
html[data-theme="dark"] .ft-tip { border-color: #333b4d; }
.ft-tip kbd {
    display: inline-block;
    padding: 0 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 11px;
    font-family: inherit;
}
.ft-tip em { font-style: normal; margin: 0 2px; }
.ft-links { margin-top: 18px; font-size: 12px; color: var(--muted); }
.ft-links-t { margin-bottom: 6px; }
.friend-links-box { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.friend-links-box .link-item { color: var(--muted2); }
.friend-links-box .link-item:hover { color: var(--primary); }
.ft-bottom {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.ft-copy-row { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; }
.ft-copy, .ft-icp { font-size: 12px; color: var(--muted2); }
.ft-icp a:hover { color: var(--primary); }
.ft-nav { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.ft-nav a { font-size: 12px; color: var(--muted2); position: relative; }
.ft-nav a:hover { color: var(--primary); }

/* ---------------- 通用页面头部（面包屑 / Hero） ---------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted2);
    margin: 0 0 12px 4px;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .6; }
.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #3b82f6 0%, #6366f1 55%, #8b5cf6 100%);
    color: #fff;
    padding: 28px 26px;
    margin-bottom: 16px;
}
.page-hero::after {
    content: attr(data-watermark);
    position: absolute;
    right: 18px;
    bottom: -10px;
    font-size: 54px;
    font-weight: 800;
    color: rgba(255, 255, 255, .12);
    letter-spacing: 2px;
    pointer-events: none;
}
.page-hero .ph-kicker {
    display: inline-block;
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    margin-bottom: 10px;
}
.page-hero h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 8px;
}
.page-hero p { font-size: 13px; opacity: .88; line-height: 1.7; }
.page-hero .ph-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.page-hero .ph-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 12px;
}
.page-hero .ph-btn:hover { background: rgba(255, 255, 255, .26); }

/* ---------------- 分类页 ---------------- */
.cat-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #3b82f6, #6366f1);
    color: #fff;
    padding: 22px 24px;
}
.cat-hero .ch-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
}
.cat-hero .ch-icon i { font-size: 28px; }
.cat-hero h1 { font-size: 24px; font-weight: 800; line-height: 1.3; }
.cat-hero .ch-sub { margin-top: 4px; font-size: 12px; opacity: .86; }
.cat-hero .ch-count {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}
.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
}
.cat-filters a {
    font-size: 12px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--chip-text);
    transition: all .15s;
}
.cat-filters a:hover { color: var(--primary); }
.cat-filters a.on { background: var(--primary); color: #fff; }

/* ---------------- 站点详情 ---------------- */
.site-hero-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
.site-hero-logo {
    width: 92px;
    height: 92px;
    border-radius: 16px;
    object-fit: cover;
    flex: 0 0 92px;
    background: var(--inner-bg);
}
.site-hero-body { min-width: 0; flex: 1; }
.site-hero-body h1 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.site-hero-body h1 .badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
}
.site-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted2);
}
.site-meta b { color: var(--muted); font-weight: 600; }
.site-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.site-tags a, .site-tags span {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--inner-bg);
    color: var(--muted);
}
/* 权重徽章（详情页，数据由 ajax_site_weight.php 异步补齐） */
.site-weight-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.weight-badge {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 18px;
    border-radius: 4px;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    text-decoration: none;
    overflow: hidden;
    transition: filter .15s ease;
}
.weight-badge b {
    position: absolute;
    top: 0;
    right: 0;
    width: 26px;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.weight-badge--baidu { background-image: url("../images/weight/baidupc.png"); }
.weight-badge--mobile { background-image: url("../images/weight/baidumobile.png"); }
.weight-badge--haosou { background-image: url("../images/weight/360.png"); }
.weight-badge--shenma { background-image: url("../images/weight/sm.png"); }
.weight-badge--toutiao { background-image: url("../images/weight/toutiao.png"); }
.weight-badge:hover { filter: brightness(1.06); }
.weight-badge.is-loading {
    background-image: none;
    background: linear-gradient(115deg, var(--chip-bg) 25%, var(--inner-bg) 37%, var(--chip-bg) 63%);
    background-size: 400% 100%;
    animation: weightShimmer 1.4s ease infinite;
}
.weight-badge.is-loading b { opacity: 0; }
@keyframes weightShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* 手机查看：悬停 / 聚焦 / 点击弹出二维码 */
.site-qr { position: relative; display: inline-flex; }
.site-qr__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
    pointer-events: none;
}
.site-qr:hover .site-qr__panel,
.site-qr:focus-within .site-qr__panel,
.site-qr.is-open .site-qr__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}
.site-qr-code {
    width: 148px;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
}
.site-qr-placeholder { font-size: 12px; color: var(--muted2); text-align: center; }
/* canvas 必须带 !important：qrcodejs 会给自己生成的 canvas 打内联 style="display:none"
   （它以为 canvas 不可用、改走 img），内联样式优先级高于普通规则，不压就永远是个白框。
   那个备用 img 在部分浏览器是空图，一律隐藏。 */
.site-qr-code canvas { width: 148px !important; height: 148px !important; display: block !important; }
.site-qr-code img { display: none !important; }
.site-qr-tip { font-size: 11px; color: var(--muted2); max-width: 148px; text-align: center; line-height: 1.5; }

/* 反馈小图标按钮（沿用旧版的红色警示按钮）
   必须显式写 justify-content：站点页只加载 isj.css，site.css 里 `.site-report-btn`
   的居中规则不生效，父规则 `.site-hero-actions button` 又是 inline-flex 默认 flex-start，
   padding 归零后盾牌会贴左边，右边空一大截，看着就是「歪的」。 */
.site-hero-actions .site-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 32px;
    min-height: 32px;
    height: auto;
    padding: 0;
    border-radius: 8px;
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    font-size: 17px;
    line-height: 1;
}
.site-hero-actions .site-report-btn:hover { background: #dc2626; border-color: #dc2626; opacity: 1; }

/* 同行三个按钮等高：文字按钮是 7px 内边距 + 行高撑出来的 35.8px，
   图标按钮若写死 32px，顶对齐后会比邻居矮 3.8px，看着像浮起来一格。 */
.site-hero-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-top: 14px; }
.site-hero-actions a, .site-hero-actions button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
}
.site-hero-actions .primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.site-hero-actions a:hover, .site-hero-actions button:hover { opacity: .9; }
.site-info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.site-info-table tr + tr { border-top: 1px solid var(--border); }
.site-info-table th {
    width: 96px;
    text-align: left;
    font-weight: 500;
    color: var(--muted2);
    padding: 11px 0;
    vertical-align: top;
}
.site-info-table td { padding: 11px 0; color: var(--muted); word-break: break-all; }
.site-info-table a { color: var(--primary); }
.site-info-table a:hover { text-decoration: underline; }
.site-info-strong { color: var(--text); font-weight: 500; }
.site-info-empty { color: var(--muted2); }
.site-info-sep { color: var(--muted2); margin: 0 4px; }
.site-info-kw { display: flex; flex-wrap: wrap; gap: 6px; }
.site-info-kw span {
    font-size: 11px;
    line-height: 1.6;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--inner-bg);
    color: var(--chip-text);
}

/* ---------------- 站点详情：网站介绍 / 数据评估 ---------------- */
.site-intro-text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--text);
    word-break: break-word;
}
.site-intro-text a { color: var(--primary); }
.site-intro-empty { color: var(--muted2); }
.site-intro-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 12px;
    color: var(--muted2);
}
.site-intro-meta span { display: inline-flex; align-items: center; gap: 4px; }
.site-intro-meta i { font-size: 14px; }

.site-eval-p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.95;
    color: var(--muted);
    word-break: break-word;
}
.site-eval-p:last-of-type { margin-bottom: 0; }
.site-eval-p strong { color: var(--text); font-weight: 600; }
.site-eval-p a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(37, 99, 235, .38);
}
.site-eval-p a:hover { border-bottom-style: solid; }
.site-eval-declare {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}
.site-eval-declare-title {
    margin-bottom: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .5px;
}
.site-eval-declare p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--muted2);
    word-break: break-word;
}
.site-eval-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 12px;
    color: var(--muted2);
}
.site-eval-foot a { color: var(--muted); word-break: break-all; }
.site-eval-foot a:hover { color: var(--primary); }
.site-feedback {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.site-feedback a {
    flex: 1 1 160px;
    text-align: center;
    font-size: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--inner-bg);
}
.site-feedback a:hover { color: var(--primary); border-color: var(--primary); }
.warn-bar {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: #fffaf0;
    border: 1px solid #ffe2b8;
    color: #9a6a00;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.7;
    margin-top: 12px;
}
html[data-theme="dark"] .warn-bar { background: #2a2416; border-color: #4a3c1d; color: #e0b163; }

/* ---------------- 排行榜 ---------------- */
.rank-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rank-tabs a {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--chip-text);
}
.rank-tabs a.on { background: var(--primary); color: #fff; }
.rank-list { display: flex; flex-direction: column; }
.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}
.rank-item:nth-child(odd) { background: var(--inner-bg); }
.rank-item .rk {
    flex: 0 0 34px;
    font-size: 16px;
    font-weight: 800;
    font-style: italic;
    color: #c3c8d4;
    text-align: center;
}
.rank-item:nth-child(1) .rk { color: var(--danger); }
.rank-item:nth-child(2) .rk { color: #ff7a45; }
.rank-item:nth-child(3) .rk { color: #faad14; }
.rank-item .rk-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 28px;
    background: var(--chip-bg);
}
.rank-item .rk-name { flex: 1; min-width: 0; font-weight: 600; }
.rank-item .rk-name span { color: var(--muted2); font-weight: 400; font-size: 12px; margin-left: 6px; }
.rank-item .rk-num { font-size: 12px; color: var(--muted2); }
.rank-item .rk-num b { color: var(--muted); }

/* ---------------- 表单（申请收录等） ---------------- */
.form-panel .form-row { margin-bottom: 14px; }
.form-panel label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}
.form-panel .req { color: var(--danger); }
.form-panel .inp, .form-panel select, .form-panel textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--inner-bg);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-panel .inp:focus, .form-panel select:focus, .form-panel textarea:focus {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(43, 58, 158, .1);
}
.form-panel textarea { min-height: 96px; resize: vertical; }
.form-panel .hint { font-size: 11px; color: var(--muted2); margin-top: 4px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    cursor: pointer;
}
.btn-primary:hover { opacity: .9; }
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--muted);
    font-size: 13px;
    padding: 10px 16px;
    cursor: pointer;
}
.notice-list { list-style: none; font-size: 12.5px; color: var(--muted); }
.notice-list li { position: relative; padding-left: 16px; margin-bottom: 6px; line-height: 1.7; }
.notice-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-2);
}

/* ---------------- 文章 / 搜索结果 ---------------- */
/* 文章分类筛选条（列表页 / 分类页顶部） */
.art-cat-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 12px;
}
.art-cat-bar a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--chip-text);
    font-size: 13px;
    line-height: 1.45;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.art-cat-bar a:hover { color: var(--primary); }
.art-cat-bar a.on { background: var(--primary-2); color: #fff; }
.art-cat-bar .n {
    font-size: 11px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .07);
    color: inherit;
    opacity: .8;
}
.art-cat-bar a.on .n { background: rgba(255, 255, 255, .24); opacity: 1; }
@media (max-width: 640px) {
    /* 窄屏改成横向滚动，别把标题行挤成三排 */
    .art-cat-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .art-cat-bar::-webkit-scrollbar { display: none; }
    .art-cat-bar a { flex: 0 0 auto; }
}

.article-list { display: flex; flex-direction: column; gap: 10px; }
.article-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    transition: box-shadow .15s, transform .15s;
}
.article-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.article-item .ai-thumb {
    width: 112px;
    height: 74px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 112px;
    background: var(--inner-bg);
}
.article-item .ai-body { min-width: 0; flex: 1; }
.article-item .ai-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-item .ai-desc {
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-item .ai-meta { margin-top: 6px; display: flex; gap: 12px; font-size: 11px; color: var(--muted2); }
.article-content { font-size: 14px; line-height: 1.9; color: var(--muted); }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; }
.article-content p { margin: 0 0 14px; }
.article-content h2, .article-content h3 { margin: 22px 0 12px; color: var(--text); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--inner-bg);
    color: var(--muted);
}
.pagination .active { background: var(--primary); color: #fff; }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted2);
    font-size: 13px;
}
.empty-state i { display: block; font-size: 42px; margin-bottom: 10px; opacity: .5; }

/* ---------------- 搜索结果站点卡 ---------------- */
.search-site-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.search-site-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.search-site-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #dde4f5; }
.search-site-card .ssc-ico {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    object-fit: cover;
    flex: 0 0 38px;
    background: var(--inner-bg);
}
.search-site-card .ssc-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-site-card .ssc-name { font-size: 13.5px; font-weight: 700; }
.search-site-card .ssc-desc {
    font-size: 11.5px;
    color: var(--muted2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-site-card .ssc-domain { font-size: 11px; color: var(--primary); }

/* ---------------- 弹窗（站点反馈） ---------------- */
.isj-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 16px;
}
.isj-modal.show { display: flex; }
.isj-modal-card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    overflow: hidden;
}
.isj-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
}
.isj-modal-close {
    border: 0;
    background: transparent;
    color: var(--muted2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.isj-modal-body { padding: 16px; }
.isj-modal-body .form-row { margin-bottom: 12px; }
.isj-modal-body label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.isj-modal-body select,
.isj-modal-body input.inp,
.isj-modal-body textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--inner-bg);
    color: var(--text);
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 13px;
    outline: none;
}
.isj-modal-body textarea { min-height: 84px; resize: vertical; }
.isj-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}
.isj-modal-msg { font-size: 12px; color: var(--danger); min-height: 16px; }

/* 分类选择器 */
.cat-suggest {
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    max-height: 210px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}
.cat-picked {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    background: var(--inner-bg);
    border-radius: 8px;
    padding: 7px 10px;
}
.cat-picked-clear {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--muted2);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

/* ---------------- 移动端 ---------------- */
@media (max-width: 1080px) {
    .layout { grid-template-columns: 180px minmax(0, 1fr); }
    .rside { display: none; }
    .tb-link { display: none; }
}
@media (max-width: 820px) {
    .topbar-inner { padding: 0 14px; gap: 10px; }
    .tb-burger { display: block; }
    .tb-nav { gap: 16px; }
    .tb-nav a { font-size: 13px; }
    .tb-right { gap: 8px; }
    .tb-user span { display: none; }
    .tb-user { padding: 6px 8px; }
    .layout { grid-template-columns: minmax(0, 1fr); padding: 14px 12px 28px; gap: 14px; }
    .side {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 230px;
        max-height: none;
        border-radius: 0 12px 12px 0;
        z-index: 120;
        transform: translateX(-105%);
        transition: transform .25s ease;
        padding: 18px 14px;
    }
    .side.open { transform: translateX(0); }
    .side-close {
        display: flex;
        position: absolute;
        right: 10px;
        top: 10px;
        width: 30px;
        height: 30px;
        border: 0;
        background: var(--inner-bg);
        color: var(--muted);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .isj-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 110;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s;
    }
    .isj-overlay.show { opacity: 1; pointer-events: auto; }
    .hero-search { padding: 22px 14px; }
    .hs-tab { font-size: 17px; }
    .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .hero-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .hero-card { min-height: 96px; padding: 13px; gap: 9px; }
    .hero-card .hc-logo { width: 42px; height: 42px; flex-basis: 42px; }
    .hero-card .hc-desc { display: none; }
    .panel { padding: 13px; }
    .sec-head .sec-title { font-size: 15px; }
    .site-hero-card { flex-direction: column; align-items: center; text-align: center; }
    .site-hero-body h1 { justify-content: center; }
    .site-meta, .site-hero-actions { justify-content: center; }
    .site-info-table th { width: 76px; }
    .article-item .ai-thumb { width: 86px; height: 64px; flex-basis: 86px; }
    .ft-inner { padding: 20px 14px; }
    .ft-bottom { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 821px) {
    .isj-overlay { display: none; }
}
@media (max-width: 420px) {
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hs-engines { gap: 12px; font-size: 12px; }
    .hero-row { grid-template-columns: 1fr; }
    .tb-nav a:nth-child(n+5) { display: none; }
}

/* ===== 文章评论区（仅评论相关样式） ===== */
.comment-section {
    margin: 18px 0 24px;
    padding: 24px 30px 26px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cm-head-bar {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
}

.cm-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2328;
}

.cm-count {
    color: #2563eb;
    font-size: 16px;
    font-weight: 600;
}

.cm-sub {
    font-size: 12.5px;
    color: #98a2b3;
}

/* ---- 发表框 ---- */
.cm-form {
    margin-bottom: 22px;
}

.cm-form-body textarea {
    width: 100%;
    min-height: 84px;
    max-height: 220px;
    padding: 12px 14px;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #fafbfc;
    font-size: 14px;
    line-height: 1.7;
    color: #1f2328;
    resize: vertical;
    outline: none;
    transition: border-color .15s, background-color .15s;
    box-sizing: border-box;
}

.cm-form-body textarea:focus {
    border-color: #bfd3f5;
    background: #fff;
}

.cm-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.cm-captcha-wrap { min-height: 40px; }
.cm-captcha-mount { width: 260px; max-width: 100%; }

.cm-form-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.cm-chars {
    font-size: 12px;
    color: #98a2b3;
}

.cm-submit {
    height: 36px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .15s, opacity .15s;
}

.cm-submit:hover { background: #1d4ed8; }
.cm-submit:disabled { opacity: .6; cursor: default; }

.cm-reply-tip {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-cancel-reply {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 12.5px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.cm-form-msg {
    margin-top: 8px;
    font-size: 13px;
}

.cm-form-msg.is-ok { color: #15803d; }
.cm-form-msg.is-err { color: #dc2626; }

.cm-login-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px dashed #e3e8ef;
    border-radius: 10px;
    color: #64748b;
    font-size: 14px;
    background: #fafbfc;
}

.cm-login-box .mdi { font-size: 20px; color: #94a3b8; }

.cm-login-btn {
    margin-left: auto;
    padding: 6px 14px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.cm-login-btn:hover { background: #1d4ed8; }

/* ---- 列表 ---- */
.cm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid #f0f2f5;
}

.cm-item:first-child { border-top: 0; }

.cm-item--reply {
    padding: 12px 0 0;
    border-top: 0;
}

.cm-avatar {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    line-height: 38px;
    text-align: center;
    font-weight: 600;
    user-select: none;
}

.cm-main { min-width: 0; flex: 1; }

.cm-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cm-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2328;
}

.cm-time {
    font-size: 12px;
    color: #98a2b3;
}

.cm-body {
    margin-top: 6px;
    font-size: 14.5px;
    line-height: 1.75;
    color: #374151;
    word-break: break-word;
}

.cm-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.cm-act {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8b93a1;
    font-size: 12.5px;
    cursor: pointer;
    transition: color .15s;
}

.cm-act:hover { color: #2563eb; }
.cm-act .mdi { font-size: 15px; }

.cm-like.is-liked { color: #2563eb; }

.cm-replies {
    list-style: none;
    margin: 4px 0 0;
    padding: 0 0 0 14px;
    border-left: 2px solid #f0f2f5;
}

.cm-empty {
    padding: 26px 0 12px;
    text-align: center;
    color: #98a2b3;
    font-size: 13.5px;
}

.cm-empty .mdi {
    font-size: 30px;
    color: #d5dae2;
    display: block;
    margin-bottom: 6px;
}

.cm-empty p { margin: 0; }

.cm-more-wrap {
    padding-top: 16px;
    text-align: center;
}

.cm-more {
    height: 34px;
    padding: 0 22px;
    border: 1px solid #e3e8ef;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.cm-more:hover { border-color: #bfd3f5; color: #2563eb; }
.cm-more:disabled { opacity: .6; cursor: default; }

@media (max-width: 640px) {
    .comment-section { padding: 18px 16px 20px; }
    .cm-item { gap: 10px; }
    .cm-avatar { width: 32px; height: 32px; line-height: 32px; font-size: 13px; }
    .cm-body { font-size: 14px; }
    .cm-captcha-mount { width: 100%; }
    .cm-form-right { margin-left: 0; width: 100%; justify-content: space-between; }
    .cm-submit { flex: 1; margin-left: 12px; }
}

html[data-theme="dark"] .comment-section{background:#171a21;box-shadow:none}
html[data-theme="dark"] .cm-title,html[data-theme="dark"] .cm-name,html[data-theme="dark"] .cm-body{color:#e8eaf0}
html[data-theme="dark"] .cm-login-box,html[data-theme="dark"] .cm-form-body textarea{background:#1f242e;border-color:#262b36;color:#e8eaf0}
html[data-theme="dark"] .cm-item{border-top-color:#262b36}
html[data-theme="dark"] .cm-more{background:#1f242e;border-color:#262b36;color:#e8eaf0}

/* ---------------- 左侧栏：展开 / 收起 ---------------- */
.side-head {
    display: flex;
    align-items: center;
    gap: 6px;
}
.side-head .logo { flex: 1 1 auto; min-width: 0; }
.side-toggle {
    display: none;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: color .15s, border-color .15s, background-color .15s;
}
.side-toggle:hover { color: var(--primary); border-color: var(--primary); background: var(--inner-bg); }
.side-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.side-toggle i {
    display: block;
    font-size: 15px;
    transition: transform .2s ease;
}
.side-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 收起态的文字气泡：fixed 定位，不受侧栏 overflow 裁剪 */
.side-tip {
    position: fixed;
    z-index: 200;
    padding: 5px 10px;
    border-radius: 6px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity .12s ease, transform .12s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.side-tip.show { opacity: 1; transform: translateY(-50%) translateX(0); }

@media (min-width: 821px) {
    .side-toggle { display: inline-flex; }
    .layout { transition: grid-template-columns .18s ease; }

    .is-side-collapsed .layout { grid-template-columns: 64px minmax(0, 1fr) 260px; }
    .is-side-collapsed .side { padding: 14px 8px 12px; }
    .is-side-collapsed .side-head { flex-direction: column; gap: 10px; }
    .is-side-collapsed .side-head .logo { padding: 0; justify-content: center; }
    .is-side-collapsed .logo-text { display: none; }
    .is-side-collapsed .side-toggle i { transform: rotate(180deg); }
    /* 收起后每项压到 34px 上下，13 个栏目 + 2 个按钮才能在 800px 高的屏幕里不滚动 */
    .is-side-collapsed .side-menu { gap: 2px; }
    .is-side-collapsed .side-menu a { justify-content: center; gap: 0; padding: 7px 0; }
    .is-side-collapsed .side-label { display: none; }
    .is-side-collapsed .side-menu a .mi { flex: 0 0 auto; line-height: 1.1; }
    .is-side-collapsed .zn-sb-ico { line-height: 1.1; }
    .is-side-collapsed .zn-side-btns { gap: 6px; padding-top: 8px; }
    .is-side-collapsed .zn-side-btn { justify-content: center; gap: 0; padding: 8px 0; }
    .is-side-collapsed .zn-sb-tx,
    .is-side-collapsed .zn-sb-arrow { display: none; }
}
@media (min-width: 821px) and (max-width: 1080px) {
    .is-side-collapsed .layout { grid-template-columns: 64px minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .side-toggle { display: none !important; }
}

/* ===== 视频页 ===== */
.video-page .vp-head{text-align:center;margin-bottom:6px}
.vp-head h1{font-size:24px;font-weight:800;line-height:1.35}
.vp-head p{font-size:12px;color:var(--muted2);margin-top:4px}
.vp-layout{display:grid;grid-template-columns:160px minmax(0,1fr);gap:14px;margin-top:14px}
.vp-cats{display:flex;flex-direction:column;gap:8px;max-height:720px;overflow-y:auto;scrollbar-width:thin}
.vp-cat{display:flex;align-items:center;gap:7px;height:38px;border:1px solid var(--border);background:var(--chip-bg);color:var(--chip-text);border-radius:8px;font-size:12px;cursor:pointer;padding:0 10px;text-align:left;white-space:nowrap;overflow:hidden;transition:all .15s}
.vp-cat .mdi{font-size:16px;line-height:1;color:var(--vp-c,var(--primary));flex:0 0 auto;transition:color .15s}
.vp-cat span{overflow:hidden;text-overflow:ellipsis}
.vp-cat:hover{color:var(--primary);border-color:var(--primary)}
.vp-cat.on{background:var(--primary);border-color:var(--primary);color:#fff;font-weight:600}
.vp-cat.on .mdi{color:#fff}
.vp-main{min-width:0}
.vp-stage{position:relative;background:#000;border-radius:12px;overflow:hidden;aspect-ratio:4/3;max-height:620px;display:flex;align-items:center;justify-content:center}
.vp-stage video{width:100%;height:100%;object-fit:contain;display:block;background:#000}
.vp-badge{position:absolute;left:10px;top:10px;font-size:11px;color:#fff;background:rgba(0,0,0,.55);padding:3px 9px;border-radius:999px;opacity:0;transition:opacity .2s;pointer-events:none}
.vp-badge.show{opacity:1}
.vp-controls{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.vp-controls button,.vp-controls .vp-home{height:36px;padding:0 16px;border-radius:8px;border:1px solid var(--border);background:var(--card);color:var(--muted);font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.vp-controls button.primary{background:var(--primary);border-color:var(--primary);color:#fff}
.vp-controls .vp-home:hover,.vp-controls button:hover{opacity:.9}
@media (max-width:820px){
  .vp-layout{grid-template-columns:1fr}
  .vp-cats{display:grid;grid-template-columns:repeat(3,1fr);max-height:none;overflow:visible}
  .vp-cat{padding:0 8px;gap:5px;font-size:11px}
  .vp-cat .mdi{font-size:14px}
  .vp-stage{aspect-ratio:4/5}
}


/* ------------------------------------------------------------
   无刷新换页（template/default/js/isj-pjax.js）
   顶部一条 2px 细进度条 + 新内容 220ms 淡入；不做全屏遮罩
   ------------------------------------------------------------ */
.pjx-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
}
.pjx-bar.on { opacity: 1; }
.pjx-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-2), var(--primary));
    box-shadow: 0 0 8px rgba(59, 130, 246, .45);
    transition: width .2s linear;
}
@keyframes pjxIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
body.pjx-in .main { animation: pjxIn .22s ease-out both; }
@media (prefers-reduced-motion: reduce) {
    body.pjx-in .main { animation: none; }
}

/* 不走无刷新的页面（申请收录、友链申请等表单页）用浏览器跨文档淡入淡出兜底，
   Chrome 126+ 生效，其他浏览器自动忽略 */
@view-transition { navigation: auto; }
