/* ==========================================================================
   FiimeROM 首页 v3 原型样式
   作用域：body.hp-home（顶部导航沿用 common/head.html 的生产样式，未改动）
   视觉语言：FiimeROM 2.0 —— 暖金强调色 + 纸感浅色 / 深墨色双主题
   ========================================================================== */

/* 01. 设计令牌 ------------------------------------------------------------ */
body.hp-home {
    --hp-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --hp-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;

    --hp-maxw: 1320px;
    --hp-gutter: clamp(18px, 3.6vw, 40px);
    --hp-head: 60px;

    --hp-accent: #eba744;
    --hp-accent-2: #d98f2a;
    --hp-accent-deep: #8f5c0d;
    --hp-accent-soft: rgba(235, 167, 68, .14);
    --hp-accent-line: rgba(235, 167, 68, .38);

    --hp-bg: #f4f1ea;
    --hp-bg-glow: rgba(235, 167, 68, .18);
    --hp-paper: #ffffff;
    --hp-paper-2: #fbfaf6;
    --hp-paper-3: #f3efe6;
    --hp-line: #e7e2d8;
    --hp-line-strong: #d6cfc0;

    --hp-ink: #23252f;
    --hp-ink-soft: #4a4d5c;
    --hp-muted: #6e6b7a;
    --hp-faint: #938e9c;

    --hp-ok: #1f7a52;
    --hp-ok-soft: rgba(31, 122, 82, .1);
    --hp-info: #3b61dd;
    --hp-info-soft: rgba(59, 97, 221, .09);

    --hp-glass: rgba(255, 255, 255, .86);
    --hp-radius: 20px;
    --hp-radius-lg: 24px;
    --hp-radius-sm: 12px;
    --hp-shadow: 0 30px 64px -46px rgba(28, 30, 43, .5), 0 2px 6px rgba(28, 30, 43, .04);
    --hp-shadow-soft: 0 12px 32px -26px rgba(28, 30, 43, .42);
    --hp-shadow-lift: 0 30px 60px -36px rgba(28, 30, 43, .3), 0 4px 14px rgba(28, 30, 43, .06);
    --hp-ease: cubic-bezier(.22, .61, .36, 1);
    --hp-ease-spring: cubic-bezier(.34, 1.32, .64, 1);
}

html[data-theme="dark"] body.hp-home {
    --hp-accent: #f0b45c;
    --hp-accent-2: #e3a03f;
    --hp-accent-deep: #f6cd8d;
    --hp-accent-soft: rgba(240, 180, 92, .15);
    --hp-accent-line: rgba(240, 180, 92, .32);

    --hp-bg: #101117;
    --hp-bg-glow: rgba(240, 180, 92, .09);
    --hp-paper: #1a1c25;
    --hp-paper-2: #20222e;
    --hp-paper-3: #262936;
    --hp-line: #2b2e3c;
    --hp-line-strong: #3b3f52;

    --hp-ink: #f4f1e9;
    --hp-ink-soft: #cfccd8;
    --hp-muted: #a6a1b1;
    --hp-faint: #847f91;

    --hp-ok: #59c295;
    --hp-ok-soft: rgba(89, 194, 149, .12);
    --hp-info: #8aa6ff;
    --hp-info-soft: rgba(138, 166, 255, .12);

    --hp-glass: rgba(16, 17, 23, .86);
    --hp-shadow: 0 30px 64px -42px rgba(0, 0, 0, .85), 0 2px 8px rgba(0, 0, 0, .3);
    --hp-shadow-soft: 0 12px 32px -22px rgba(0, 0, 0, .8);
    --hp-shadow-lift: 0 34px 66px -34px rgba(0, 0, 0, .8), 0 4px 14px rgba(0, 0, 0, .3);
}

/* 02. 基础 ---------------------------------------------------------------- */
body.hp-home {
    margin: 0;
    background:
        radial-gradient(980px 560px at 2% -10%, var(--hp-bg-glow), transparent 62%),
        radial-gradient(760px 460px at 100% 2%, rgba(59, 97, 221, .05), transparent 58%),
        var(--hp-bg) !important;
    color: var(--hp-ink) !important;
    font-family: var(--hp-font);
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.hp-home .knsl-app { overflow: visible; }
body.hp-home .hp-main { padding-top: var(--hp-head); }

body.hp-home .hp-main h1,
body.hp-home .hp-main h2,
body.hp-home .hp-main h3,
body.hp-home .hp-main h4,
body.hp-home .hp-main p { margin: 0; letter-spacing: 0; }

body.hp-home .hp-main ul { list-style: none; margin: 0; padding: 0; }
body.hp-home .hp-main a { text-decoration: none; color: inherit; }
body.hp-home .hp-main img { max-width: 100%; }

body.hp-home .hp-main input,
body.hp-home .hp-main button,
body.hp-home .hp-main select { font-family: inherit; margin: 0 !important; }

body.hp-home ::selection { background: var(--hp-accent-soft); color: var(--hp-ink); }

/* [hidden] 必须压过组件自身的 display，否则筛选/加载更多失效 */
body.hp-home .hp-main [hidden] { display: none !important; }

body.hp-home .hp-search__input::-webkit-search-cancel-button,
body.hp-home .hp-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

.hp-wrap {
    width: 100%;
    max-width: var(--hp-maxw);
    margin: 0 auto;
    padding: 0 var(--hp-gutter);
}

.hp-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.hp-ico { width: 20px; height: 20px; flex: 0 0 auto; }
.hp-ico--sm { width: 16px; height: 16px; }

/* 03. Hero ---------------------------------------------------------------- */
body.hp-home .hp-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: clamp(560px, 74vh, 780px);
    padding: clamp(40px, 6vw, 72px) 0 clamp(96px, 11vw, 132px);
    color: #f6f3ea;
}

.hp-hero__bg { position: absolute; inset: 0; z-index: -3; overflow: hidden; background: #12141c; }
.hp-hero__bg picture,
.hp-hero__bg img { display: block; width: 100%; height: 100%; }
.hp-hero__bg img { object-fit: cover; object-position: center 40%; }
.hp-hero__bg::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(100deg, rgba(9, 11, 17, .95) 0%, rgba(9, 11, 17, .84) 34%, rgba(9, 11, 17, .46) 64%, rgba(9, 11, 17, .38) 100%),
        linear-gradient(180deg, rgba(9, 11, 17, .5) 0%, rgba(9, 11, 17, 0) 26%);
}
.hp-hero__fade {
    position: absolute; left: 0; right: 0; bottom: 0; height: 42%; z-index: -2;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(9, 11, 17, 0) 0%, rgba(9, 11, 17, .5) 48%, var(--hp-bg) 100%);
}

.hp-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
    grid-template-areas: "copy side" "cta side";
    align-items: end;
    gap: clamp(24px, 3vw, 44px) clamp(28px, 5vw, 68px);
}

.hp-hero__copy { grid-area: copy; max-width: 640px; }
.hp-hero__cta { grid-area: cta; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hp-hero__side { grid-area: side; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }

.hp-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: #eccb96;
}
.hp-eyebrow__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #7ee0ae; box-shadow: 0 0 0 4px rgba(126, 224, 174, .18);
    animation: hp-pulse 2.6s var(--hp-ease) infinite;
}
@keyframes hp-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(126, 224, 174, .18); }
    50% { box-shadow: 0 0 0 7px rgba(126, 224, 174, .06); }
}

.hp-hero h1 {
    margin: 18px 0 0;
    font-size: clamp(38px, 5.2vw, 66px);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fbf8f0;
}
html[data-lang="en"] .hp-hero h1 { font-size: clamp(34px, 4.3vw, 56px); line-height: 1.08; }
.hp-hero h1 .hp-grad {
    display: inline-block;
    background: linear-gradient(94deg, #fbe2b6 0%, #efb45f 48%, #dc942c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hp-hero__lead {
    margin-top: 20px !important;
    max-width: 520px;
    font-size: clamp(14.5px, 1.1vw, 16.5px);
    line-height: 1.85;
    color: rgba(246, 243, 234, .76);
}

.hp-live {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px 18px; margin-top: 26px;
    font-size: 13px; color: rgba(246, 243, 234, .62);
}
.hp-live__item { display: inline-flex; align-items: baseline; gap: 7px; }
.hp-live__item b {
    font-size: 17px; font-weight: 700; color: #fbf8f0;
    font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.hp-live__sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .18); }

.hp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 50px; padding: 0 26px;
    border: 0; border-radius: 999px;
    font-size: 14.5px; font-weight: 700; letter-spacing: .01em;
    cursor: pointer;
    transition: transform .3s var(--hp-ease), box-shadow .3s var(--hp-ease), background .3s, color .3s;
}
.hp-btn--gold {
    color: #241706;
    background: linear-gradient(135deg, #f6c778 0%, #eaa73f 52%, #dd9323 100%);
    box-shadow: 0 16px 32px -18px rgba(235, 167, 68, .85), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.hp-btn--gold:hover { transform: translateY(-2px); box-shadow: 0 22px 38px -18px rgba(235, 167, 68, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.hp-btn--ghost {
    color: #f6f3ea;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .26);
    backdrop-filter: blur(8px);
}
.hp-btn--ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.hp-btn--sm { height: 40px; padding: 0 18px; font-size: 13.5px; }

.hp-ann {
    display: flex; align-items: center; gap: 10px;
    text-align: left;
    width: 100%; max-width: 460px; margin-top: 0;
    padding: 8px 8px 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(246, 243, 234, .86);
    font-size: 13px;
    cursor: pointer;
    transition: background .25s, border-color .25s;
}
.hp-ann:hover { background: rgba(255, 255, 255, .13); border-color: rgba(235, 167, 68, .5); }
.hp-ann__tag {
    flex: 0 0 auto; padding: 2px 8px; border-radius: 999px;
    background: rgba(235, 167, 68, .18); color: #f4cd90;
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.hp-ann__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-ann__go { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); }

/* 04. 搜索卡 -------------------------------------------------------------- */
.hp-search {
    position: relative;
    width: 100%; max-width: 460px;
    padding: 20px 20px 18px;
    border-radius: var(--hp-radius-lg);
    background: rgba(18, 20, 29, .62);
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: 0 44px 90px -52px rgba(0, 0, 0, .92), inset 0 1px 0 rgba(255, 255, 255, .1);
    z-index: 6;
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
}
.hp-search__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hp-search__title { font-size: 15px; font-weight: 700; color: #fbf8f0; }
.hp-search__kbd {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 7px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(246, 243, 234, .6);
    font-family: var(--hp-mono); font-size: 11px;
}

.hp-scopes { display: flex; gap: 3px; margin: 14px 0 12px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .06); }
.hp-scope {
    flex: 1 1 0; height: 30px;
    border: 0; border-radius: 9px;
    background: transparent; color: rgba(246, 243, 234, .64);
    font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: background .22s, color .22s;
}
.hp-scope:hover { color: #fbf8f0; }
.hp-scope.is-on { background: rgba(235, 167, 68, .9); color: #23160a; }

.hp-search__field { position: relative; display: flex; align-items: center; }
.hp-search__field .hp-ico--search {
    position: absolute; left: 14px; width: 18px; height: 18px;
    color: rgba(246, 243, 234, .45); pointer-events: none;
}
.hp-search__input {
    width: 100%; height: 50px;
    padding: 0 42px 0 42px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    color: #fbf8f0 !important;
    font-size: 14px;
    outline: none;
    transition: border-color .25s, background .25s, box-shadow .25s;
}
.hp-search__input::placeholder { color: rgba(246, 243, 234, .42); }
.hp-search__input:focus {
    background: rgba(255, 255, 255, .12) !important;
    border-color: rgba(235, 167, 68, .68) !important;
    box-shadow: 0 0 0 4px rgba(235, 167, 68, .14);
}
.hp-search__clear {
    position: absolute; right: 8px;
    width: 30px; height: 30px; display: none; place-items: center;
    border: 0; border-radius: 8px; background: rgba(255, 255, 255, .1);
    color: rgba(246, 243, 234, .7); cursor: pointer;
}
.hp-search.has-value .hp-search__clear { display: grid; }
.hp-search__clear:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.hp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hp-chips__label { flex: 0 0 auto; white-space: nowrap; font-size: 11.5px; color: rgba(246, 243, 234, .42); align-self: center; margin-right: 2px; }
.hp-chip {
    display: inline-flex; align-items: center; gap: 5px;
    height: 27px; padding: 0 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .13);
    color: rgba(246, 243, 234, .8);
    font-size: 12px; cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.hp-chip:hover { background: rgba(235, 167, 68, .16); border-color: rgba(235, 167, 68, .4); color: #fbe6c4; }

/* 搜索结果面板 */
.hp-results {
    position: fixed; left: 0; top: 0; width: 320px;
    z-index: 120;
    max-height: min(326px, 62vh); overflow: auto;
    padding: 6px;
    border-radius: 15px;
    background: #171923;
    border: 1px solid rgba(255, 255, 255, .13);
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .9);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .22s var(--hp-ease), transform .22s var(--hp-ease), visibility .22s;
}
.hp-results.is-open { opacity: 1; visibility: visible; transform: none; }
.hp-results__group { padding: 8px 10px 5px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(246, 243, 234, .36); }
.hp-results__row {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 9px 10px;
    border: 0; border-radius: 10px;
    background: transparent; color: #f2eee4;
    text-align: left; cursor: pointer;
    transition: background .16s;
}
.hp-results__row:hover,
.hp-results__row.is-active { background: rgba(235, 167, 68, .13); }
.hp-results__glyph {
    flex: 0 0 auto; width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .07);
    color: #efc078;
}
.hp-results__main { flex: 1 1 auto; min-width: 0; }
.hp-results__name { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-results__meta { display: block; margin-top: 1px; font-size: 11.5px; color: rgba(246, 243, 234, .48); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-results__meta code { font-family: var(--hp-mono); color: #e7b977; }
.hp-results__tail { flex: 0 0 auto; font-size: 11.5px; color: rgba(246, 243, 234, .45); }
.hp-results__empty { padding: 26px 16px 30px; text-align: center; color: rgba(246, 243, 234, .55); font-size: 13px; }
.hp-results__empty b { color: #f4cd90; font-weight: 600; }
.hp-results__foot {
    position: sticky; bottom: -6px; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 6px 0 0; padding: 9px 10px 8px;
    border-top: 1px solid rgba(255, 255, 255, .09);
    background: #171923;
    font-size: 11.5px; color: rgba(246, 243, 234, .42);
}
.hp-results__all {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; margin: -2px 0;
    border-radius: 8px;
    color: #f4cd90; font-size: 12px; font-weight: 600;
    background: rgba(235, 167, 68, .12);
    transition: background .18s, color .18s;
}
.hp-results__all:hover { background: rgba(235, 167, 68, .22); color: #ffe0ae; }
.hp-results__all .hp-ico { transition: transform .18s; }
.hp-results__all:hover .hp-ico { transform: translateX(2px); }
.hp-results__foot kbd {
    padding: 2px 6px; border-radius: 5px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    font-family: var(--hp-mono); font-size: 10.5px;
}

/* 05. 数据条 -------------------------------------------------------------- */
.hp-stats { position: relative; z-index: 4; margin-top: -60px; }
.hp-stats__card {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    border-radius: var(--hp-radius-lg);
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    box-shadow: var(--hp-shadow);
    overflow: hidden;
}
.hp-stat { padding: 20px 18px 18px; border-right: 1px solid var(--hp-line); }
.hp-stat:last-child { border-right: 0; }
.hp-stat__label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--hp-muted); }
.hp-stat__label .hp-ico { width: 15px; height: 15px; color: var(--hp-accent-2); }
.hp-stat__value {
    margin-top: 7px !important;
    font-size: clamp(21px, 2vw, 26px); font-weight: 800; letter-spacing: -.02em;
    color: var(--hp-ink);
    font-variant-numeric: tabular-nums; line-height: 1.15;
}
.hp-stat__value small { font-size: 12px; font-weight: 600; color: var(--hp-muted); margin-left: 2px; }
html[data-lang="en"] .hp-stat__value small { margin-left: 5px; }
.hp-stat__note { margin-top: 3px !important; font-size: 11.5px; color: var(--hp-faint); }

/* 06. 悬浮快捷导航 -------------------------------------------------------- */
.hp-quickbar {
    position: fixed; top: var(--hp-head); left: 0; right: 0; z-index: 80;
    background: var(--hp-glass);
    border-bottom: 1px solid var(--hp-line);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    transform: translateY(calc(-100% - 2px));
    transition: transform .4s var(--hp-ease), box-shadow .4s;
}
.hp-quickbar.is-on { transform: none; box-shadow: 0 16px 30px -26px rgba(20, 22, 30, .6); }
.hp-quickbar__inner { display: flex; align-items: center; gap: 18px; height: 54px; }
.hp-quickbar__brand { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hp-faint); flex: 0 0 auto; }
.hp-quickbar__nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.hp-quickbar__nav::-webkit-scrollbar { display: none; }
.hp-qlink {
    position: relative; flex: 0 0 auto;
    padding: 7px 12px; border-radius: 9px;
    font-size: 13.5px; font-weight: 600; color: var(--hp-muted);
    white-space: nowrap; transition: color .2s, background .2s;
}
.hp-qlink:hover { color: var(--hp-ink); background: var(--hp-paper-3); }
.hp-qlink.is-on { color: var(--hp-accent-deep); background: var(--hp-accent-soft); }
.hp-quickbar__act { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; }
.hp-quickbar__search {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--hp-line-strong);
    background: var(--hp-paper); color: var(--hp-ink-soft);
    font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}
.hp-quickbar__search:hover { border-color: var(--hp-accent-line); color: var(--hp-accent-deep); }

/* 07. 区块头 -------------------------------------------------------------- */
body.hp-home .hp-sec { padding: clamp(56px, 6.4vw, 88px) 0; scroll-margin-top: calc(var(--hp-head) + 70px); }
body.hp-home .hp-sec--flush { padding-top: clamp(24px, 3vw, 36px); }
.hp-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.hp-sec__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--hp-accent-2);
}
.hp-sec__eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; opacity: .55; }
.hp-sec__title { margin-top: 9px !important; font-size: clamp(25px, 2.9vw, 34px); font-weight: 800; letter-spacing: -.02em; color: var(--hp-ink); line-height: 1.2; }
.hp-sec__desc { margin-top: 9px !important; max-width: 560px; font-size: 14px; color: var(--hp-muted); }
.hp-more {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding-bottom: 4px;
    font-size: 13.5px; font-weight: 600; color: var(--hp-ink-soft);
    transition: color .2s, gap .2s;
}
.hp-more:hover { color: var(--hp-accent-deep); gap: 10px; }
.hp-more .hp-ico { transition: transform .2s; }
.hp-more:hover .hp-ico { transform: translateX(2px); }

/* 08. 近期更新 ticker ----------------------------------------------------- */
.hp-ticker {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 18px; padding: 11px 16px;
    border-radius: 14px;
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    box-shadow: var(--hp-shadow-soft);
    overflow: hidden;
}
.hp-ticker__label { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--hp-accent-deep); }
.hp-ticker__label i { width: 7px; height: 7px; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 3px rgba(47, 163, 107, .16); animation: hp-pulse 2.4s var(--hp-ease) infinite; }
.hp-ticker__viewport { position: relative; flex: 1 1 auto; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 40px), transparent); }
.hp-ticker__track { display: inline-flex; gap: 26px; white-space: nowrap; animation: hp-marquee 52s linear infinite; }
.hp-ticker:hover .hp-ticker__track { animation-play-state: paused; }
.hp-ticker__item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--hp-muted); }
.hp-ticker__item b { font-weight: 600; color: var(--hp-ink-soft); }
.hp-ticker__item code { font-family: var(--hp-mono); font-size: 11px; color: var(--hp-accent-2); }
.hp-ticker__item:hover b { color: var(--hp-accent-deep); }
@keyframes hp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 09. 最新更新列表 -------------------------------------------------------- */
.hp-feed {
    border-radius: var(--hp-radius-lg);
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    box-shadow: var(--hp-shadow-soft);
    overflow: hidden;
}
.hp-feed__tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--hp-line); }
.hp-tab {
    height: 32px; padding: 0 14px;
    border: 0; border-radius: 999px;
    background: transparent; color: var(--hp-muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background .2s, color .2s;
}
.hp-tab:hover { background: var(--hp-paper-3); color: var(--hp-ink); }
.hp-tab.is-on { background: var(--hp-accent-soft); color: var(--hp-accent-deep); }
.hp-feed__count { margin-left: auto; font-size: 12px; color: var(--hp-faint); font-variant-numeric: tabular-nums; }
.hp-feed__list { display: flex; flex-direction: column; }
.hp-row {
    display: flex; align-items: center; gap: 18px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--hp-line);
    transition: background .18s;
}
.hp-row:last-child { border-bottom: 0; }
.hp-row:hover { background: var(--hp-paper-2); }
.hp-row__glyph {
    flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 11px;
    background: var(--hp-accent-soft);
    color: var(--hp-accent-deep);
}
.hp-row__main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 18px; }
.hp-row__dev { flex: 0 0 190px; min-width: 0; }
.hp-row__dev b { display: block; font-size: 14.5px; font-weight: 700; color: var(--hp-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-row__dev code { display: inline-block; margin-top: 2px; font-family: var(--hp-mono); font-size: 11px; color: var(--hp-faint); }
.hp-row__rom { flex: 1 1 auto; min-width: 0; }
.hp-row__rom b { display: block; font-size: 13.5px; font-weight: 600; color: var(--hp-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-row__rom span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--hp-faint); }
.hp-row__meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.hp-badge {
    display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
    border-radius: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: .02em;
    background: var(--hp-paper-3); color: var(--hp-muted);
    border: 1px solid var(--hp-line);
}
.hp-badge--gold { background: var(--hp-accent-soft); color: var(--hp-accent-deep); border-color: var(--hp-accent-line); }
.hp-badge--ok { background: var(--hp-ok-soft); color: var(--hp-ok); border-color: transparent; }
.hp-badge--info { background: var(--hp-info-soft); color: var(--hp-info); border-color: transparent; }
.hp-row__time { flex: 0 0 84px; text-align: right; font-size: 12px; color: var(--hp-faint); font-variant-numeric: tabular-nums; }
.hp-row__go {
    flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center;
    border-radius: 50%;
    background: var(--hp-paper-3); color: var(--hp-muted);
    transition: background .2s, color .2s, transform .2s;
}
.hp-row:hover .hp-row__go { background: var(--hp-accent); color: #23160a; transform: translateX(2px); }
.hp-feed__more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--hp-line); background: var(--hp-paper-2); }
.hp-feed__empty { padding: 46px 20px; text-align: center; color: var(--hp-muted); font-size: 13.5px; }

/* 10. 资源矩阵 ------------------------------------------------------------ */
.hp-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hp-card {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    padding: 20px;
    border-radius: var(--hp-radius);
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    box-shadow: 0 1px 2px rgba(28, 30, 43, .03);
    overflow: hidden;
    transition: transform .34s var(--hp-ease), box-shadow .34s var(--hp-ease), border-color .34s;
}
.hp-card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(220px 140px at 100% 0%, var(--hp-accent-soft), transparent 70%);
    opacity: 0; transition: opacity .34s;
    pointer-events: none;
}
.hp-card:hover { transform: translateY(-4px); box-shadow: var(--hp-shadow-lift); border-color: var(--hp-accent-line); }
.hp-card:hover::before { opacity: 1; }
.hp-card__top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hp-card__icon {
    width: 42px; height: 42px; display: grid; place-items: center;
    border-radius: 12px;
    background: var(--hp-accent-soft);
    color: var(--hp-accent-deep);
    transition: transform .34s var(--hp-ease-spring), background .34s;
}
.hp-card:hover .hp-card__icon { transform: translateY(-1px) scale(1.04); background: var(--hp-accent); color: #23160a; }
.hp-card__count { font-family: var(--hp-mono); font-size: 12px; font-weight: 600; color: var(--hp-faint); }
.hp-card__count b { font-size: 15px; color: var(--hp-ink); }
.hp-card__title { position: relative; font-size: 16px; font-weight: 700; color: var(--hp-ink); letter-spacing: -.01em; }
.hp-card__desc { position: relative; font-size: 12.5px; line-height: 1.65; color: var(--hp-muted); min-height: 41px; }
.hp-card__link {
    position: relative; display: inline-flex; align-items: center; gap: 5px;
    margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--hp-accent-deep);
    opacity: .82; transition: gap .22s, opacity .22s;
}
.hp-card:hover .hp-card__link { gap: 9px; opacity: 1; }

.hp-svc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hp-svc__label { align-self: center; margin-right: 4px; font-size: 12px; color: var(--hp-faint); }
.hp-svc a {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 13px;
    border-radius: 999px;
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    font-size: 12.5px; color: var(--hp-ink-soft);
    transition: border-color .2s, color .2s, transform .2s;
}
.hp-svc a:hover { border-color: var(--hp-accent-line); color: var(--hp-accent-deep); transform: translateY(-1px); }

/* 11. 工具 / 模块双栏 ----------------------------------------------------- */
.hp-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp-panel {
    display: flex; flex-direction: column;
    border-radius: var(--hp-radius-lg);
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    box-shadow: var(--hp-shadow-soft);
    overflow: hidden;
}
.hp-panel__head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--hp-line); }
.hp-panel__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--hp-accent-soft); color: var(--hp-accent-deep); }
.hp-panel__title { font-size: 15px; font-weight: 700; color: var(--hp-ink); }
.hp-panel__sub { font-size: 11.5px; color: var(--hp-faint); }
.hp-panel__link { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--hp-muted); display: inline-flex; align-items: center; gap: 4px; }
.hp-panel__link:hover { color: var(--hp-accent-deep); }
.hp-panel__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.hp-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--hp-line);
    transition: background .18s;
}
.hp-item:last-child { border-bottom: 0; }
.hp-item:hover { background: var(--hp-paper-2); }
.hp-item__rank {
    flex: 0 0 22px; font-family: var(--hp-mono); font-size: 12px; font-weight: 700;
    color: var(--hp-faint); text-align: center;
}
.hp-item:nth-child(1) .hp-item__rank { color: var(--hp-accent-2); }
.hp-item:nth-child(2) .hp-item__rank { color: var(--hp-accent-2); opacity: .8; }
.hp-item:nth-child(3) .hp-item__rank { color: var(--hp-accent-2); opacity: .6; }
.hp-item__main { flex: 1 1 auto; min-width: 0; }
.hp-item__name { display: block; font-size: 13.5px; font-weight: 600; color: var(--hp-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-item__meta { display: block; margin-top: 2px; font-size: 11.5px; color: var(--hp-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-item__tag { flex: 0 0 auto; }
.hp-item__hits { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--hp-faint); font-variant-numeric: tabular-nums; }

/* 12. 教程卡片 ------------------------------------------------------------ */
.hp-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hp-guide {
    display: flex; flex-direction: column;
    border-radius: var(--hp-radius);
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    overflow: hidden;
    transition: transform .34s var(--hp-ease), box-shadow .34s var(--hp-ease), border-color .34s;
}
.hp-guide:hover { transform: translateY(-4px); box-shadow: var(--hp-shadow-lift); border-color: var(--hp-accent-line); }
.hp-guide__media { position: relative; aspect-ratio: 16 / 9.6; overflow: hidden; background: var(--hp-paper-3); }
.hp-guide__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--hp-ease); }
.hp-guide:hover .hp-guide__media img { transform: scale(1.045); }
.hp-guide__tag {
    position: absolute; left: 12px; top: 12px;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(12, 14, 20, .66); color: #f4cd90;
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 11px; font-weight: 600; backdrop-filter: blur(6px);
}
.hp-guide__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1 1 auto; }
.hp-guide__title {
    font-size: 14.5px; font-weight: 700; line-height: 1.55; color: var(--hp-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 45px;
}
.hp-guide:hover .hp-guide__title { color: var(--hp-accent-deep); }
.hp-guide__meta { display: flex; align-items: center; gap: 12px; margin-top: auto; font-size: 11.5px; color: var(--hp-faint); }
.hp-guide__meta span { display: inline-flex; align-items: center; gap: 4px; }

/* 13. 会员 / 社区 --------------------------------------------------------- */
.hp-member {
    position: relative; overflow: hidden;
    border-radius: 26px;
    padding: clamp(26px, 3.4vw, 44px);
    background:
        radial-gradient(520px 300px at 88% -20%, rgba(235, 167, 68, .26), transparent 68%),
        linear-gradient(146deg, #272a3b 0%, #1c1e2a 54%, #14151d 100%);
    color: #f6f3ea;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 40px 80px -60px rgba(16, 18, 26, .9);
}
.hp-member::after {
    content: ""; position: absolute; right: -80px; bottom: -120px;
    width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(235, 167, 68, .16), transparent 68%);
    pointer-events: none;
}
.hp-member__grid { position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(26px, 3.6vw, 52px); align-items: center; }
.hp-member__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #eccb96; }
.hp-member h2 { margin-top: 12px !important; font-size: clamp(24px, 2.7vw, 32px); font-weight: 800; line-height: 1.24; color: #fbf8f0; letter-spacing: -.02em; }
.hp-member__desc { margin-top: 12px !important; font-size: 13.5px; line-height: 1.8; color: rgba(246, 243, 234, .66); max-width: 420px; }
.hp-member__feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.hp-feat { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: rgba(246, 243, 234, .82); }
.hp-feat .hp-ico { width: 15px; height: 15px; margin-top: 2px; color: #efc078; }

.hp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hp-plan {
    position: relative;
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 14px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .12);
    text-align: left; cursor: pointer;
    transition: background .25s, border-color .25s, transform .25s;
}
.hp-plan:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); }
.hp-plan.is-on { background: rgba(235, 167, 68, .14); border-color: rgba(235, 167, 68, .62); }
.hp-plan__tag { position: absolute; right: 10px; top: -9px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, #f6c778, #dd9323); color: #241706; font-size: 10px; font-weight: 800; }
.hp-plan__name { font-size: 13px; font-weight: 700; color: #fbf8f0; }
.hp-plan__price { display: flex; align-items: baseline; gap: 3px; margin-top: 2px; }
.hp-plan__price b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: #fbe2b6; font-variant-numeric: tabular-nums; }
.hp-plan__price i { font-style: normal; font-size: 11.5px; color: rgba(246, 243, 234, .5); }
.hp-plan__note { font-size: 11px; color: rgba(246, 243, 234, .46); }

.hp-plan-detail {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 12px; padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
}
.hp-plan-detail__text { font-size: 12px; line-height: 1.65; color: rgba(246, 243, 234, .72); }
.hp-plan-detail__text b { color: #f4cd90; font-weight: 700; }

.hp-community { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.hp-comm {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    transition: transform .26s var(--hp-ease), border-color .26s, box-shadow .26s;
}
.hp-comm:hover { transform: translateY(-2px); border-color: var(--hp-accent-line); box-shadow: var(--hp-shadow-soft); }
.hp-comm .hp-comm__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--hp-accent-soft); color: var(--hp-accent-2); flex: 0 0 auto; }
.hp-comm .hp-comm__icon svg { display: block; }
.hp-comm b { display: block; font-size: 13px; font-weight: 700; color: var(--hp-ink); }
.hp-comm span { display: block; margin-top: 1px; font-size: 11.5px; color: var(--hp-faint); }

/* 14. 弹层 / 抽屉 --------------------------------------------------------- */
.hp-modal {
    position: fixed; inset: 0; z-index: 200;
    display: grid; place-items: center;
    padding: 24px;
    background: rgba(8, 9, 13, .62);
    backdrop-filter: blur(7px);
    opacity: 0; visibility: hidden;
    transition: opacity .26s var(--hp-ease), visibility .26s;
}
.hp-modal.is-on { opacity: 1; visibility: visible; }
.hp-modal__box {
    width: 100%; max-width: 560px; max-height: 86vh;
    display: flex; flex-direction: column;
    border-radius: var(--hp-radius-lg);
    background: var(--hp-paper);
    border: 1px solid var(--hp-line);
    box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .6);
    transform: translateY(16px) scale(.985);
    transition: transform .32s var(--hp-ease-spring);
    overflow: hidden;
}
.hp-modal.is-on .hp-modal__box { transform: none; }
.hp-modal__head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 20px 14px; border-bottom: 1px solid var(--hp-line); }
.hp-modal__title { flex: 1 1 auto; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--hp-ink); }
.hp-modal__sub { margin-top: 4px !important; font-size: 12px; color: var(--hp-faint); }
.hp-modal__close {
    flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: var(--hp-paper-3); color: var(--hp-muted);
    cursor: pointer; transition: background .2s, color .2s;
}
.hp-modal__close:hover { background: var(--hp-accent-soft); color: var(--hp-accent-deep); }
.hp-modal__body { padding: 18px 20px; overflow: auto; overflow-wrap: anywhere; word-break: break-word; }
/* 公告正文来自编辑器，常带 text-wrap-mode:nowrap / 宽表格，这里统一允许换行 */
.hp-modal__body [style*="nowrap"] { white-space: normal !important; text-wrap-mode: wrap !important; }
.hp-modal__body img, .hp-modal__body table { max-width: 100%; height: auto; }
.hp-modal__body p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.85; color: var(--hp-ink-soft); }
.hp-modal__body p:last-child { margin-bottom: 0; }
.hp-modal__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 18px; border-top: 1px solid var(--hp-line); }

.hp-sheet-device { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--hp-paper-2); border-bottom: 1px solid var(--hp-line); }
.hp-sheet-device__glyph { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--hp-accent-soft); color: var(--hp-accent-deep); }
.hp-sheet-device h3 { font-size: 17px; font-weight: 800; color: var(--hp-ink); }
.hp-sheet-device p { margin-top: 2px !important; font-size: 12px; color: var(--hp-muted); }
.hp-sheet-device code { font-family: var(--hp-mono); color: var(--hp-accent-2); }

.hp-actions { display: flex; flex-direction: column; }
.hp-action {
    display: flex; align-items: center; gap: 13px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--hp-line);
    transition: background .18s;
}
.hp-action:hover { background: var(--hp-paper-2); }
.hp-action__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--hp-paper-3); color: var(--hp-accent-deep); flex: 0 0 auto; }
.hp-action__main { flex: 1 1 auto; min-width: 0; }
.hp-action__main b { display: block; font-size: 13.5px; font-weight: 600; color: var(--hp-ink); }
.hp-action__main span { display: block; margin-top: 1px; font-size: 11.5px; color: var(--hp-faint); }
.hp-action__count { font-family: var(--hp-mono); font-size: 12px; color: var(--hp-faint); }

.hp-copybar { display: flex; align-items: center; gap: 10px; padding: 14px 20px 18px; }
.hp-copybar code {
    flex: 1 1 auto; padding: 10px 12px;
    border-radius: 10px;
    background: var(--hp-paper-3);
    border: 1px dashed var(--hp-line-strong);
    font-family: var(--hp-mono); font-size: 12.5px; color: var(--hp-ink-soft);
    overflow: hidden; text-overflow: ellipsis;
}

/* 15. Toast / 回到顶部 ---------------------------------------------------- */
.hp-toast {
    position: fixed; left: 50%; bottom: 34px; z-index: 300;
    display: flex; align-items: center; gap: 10px;
    padding: 11px 18px;
    border-radius: 999px;
    background: rgba(20, 22, 30, .94);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #f6f3ea;
    font-size: 13px;
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8);
    transform: translate(-50%, 18px);
    opacity: 0; visibility: hidden;
    transition: opacity .26s var(--hp-ease), transform .26s var(--hp-ease), visibility .26s;
}
.hp-toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.hp-toast .hp-ico { color: #7ee0ae; }

.hp-top {
    position: fixed; right: 22px; bottom: 88px; z-index: 90;
    width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--hp-line);
    background: var(--hp-paper);
    color: var(--hp-ink-soft);
    box-shadow: var(--hp-shadow-soft);
    cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .28s, transform .28s, visibility .28s, color .2s, border-color .2s;
}
.hp-top.is-on { opacity: 1; visibility: visible; transform: none; }
.hp-top:hover { color: var(--hp-accent-deep); border-color: var(--hp-accent-line); }

/* 16. 入场动效 ------------------------------------------------------------ */
html.hp-js body.hp-home [data-hp-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .72s var(--hp-ease), transform .72s var(--hp-ease);
    transition-delay: calc(var(--d, 0) * 65ms);
}
html.hp-js body.hp-home [data-hp-reveal].is-in { opacity: 1; transform: none; }

/* 17. 响应式 -------------------------------------------------------------- */
@media (max-width: 1180px) {
    .hp-grid4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hp-stats__card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hp-stat:nth-child(3n) { border-right: 0; }
    .hp-stat:nth-child(-n + 3) { border-bottom: 1px solid var(--hp-line); }
}

@media (max-width: 960px) {
    .hp-hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "side" "cta"; align-items: start; }
    .hp-hero__side { align-items: stretch; gap: 12px; }
    .hp-search { max-width: none; }
    .hp-hero { min-height: 0; padding-top: clamp(30px, 5vw, 48px); }
    .hp-live { gap: 6px 14px; }
    .hp-split { grid-template-columns: minmax(0, 1fr); }
    .hp-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-grid3 > :nth-child(3) { display: none; }
    .hp-member__grid { grid-template-columns: minmax(0, 1fr); }
    .hp-community { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    body.hp-home { --hp-gutter: 16px; }
    .hp-hero { padding-bottom: 70px; padding-top: 26px; }
    .hp-hero h1 { font-size: clamp(30px, 8.2vw, 38px); margin-top: 12px; }
    .hp-hero__lead { font-size: 13.5px; line-height: 1.75; margin-top: 12px !important; }
    .hp-hero__lead br { display: none; }
    .hp-hero__lead span { display: inline; }
    .hp-live { margin-top: 16px; font-size: 12px; gap: 4px 12px; }
    .hp-live__item b { font-size: 15px; }
    .hp-eyebrow { font-size: 10.5px; letter-spacing: .12em; }
    .hp-ann { margin-top: 0; padding: 7px 7px 7px 12px; max-width: none; }
    .hp-ann__text { font-size: 12.5px; }
    .hp-search { padding: 15px 14px 14px; border-radius: 20px; }
    .hp-search__head { font-size: 14px; }
    .hp-scopes { margin: 11px 0 10px; }
    .hp-scope { height: 28px; font-size: 12px; }
    .hp-search__input { height: 46px; font-size: 13.5px; }
    .hp-chips {
        flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    }
    .hp-chips::-webkit-scrollbar { display: none; }
    .hp-chip { flex: 0 0 auto; }
    .hp-hero__cta .hp-btn { flex: 1 1 auto; }
    .hp-quickbar__act { display: none; }
    body.hp-home .hp-sec { padding: 46px 0; }
    body.hp-home .hp-sec--flush { padding-top: 18px; }
    .hp-plans { gap: 7px; }
    .hp-plan { padding: 12px 9px; }
    .hp-plan__name { font-size: 12px; }
    .hp-plan__price { flex-wrap: wrap; gap: 0 2px; }
    .hp-plan__price b { font-size: 19px; }
    .hp-plan__price i { font-size: 10px; white-space: nowrap; }
    .hp-plan__note { font-size: 10px; }
    .hp-stats { margin-top: -46px; }
    .hp-stats__card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-stat { padding: 15px 14px; }
    .hp-stat:nth-child(3n) { border-right: 1px solid var(--hp-line); }
    .hp-stat:nth-child(2n) { border-right: 0; }
    .hp-stat:nth-child(-n + 4) { border-bottom: 1px solid var(--hp-line); }
    .hp-stat__value { font-size: 20px; }
    .hp-sec__head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .hp-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hp-card { padding: 16px; }
    .hp-card__desc { min-height: 0; }
    .hp-grid3 { grid-template-columns: minmax(0, 1fr); }
    .hp-grid3 > :nth-child(3) { display: flex; }
    .hp-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto 34px;
        grid-template-areas: "main main go" "meta time go";
        align-items: center;
        gap: 9px 10px;
        padding: 13px 14px;
    }
    .hp-row__main { grid-area: main; display: block; }
    .hp-row__dev { width: 100%; display: flex; align-items: baseline; gap: 8px; }
    .hp-row__dev b { font-size: 14.5px; }
    .hp-row__dev code { margin-top: 0; }
    .hp-row__rom b { font-size: 13.5px; margin-top: 3px; }
    .hp-row__rom span { display: none; }
    .hp-row__meta { grid-area: meta; justify-content: flex-start; }
    .hp-row__time { grid-area: time; justify-self: end; text-align: right; font-size: 11.5px; }
    .hp-row__go { grid-area: go; align-self: center; }
    .hp-row__glyph { display: none; }
    .hp-feed__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .hp-feed__tabs::-webkit-scrollbar { display: none; }
    .hp-tab { flex: 0 0 auto; }
    .hp-feed__count { flex: 0 0 auto; }
    .hp-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .hp-plan { padding: 12px 10px; }
    .hp-plan__price b { font-size: 20px; }
    .hp-plan-detail { flex-direction: column; align-items: stretch; }
    .hp-quickbar__brand { display: none; }
    .hp-quickbar__inner { gap: 10px; }
    .hp-community { grid-template-columns: minmax(0, 1fr); }
    .hp-modal { padding: 0; align-items: end; }
    .hp-modal__box { max-width: none; max-height: 90vh; border-radius: 22px 22px 0 0; transform: translateY(30px); }
    .hp-member__feats { grid-template-columns: minmax(0, 1fr); }
    .hp-top { right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 42px; height: 42px; }
    .hp-ticker { padding: 10px 12px; gap: 10px; }
}

@media (max-width: 560px) {
    /* 资源卡改为紧凑横排，避免 8 张竖向大卡把首页拉得过长 */
    .hp-grid4 { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .hp-card {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        grid-template-areas: "icon title count" "icon desc desc" "icon link link";
        align-items: center;
        gap: 3px 13px;
        padding: 13px 15px;
    }
    .hp-card__top { display: contents; }
    .hp-card__icon { grid-area: icon; width: 38px; height: 38px; }
    .hp-card__count { grid-area: count; align-self: start; margin-top: 4px; font-size: 11px; }
    .hp-card__count b { font-size: 13px; }
    .hp-card__title { grid-area: title; font-size: 15px; }
    .hp-card__desc {
        grid-area: desc; min-height: 0; font-size: 12px; line-height: 1.5;
        display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
    }
    .hp-card__link { grid-area: link; margin-top: 5px; font-size: 12px; }
    .hp-card:hover { transform: none; }
}

@media (max-width: 420px) {
    .hp-search { padding: 14px 12px 12px; }
    .hp-search__kbd { display: none; }
    .hp-card__desc { min-height: 0; }
    .hp-live__sep { display: none; }

}

/* 17. AI 问答 -------------------------------------------------------------- */
.hp-search__head-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.hp-ai-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--hp-accent-line);
    border-radius: 999px;
    background: var(--hp-accent-soft);
    color: #f7e2b8;
    font-family: var(--hp-font);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .2s var(--hp-ease), border-color .2s var(--hp-ease), transform .2s var(--hp-ease);
}
.hp-ai-toggle .hp-ico { color: var(--hp-accent); }
.hp-ai-toggle:hover { background: rgba(235, 167, 68, .24); border-color: var(--hp-accent); transform: translateY(-1px); }
.hp-ai-toggle:focus-visible { outline: 2px solid var(--hp-accent); outline-offset: 2px; }

.hp-ai {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--hp-ease), visibility .2s var(--hp-ease);
}
.hp-ai[hidden] { display: none; }
.hp-ai.is-open { opacity: 1; visibility: visible; }
.hp-ai__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 17, 23, .52);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.hp-ai__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius-lg);
    background: var(--hp-paper);
    box-shadow: 0 40px 100px -36px rgba(16, 17, 23, .6), 0 8px 30px -18px rgba(16, 17, 23, .35);
    transform: translateY(14px) scale(.985);
    transition: transform .24s var(--hp-ease-spring);
}
.hp-ai.is-open .hp-ai__panel { transform: none; }

.hp-ai__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--hp-line);
    background: var(--hp-paper);
}
.hp-ai__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hp-ai__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 11px;
    background: var(--hp-accent-soft);
    color: var(--hp-accent);
}
.hp-ai__brand b { display: block; color: var(--hp-ink); font-size: 15px; line-height: 1.3; }
.hp-ai__brand span { display: block; color: var(--hp-muted); font-size: 11.5px; line-height: 1.4; }
.hp-ai__head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.hp-ai__ghost,
.hp-ai__icon {
    border: 1px solid var(--hp-line);
    border-radius: 9px;
    background: var(--hp-paper-2);
    color: var(--hp-ink-soft);
    font-family: var(--hp-font);
    cursor: pointer;
    transition: border-color .18s var(--hp-ease), color .18s var(--hp-ease), background .18s var(--hp-ease);
}
.hp-ai__ghost { height: 30px; padding: 0 10px; font-size: 12px; }
.hp-ai__icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
.hp-ai__ghost:hover,
.hp-ai__icon:hover { border-color: var(--hp-accent-line); color: var(--hp-accent-deep); background: var(--hp-accent-soft); }

.hp-ai__log {
    flex: 1 1 auto;
    min-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 20px 8px;
    background: var(--hp-paper-2);
    scrollbar-width: thin;
}
.hp-ai__msg { display: flex; gap: 10px; margin-bottom: 15px; }
.hp-ai__msg--user { justify-content: flex-end; }
.hp-ai__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    background: var(--hp-accent-soft);
    color: var(--hp-accent-deep);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
}
.hp-ai__bubble {
    max-width: min(88%, 620px);
    padding: 11px 13px;
    border: 1px solid var(--hp-line);
    border-radius: 14px;
    background: var(--hp-paper);
    color: var(--hp-ink);
    font-size: 13.5px;
    line-height: 1.75;
    word-break: break-word;
}
.hp-ai__msg--ai .hp-ai__bubble { border-bottom-left-radius: 5px; }
.hp-ai__msg--user .hp-ai__bubble {
    border-color: var(--hp-accent-line);
    background: var(--hp-accent-soft);
    border-bottom-right-radius: 5px;
}
.hp-ai__text p { margin: 0 0 8px; }
.hp-ai__text p:last-child { margin-bottom: 0; }
.hp-ai__text h4 { margin: 10px 0 6px; font-size: 14px; color: var(--hp-ink); }
.hp-ai__text ul { margin: 4px 0 8px; padding-left: 18px; }
.hp-ai__text li { margin: 2px 0; }
.hp-ai__text code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--hp-paper-3);
    color: var(--hp-accent-deep);
    font-family: var(--hp-mono);
    font-size: 12px;
}
.hp-ai__text a { color: var(--hp-accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.hp-ai__cite {
    display: inline-flex;
    align-items: center;
    height: 16px;
    padding: 0 4px;
    margin: 0 1px;
    border-radius: 5px;
    background: var(--hp-accent-soft);
    color: var(--hp-accent-deep) !important;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none !important;
    vertical-align: 1px;
}
.hp-ai__typing { display: inline-flex; gap: 4px; padding: 2px 0; }
.hp-ai__typing i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--hp-muted);
    animation: hp-ai-blink 1.1s infinite ease-in-out;
}
.hp-ai__typing i:nth-child(2) { animation-delay: .15s; }
.hp-ai__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hp-ai-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.hp-ai__sources { display: grid; gap: 6px; margin-top: 10px; }
.hp-ai__src {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--hp-line);
    border-radius: 10px;
    background: var(--hp-paper-2);
    color: var(--hp-ink);
    text-decoration: none;
    transition: border-color .18s var(--hp-ease), background .18s var(--hp-ease), transform .18s var(--hp-ease);
}
.hp-ai__src:hover { border-color: var(--hp-accent-line); background: var(--hp-paper); transform: translateY(-1px); }
.hp-ai__src.is-highlight { border-color: var(--hp-accent); box-shadow: 0 0 0 2px var(--hp-accent-soft); }
.hp-ai__src-type {
    flex: none;
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--hp-accent-soft);
    color: var(--hp-accent-deep);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.7;
}
.hp-ai__src-main { min-width: 0; flex: 1; }
.hp-ai__src-title {
    display: block;
    overflow: hidden;
    color: var(--hp-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hp-ai__src-meta { display: block; margin-top: 1px; overflow: hidden; color: var(--hp-muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.hp-ai__src-go { flex: none; color: var(--hp-faint); font-size: 11px; line-height: 1.8; }

.hp-ai__msg-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hp-ai__act {
    height: 24px;
    padding: 0 8px;
    border: 1px solid var(--hp-line);
    border-radius: 7px;
    background: transparent;
    color: var(--hp-muted);
    font-family: var(--hp-font);
    font-size: 11px;
    cursor: pointer;
}
.hp-ai__act:hover { border-color: var(--hp-accent-line); color: var(--hp-accent-deep); }
.hp-ai__act.is-on { border-color: var(--hp-accent-line); background: var(--hp-accent-soft); color: var(--hp-accent-deep); }
.hp-ai__act[disabled] { opacity: .55; cursor: default; }

.hp-ai__suggest { display: flex; gap: 7px; flex-wrap: wrap; padding: 4px 20px 10px; background: var(--hp-paper-2); }
.hp-ai__chip {
    padding: 5px 9px;
    border: 1px solid var(--hp-line);
    border-radius: 999px;
    background: var(--hp-paper);
    color: var(--hp-ink-soft);
    font-family: var(--hp-font);
    font-size: 11.5px;
    cursor: pointer;
    transition: border-color .18s var(--hp-ease), color .18s var(--hp-ease), background .18s var(--hp-ease);
}
.hp-ai__chip:hover { border-color: var(--hp-accent-line); background: var(--hp-accent-soft); color: var(--hp-accent-deep); }

.hp-ai__composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 11px 16px;
    border-top: 1px solid var(--hp-line);
    background: var(--hp-paper);
}
.hp-ai__input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 9px 11px;
    resize: none;
    border: 1px solid var(--hp-line);
    border-radius: 11px;
    background: var(--hp-paper-2);
    color: var(--hp-ink);
    font-family: var(--hp-font);
    font-size: 13px;
    line-height: 1.5;
    outline: none;
    transition: border-color .18s var(--hp-ease), box-shadow .18s var(--hp-ease);
}
.hp-ai__input::placeholder { color: var(--hp-faint); }
.hp-ai__input:focus { border-color: var(--hp-accent); box-shadow: 0 0 0 3px var(--hp-accent-soft); }
.hp-ai__send {
    flex: none;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--hp-accent);
    border-radius: 11px;
    background: var(--hp-accent);
    color: #1f1a10;
    font-family: var(--hp-font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .18s var(--hp-ease), transform .18s var(--hp-ease);
}
.hp-ai__send:hover { filter: brightness(1.05); transform: translateY(-1px); }
.hp-ai__send:disabled { opacity: .55; cursor: default; transform: none; }
.hp-ai__send--stop { border-color: var(--hp-line); background: transparent; color: var(--hp-muted); font-weight: 600; }
.hp-ai__foot { padding: 0 18px 10px; background: var(--hp-paper); color: var(--hp-faint); font-size: 10.5px; line-height: 1.5; text-align: center; }
.hp-ai-open { overflow: hidden; }

html[data-theme="dark"] .hp-ai__send { color: #17130b; }
html[data-theme="dark"] .hp-ai__src-title { color: var(--hp-ink); }

@media (max-width: 760px) {
    .hp-ai { align-items: flex-end; padding: 0; }
    .hp-ai__panel {
        width: 100%;
        height: 92vh;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }
    .hp-ai__head { padding: 12px 14px; }
    .hp-ai__log { padding: 14px 14px 6px; }
    .hp-ai__bubble { max-width: 92%; font-size: 13px; }
    .hp-ai__suggest { padding: 4px 14px 9px; overflow-x: auto; flex-wrap: nowrap; }
    .hp-ai__chip { flex: none; }
    .hp-ai__composer { padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
    .hp-ai__foot { padding: 0 14px calc(8px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
    .hp-ai-toggle span { display: none; }
    .hp-ai-toggle { width: 26px; padding: 0; justify-content: center; }
}

/* 18. 无动画偏好 ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html.hp-js body.hp-home [data-hp-reveal] { opacity: 1; transform: none; transition: none; }
    .hp-ticker__track { animation: none; }
    .hp-eyebrow__dot,
    .hp-ticker__label i { animation: none; }
    .hp-card, .hp-guide, .hp-row__go, .hp-btn, .hp-comm { transition: none; }
    .hp-guide__media img { transition: none; }
}
