/*!
 * 主页扩展 —— 网址导航前台样式
 *
 * 颜色、圆角、列数等可配置项全部由模板注入的 CSS 变量驱动（见 library/Data::themeStyle()），
 * 这里只定义结构与主题差异，换主题不需要改这份文件。
 *
 * 变量清单：
 *   --hp-primary / --hp-primary-rgb  主色与其中间色（拼 rgba 用，避免 color-mix）
 *   --hp-radius / --hp-cols          圆角、卡片列数
 *   --hp-bg / --hp-bg-soft           页面底色
 *   --hp-surface / --hp-surface-2    卡片/输入框底色
 *   --hp-text / --hp-muted           正文与次要文字
 *   --hp-border / --hp-shadow        描边与阴影
 *   --hp-chip                        标签底色
 *   --hp-hero-text / --hp-blur       标题区文字色、玻璃主题的模糊半径
 */

*, *::before, *::after { box-sizing: border-box; }

body.hp {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--hp-bg);
    color: var(--hp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.hp a { color: inherit; text-decoration: none; }
body.hp img { border: 0; }
body.hp em { font-style: normal; }
body.hp a:focus-visible,
body.hp button:focus-visible,
body.hp input:focus-visible { outline: 2px solid var(--hp-primary); outline-offset: 2px; }

/* ---------------------------------------------------------------- 背景装饰 */
.hp-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.hp-bg span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
}
.hp-bg-1 {
    width: 420px; height: 420px;
    top: -160px; left: -80px;
    background: rgba(var(--hp-primary-rgb), .45);
}
.hp-bg-2 {
    width: 460px; height: 460px;
    top: -200px; right: -120px;
    background: rgba(var(--hp-primary-rgb), .28);
}
body.bg-plain .hp-bg { display: none; }
body.theme-dark .hp-bg span { opacity: .35; }
body.theme-paper .hp-bg span { opacity: .28; }

.hp-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ---------------------------------------------------------------- 顶部导航 */
.hp-header {
    position: relative;
    z-index: 20;
    padding: 14px 0;
    border-bottom: 1px solid transparent;
}
body.nav-sticky .hp-header {
    position: sticky;
    top: 0;
    background: var(--hp-surface);
    backdrop-filter: var(--hp-blur, saturate(180%) blur(12px));
    -webkit-backdrop-filter: var(--hp-blur, saturate(180%) blur(12px));
    border-bottom-color: var(--hp-border);
}
body.theme-glass.nav-sticky .hp-header { background: var(--hp-surface-2); }
.hp-header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--hp-hero-text, var(--hp-text));
    flex: 0 0 auto;
}
.hp-brand-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }
.hp-brand-mark {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--hp-primary), rgba(var(--hp-primary-rgb), .68));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}
.hp-brand-name { white-space: nowrap; }

.hp-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.hp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--hp-muted);
    font-weight: 500;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease;
}
.hp-nav-link i { font-size: 13px; }
.hp-nav-link:hover { background: var(--hp-chip); color: var(--hp-text); }
.hp-nav-link.is-active { background: rgba(var(--hp-primary-rgb), .12); color: var(--hp-primary); }

/* margin-left:auto 负责把右侧按钮顶到最右边：
   桌面端导航栏占满中间空间时它不起作用，窄屏下导航栏变成绝对定位的抽屉（脱离 flex 流），
   它才真正生效——所以两个断点可以共用同一条规则。 */
.hp-header-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.hp-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--hp-border);
    color: var(--hp-muted);
    font-weight: 500;
    transition: all .18s ease;
}
.hp-ghost-btn:hover { color: var(--hp-primary); border-color: rgba(var(--hp-primary-rgb), .45); }
.hp-icon-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    background: transparent;
    color: var(--hp-text);
    cursor: pointer;
    font-size: 15px;
}

/* ---------------------------------------------------------------- 标题区 */
.hp-main { flex: 1 0 auto; position: relative; z-index: 1; }

/* 标题区要盖住下面的内容区：搜索框的引擎下拉菜单是绝对定位的，
   而两个 .hp-container 都是 z-index:1 的层叠上下文，后出现的卡片区会盖住菜单 */
.hp-hero { position: relative; z-index: 5; padding: 46px 0 34px; }
.hp-hero.has-image .hp-hero-inner {
    position: relative;
    padding: 40px 24px 46px;
    border-radius: calc(var(--hp-radius) + 8px);
    background-image: linear-gradient(180deg, rgba(9, 14, 26, .72), rgba(9, 14, 26, .82)), var(--hero-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--hp-shadow);
}
.hp-hero.has-image .hp-hero-title,
.hp-hero.has-image .hp-hero-sub { color: #fff; }
.hp-hero-inner { text-align: center; }

.hp-hero-title {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.4px;
    color: var(--hp-hero-text, var(--hp-text));
}
.hp-hero-sub {
    margin: 0 0 26px;
    color: var(--hp-muted);
    font-size: 15px;
}

/* 搜索区 */
.hp-search { max-width: 660px; margin: 0 auto; }
.hp-engines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.hp-engine {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border: 1px solid var(--hp-border);
    border-radius: 999px;
    background: var(--hp-surface);
    color: var(--hp-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .18s ease;
}
.hp-engine img { width: 16px; height: 16px; object-fit: contain; }
.hp-engine-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--engine-color, var(--hp-primary));
    box-shadow: 0 0 0 3px rgba(var(--hp-primary-rgb), .12);
}
.hp-engine:hover { color: var(--hp-text); border-color: rgba(var(--hp-primary-rgb), .4); }
.hp-engine.is-active {
    background: rgba(var(--hp-primary-rgb), .12);
    border-color: rgba(var(--hp-primary-rgb), .5);
    color: var(--hp-primary);
    font-weight: 600;
}

/* 下拉选择模式：引擎选择器嵌在搜索框最左侧。
   菜单是自己渲染的（不是原生 select 的弹层），左右留白与文字居中完全由下面的规则控制，
   不会出现浏览器原生弹层那种「左边空隙比右边大」的问题。 */
/* 框内的 18px 左内边距原本是留给放大镜图标的，下拉模式下没有图标，
   那块空白会让选择器看起来「左侧偏大」，所以这里单独收掉，让左右留白相等 */
.hp-search-box.has-picker { padding-left: 4px; }
.hp-engine-picker {
    position: relative;
    flex: 0 0 auto;
    margin-right: 8px;
    padding-right: 4px;
    border-right: 1px solid var(--hp-border);
}
.hp-engine-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;              /* 左右对称留白 */
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--hp-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
.hp-engine-toggle:hover { background: var(--hp-chip); color: var(--hp-primary); }
.hp-engine-toggle .fa { font-size: 12px; color: var(--hp-muted); transition: transform .18s ease; }
.hp-engine-picker.is-open .hp-engine-toggle { color: var(--hp-primary); }
.hp-engine-picker.is-open .hp-engine-toggle .fa { transform: rotate(180deg); }

.hp-engine-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: -6px;
    z-index: 30;
    min-width: calc(100% + 12px);
    padding: 6px;
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow);
    backdrop-filter: var(--hp-blur, none);
    -webkit-backdrop-filter: var(--hp-blur, none);
}
/* 与 hp-md-toolbar 同样的坑：类选择器里的 display 会盖掉 [hidden] */
.hp-engine-menu[hidden] { display: none !important; }
.hp-engine-option {
    display: block;
    width: 100%;
    padding: 7px 16px;              /* 左右对称：文字两侧留白相等 */
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hp-text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;             /* 文字居中 */
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
.hp-engine-option:hover,
.hp-engine-option:focus-visible { background: var(--hp-chip); outline: none; }
.hp-engine-option.is-selected { background: rgba(var(--hp-primary-rgb), .12); color: var(--hp-primary); font-weight: 600; }

.hp-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 7px 7px 18px;
    border: 1px solid var(--hp-border);
    border-radius: calc(var(--hp-radius) + 12px);
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.hp-search-box:focus-within {
    border-color: rgba(var(--hp-primary-rgb), .55);
    box-shadow: 0 10px 30px rgba(var(--hp-primary-rgb), .18);
}
.hp-search-icon { color: var(--hp-muted); font-size: 15px; }
.hp-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--hp-text);
    font-size: 15px;
    font-family: inherit;
    line-height: 34px;
    outline: none;
}
.hp-search-input::placeholder { color: var(--hp-muted); opacity: .8; }
.hp-search-btn {
    flex: 0 0 auto;
    padding: 0 22px;
    height: 38px;
    border: 0;
    border-radius: calc(var(--hp-radius) + 6px);
    background: var(--hp-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter .18s ease, transform .18s ease;
}
.hp-search-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

.hp-hotwords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--hp-muted);
}
.hp-hotwords-label { opacity: .75; }
.hp-hotwords a {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--hp-chip);
    color: var(--hp-muted);
    transition: all .18s ease;
}
.hp-hotwords a:hover { background: rgba(var(--hp-primary-rgb), .14); color: var(--hp-primary); }

/* ---------------------------------------------------------------- 正文布局 */
.hp-links { padding: 6px 0 44px; }
.hp-layout { display: grid; grid-template-columns: 1fr; gap: 26px; }
body.cats-sidebar .hp-layout { grid-template-columns: 208px 1fr; }

.hp-sidebar-inner {
    position: sticky;
    top: 82px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 12px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
}
.hp-sidebar-title {
    padding: 0 10px 8px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hp-muted);
}
.hp-side-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--hp-muted);
    font-weight: 500;
    transition: all .16s ease;
}
.hp-side-link i { width: 16px; text-align: center; }
.hp-side-link span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-side-link em { font-size: 12px; opacity: .7; }
.hp-side-link:hover { background: var(--hp-chip); color: var(--hp-text); }
.hp-side-link.is-active { background: rgba(var(--hp-primary-rgb), .12); color: var(--hp-primary); }
.hp-side-top {
    margin-top: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--hp-border);
    color: var(--hp-muted);
    font-size: 13px;
}
.hp-side-top:hover { color: var(--hp-primary); }

.hp-links-main { min-width: 0; }

/* 分类快捷标签 */
.hp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}
.hp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--hp-border);
    background: var(--hp-surface);
    color: var(--hp-muted);
    font-size: 13px;
    transition: all .18s ease;
}
.hp-chip i { font-size: 12px; opacity: .85; }
.hp-chip:hover { color: var(--hp-primary); border-color: rgba(var(--hp-primary-rgb), .45); transform: translateY(-1px); }
.hp-chip.is-active { background: rgba(var(--hp-primary-rgb), .12); border-color: rgba(var(--hp-primary-rgb), .5); color: var(--hp-primary); font-weight: 600; }

/* 分组 */
.hp-group { margin-bottom: 30px; scroll-margin-top: 86px; }
.hp-group-head { margin-bottom: 14px; }
.hp-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 17px;
    font-weight: 650;
}
.hp-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 10px;
    background: rgba(var(--group-rgb, var(--hp-primary-rgb)), .14);
    color: var(--group-color);
    font-size: 14px;
}
.hp-group-icon i { color: var(--group-color); }
.hp-group-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--hp-chip);
    color: var(--hp-muted);
    font-size: 12px;
    font-weight: 500;
}
.hp-group-intro { margin: 6px 0 0; color: var(--hp-muted); font-size: 13px; }

/* 卡片 */
.hp-cards {
    display: grid;
    grid-template-columns: repeat(var(--hp-cols, 4), minmax(0, 1fr));
    gap: 12px;
}
.hp-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    backdrop-filter: var(--hp-blur, none);
    -webkit-backdrop-filter: var(--hp-blur, none);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hp-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--hp-primary-rgb), .4);
    box-shadow: var(--hp-shadow);
}
.hp-card-icon {
    position: relative;
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border-radius: 11px;
    overflow: hidden;
    background: rgba(var(--icon-rgb, var(--hp-primary-rgb)), .12);
}
.hp-card-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--icon-color, var(--hp-primary));
    background: rgba(0, 0, 0, .01);
}
.hp-card-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.hp-card-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.hp-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hp-card-desc {
    font-size: 12px;
    color: var(--hp-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.hp-card > .hp-card-body { flex: 1 1 auto; }

/* 紧凑宫格 */
body.cards-compact .hp-cards { grid-template-columns: repeat(calc(var(--hp-cols, 4) + 2), minmax(0, 1fr)); }
body.cards-compact .hp-card {
    flex-direction: column;
    gap: 8px;
    padding: 16px 8px;
    text-align: center;
}
body.cards-compact .hp-card-body { align-items: center; width: 100%; }
body.cards-compact .hp-card-title { font-size: 13px; width: 100%; }
body.cards-compact .hp-card-desc { display: none; }

/* 列表行 */
body.cards-list .hp-cards { grid-template-columns: 1fr; gap: 8px; }
body.cards-list .hp-card { padding: 11px 16px; }
body.cards-list .hp-card-icon { width: 34px; height: 34px; border-radius: 9px; }
body.cards-list .hp-card-body { flex-direction: row; align-items: baseline; gap: 10px; }
body.cards-list .hp-card-title { min-width: 120px; }
body.cards-list .hp-card-desc { flex: 1 1 auto; }

/* 空状态 */
.hp-empty {
    padding: 60px 24px;
    border: 1px dashed var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    text-align: center;
}
.hp-empty-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(var(--hp-primary-rgb), .12);
    color: var(--hp-primary);
    font-size: 22px;
}
.hp-empty h3 { margin: 0 0 6px; font-size: 16px; }
.hp-empty p { margin: 0; color: var(--hp-muted); font-size: 13px; }

/* ---------------------------------------------------------------- 子页面 */
.hp-page-head { padding: 34px 0 10px; }
.hp-crumb { display: flex; align-items: center; gap: 8px; color: var(--hp-muted); font-size: 13px; margin-bottom: 10px; }
.hp-crumb a:hover { color: var(--hp-primary); }
.hp-crumb-sep { opacity: .5; }
.hp-page-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.hp-page-desc { margin: 0; color: var(--hp-muted); }
.hp-page-body { padding: 12px 0 56px; }

.hp-article {
    padding: 30px 32px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow);
    font-size: 15px;
    line-height: 1.85;
    max-width: 860px;
}
.hp-article h1, .hp-article h2, .hp-article h3, .hp-article h4 { margin: 1.4em 0 .6em; line-height: 1.35; }
.hp-article h1:first-child, .hp-article h2:first-child, .hp-article h3:first-child { margin-top: 0; }
.hp-article h2 { font-size: 20px; }
.hp-article h3 { font-size: 17px; }
.hp-article p { margin: 0 0 1em; }
.hp-article a { color: var(--hp-primary); border-bottom: 1px solid rgba(var(--hp-primary-rgb), .35); }
.hp-article a:hover { border-bottom-color: var(--hp-primary); }
.hp-article img { max-width: 100%; height: auto; border-radius: 10px; }
.hp-article ul, .hp-article ol { padding-left: 1.4em; margin: 0 0 1em; }
.hp-article li { margin: .3em 0; }
.hp-article blockquote {
    margin: 1em 0;
    padding: 10px 18px;
    border-left: 3px solid rgba(var(--hp-primary-rgb), .5);
    background: var(--hp-surface-2);
    border-radius: 0 10px 10px 0;
    color: var(--hp-muted);
}
.hp-article code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--hp-chip);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92em;
}
.hp-article pre {
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--hp-surface-2);
    border: 1px solid var(--hp-border);
    overflow: auto;
}
.hp-article pre code { background: none; padding: 0; }
.hp-article table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.hp-article th, .hp-article td { padding: 8px 12px; border: 1px solid var(--hp-border); text-align: left; }
.hp-article th { background: var(--hp-surface-2); font-weight: 600; }

.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid var(--hp-border);
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}
.hp-btn-primary { background: var(--hp-primary); color: #fff; border-color: transparent; }
.hp-btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.hp-empty .hp-btn { margin-top: 16px; }

/* ---------------------------------------------------------------- 页脚 */
.hp-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding: 22px 0 30px;
    border-top: 1px solid var(--hp-border);
    color: var(--hp-muted);
    font-size: 13px;
    text-align: center;
}
.hp-footer-text { margin: 0 0 6px; }
.hp-footer-copy { margin: 0; }
.hp-footer-copy a:hover { color: var(--hp-primary); }
.hp-footer-sep { margin: 0 6px; opacity: .5; }

.hp-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hp-border);
    border-radius: 14px;
    background: var(--hp-surface);
    color: var(--hp-muted);
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s ease;
    box-shadow: var(--hp-shadow);
}
.hp-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.hp-to-top:hover { color: var(--hp-primary); }

/* ---------------------------------------------------------------- 主题微调 */
body.theme-dark .hp-brand-mark { box-shadow: 0 6px 18px rgba(var(--hp-primary-rgb), .35); }
body.theme-dark .hp-group-icon { background: rgba(var(--hp-primary-rgb), .16); }
body.theme-dark .hp-card-icon { background: rgba(255, 255, 255, .06); }
body.theme-glass .hp-card { box-shadow: 0 6px 20px rgba(79, 70, 229, .08); }
body.theme-paper .hp-hero-title,
body.theme-paper .hp-group-title,
body.theme-paper .hp-page-title { font-family: Georgia, "Songti SC", "SimSun", serif; }
body.theme-paper .hp-card { background: var(--hp-surface); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
    body { --hp-cols: 3; }
    body.cards-compact { --hp-cols: 4; }
    body.cats-sidebar .hp-layout { grid-template-columns: 176px 1fr; }
}
@media (max-width: 860px) {
    body.cats-sidebar .hp-layout { grid-template-columns: 1fr; }
    .hp-sidebar { display: none; }
    .hp-hero { padding: 30px 0 24px; }
    .hp-hero-title { font-size: 26px; }
}
@media (max-width: 720px) {
    body { --hp-cols: 2; }
    body.cards-compact { --hp-cols: 3; }
    .hp-icon-btn { display: inline-flex; }
    .hp-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--hp-border);
        border-radius: var(--hp-radius);
        background: var(--hp-surface);
        box-shadow: var(--hp-shadow);
        display: none;
    }
    body.nav-open .hp-nav { display: flex; }
    .hp-nav-link { border-radius: 10px; }
    .hp-ghost-text { display: none; }
    .hp-ghost-btn { padding: 7px 10px; }
    .hp-engines { gap: 6px; }
    .hp-engine { padding: 5px 11px; font-size: 12px; }
}
@media (max-width: 520px) {
    .hp-container { padding: 0 14px; }
    .hp-engine-toggle { padding: 6px 8px; font-size: 13px; gap: 4px; }
    .hp-search-box.has-picker { padding-left: 3px; }
    .hp-engine-picker { margin-right: 6px; padding-right: 3px; }
    .hp-hero-sub { font-size: 13px; margin-bottom: 18px; }
    .hp-search-box { padding-left: 14px; }
    .hp-search-btn { padding: 0 16px; }
    .hp-article { padding: 22px 18px; font-size: 14px; }
    body.cards-compact { --hp-cols: 2; }
    .hp-card { padding: 11px 12px; gap: 10px; }
    .hp-card-icon { width: 34px; height: 34px; }
    body.cards-list .hp-card-body { flex-direction: column; align-items: flex-start; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    body.hp *, body.hp *::before, body.hp *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
