/* 分类热门 3B：分类 Tab 记忆 + Top3 领奖台 + 4~50 双列紧凑榜 */
.hh-v3b,.hh-v3b .hh-head,.hh-v3b .hh-head-l,.hh-v3b .hh-head-r,.hh-v3b .hh-period-body,.hh-board{min-width:0;max-width:100%}
.hh-v3b .hh-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #eadfcd;flex-wrap:wrap}
.hh-v3b .hh-head-l{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.hh-v3b .hh-head-l h3{margin:0!important;padding:0 0 0 12px!important;border:0!important;background:none!important;font-size:16px;position:relative}
.hh-v3b .hh-head-l h3::before{top:50%;transform:translateY(-50%);left:0}
.hh-cat-tabs{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0;max-width:100%}
.hh-cat-tabs button{height:26px;padding:0 11px;border-radius:999px;border:1px solid #e3dccf;background:#fff;color:#52483e;font-family:inherit;font-size:12.5px;font-weight:500;cursor:pointer;white-space:nowrap}
.hh-cat-tabs button:hover{border-color:#0f766e;color:#0f766e}
.hh-cat-tabs button.on{border-color:#0f6b5c;background:#0f6b5c;color:#fff;font-weight:600}

.hh-v3b .hh-head-r{display:flex;align-items:center;gap:10px;margin-left:auto;flex-wrap:wrap}
.hh-period-tabs{display:inline-flex;padding:2px;border-radius:8px;background:#f2eadc;border:1px solid #e3dccf;gap:2px;font-size:12px;font-weight:400}
.hh-period-tabs button{height:24px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#6b6560;font:inherit;line-height:24px;cursor:pointer;white-space:nowrap}
.hh-period-tabs button:hover{color:#2b2622}
.hh-period-tabs button.on{background:#fff;color:#2b2622;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.hh-period-tabs button:focus-visible,.hh-cat-tabs button:focus-visible{outline:2px solid #69a999;outline-offset:2px}
.hh-period-panel .hh-period-note{margin-left:0;font-size:12px;color:#8a837a;white-space:nowrap}
.hh-period-message{padding:0 16px;color:#a9552d;font-size:12px}
.hh-period-message:not(:empty){padding-top:8px}

.hh-v3b .hh-period-body{padding:14px 16px}
.hh-board[hidden]{display:none!important}
.hh-period-body .hh-empty{color:#9a948e;font-size:13px;padding:12px 0;text-align:center}

/* Top 1~3 领奖台（无框套框，加柔和底色与底部浅分隔线） */
.hh-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding-bottom:12px;margin-bottom:6px;border-bottom:1px solid #efe7dc;min-width:0;max-width:100%}
.hh-pcard{position:relative;display:flex;gap:10px;padding:9px 10px;border:0;border-radius:10px;background:#f7f1e6;color:#2b2622;text-decoration:none!important;min-width:0;transition:background .15s}
.hh-pcard:hover{background:#f0e6d5}
.hh-pcard.hh-r1{border:0;background:#f7f1e6}
.hh-pcard.hh-r1:hover{background:#f0e6d5}
.hh-pbadge{position:absolute;top:8px;right:9px;padding:1px 6px;border-radius:4px;font-size:10.5px;font-weight:700;line-height:1.35}
.hh-rk-1{background:#ffedd5;color:#b45309}
.hh-rk-2{background:#f1f5f9;color:#64748b}
.hh-rk-3{background:#fef3c7;color:#d97706}
.hh-pcv{flex:none;width:48px;height:64px;border-radius:5px;overflow:hidden;background:#f1ede8;box-shadow:0 2px 6px rgba(60,40,20,.15)}
.hh-pcv img{width:100%;height:100%;object-fit:cover;display:block}
.hh-pinfo{flex:1;min-width:0;display:flex;flex-direction:column}
.hh-pinfo b{display:block;font-size:13.5px;color:#2b2622;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:42px;line-height:1.35}
.hh-pcard:hover .hh-pinfo b{color:#0f766e}
.hh-pau{display:block;font-size:11.5px;color:#8a837a;margin:2px 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hh-ptags{display:flex;gap:4px;margin-bottom:4px;overflow:hidden;height:16px}
.hh-ptags span{flex:none;font-size:10.5px;padding:0 6px;border-radius:4px;background:#f6efe4;color:#9a6a26;line-height:16px}
.hh-phook{font-size:11.5px;color:#52483e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 4~50 双列紧凑榜 */
.hh-rest-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px;min-width:0;max-width:100%}
.hh-rest-grid li{display:flex;align-items:center;gap:7px;padding:6px 0;border-top:1px dashed #eadfcd;min-width:0}
.hh-rest-grid li.hh-rest-more{justify-content:center}
.hh-more-inline{flex:0 1 auto;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;color:#0f766e;font-size:12.5px;font-weight:600;text-decoration:none;border-radius:6px;padding:2px 8px}
.hh-more-inline:hover{background:#eef8f6}
.hh-rk{flex:none;width:22px;height:18px;border-radius:5px;background:#faf3e8;color:#8a837a;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums}
.hh-rest-grid .cat{flex:none;font-size:11px;line-height:1;padding:3px 7px;border-radius:999px;border:1px solid #e5dfd2;background:#f4f2ec;color:#7a7267}
.hh-rest-grid a{flex:1;min-width:0;color:#2b2622;text-decoration:none;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hh-rest-grid a:hover{color:#0f766e}
.hh-rest-grid .author{flex:none;font-size:12px;color:#8a837a;max-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.hh-rest-grid .cat.lu-c-blue{background:#f3f5f8;border-color:#e2e7ef;color:#64748b}
.hh-rest-grid .cat.lu-c-coral{background:#f8f3ef;border-color:#eaded5;color:#8d6e5d}
.hh-rest-grid .cat.lu-c-violet{background:#f5f3f8;border-color:#e5dff0;color:#7c6d8e}
.hh-rest-grid .cat.lu-c-rose{background:#f8f2f5;border-color:#ebd9e2;color:#8e677a}
.hh-rest-grid .cat.lu-c-teal{background:#f1f6f5;border-color:#dbe8e5;color:#5b7d78}
.hh-rest-grid .cat.lu-c-amber{background:#f7f4ec;border-color:#e8e0cf;color:#847458}

/* 底部栏 */
.hh-bfoot{margin-top:10px;padding-top:9px;border-top:1px solid #eadfcd;display:flex;align-items:center;justify-content:flex-end;font-size:12px}
.hh-more-link{color:#8a837a;text-decoration:none}
.hh-more-link:hover{color:#0f766e}

/* 夜间模式 */
html[data-theme="dark"] .hh-v3b .hh-head{border-bottom-color:#2f353b}
html[data-theme="dark"] .hh-cat-tabs button{background:#23272c;border-color:#3a3f46;color:#c2c8d0}
html[data-theme="dark"] .hh-cat-tabs button:hover{border-color:#4fd1b5;color:#4fd1b5}
html[data-theme="dark"] .hh-cat-tabs button.on{border-color:#2f8f7e;background:#2f8f7e;color:#fff}
html[data-theme="dark"] .hh-period-tabs{background:#181a1f;border-color:#33383f}
html[data-theme="dark"] .hh-period-tabs button{color:#9ca3af}
html[data-theme="dark"] .hh-period-tabs button.on{background:#24282e;color:#e2e5e9}
html[data-theme="dark"] .hh-period-panel .hh-period-note{color:#9ca3af}
html[data-theme="dark"] .hh-period-message{color:#e8907a}

html[data-theme="dark"] .hh-podium{border-bottom-color:#2f353b}
html[data-theme="dark"] .hh-pcard,
html[data-theme="dark"] .hh-pcard.hh-r1{background:#252930;border:0;color:#d4d2cc}
html[data-theme="dark"] .hh-pcard:hover,
html[data-theme="dark"] .hh-pcard.hh-r1:hover{background:#2c313a}
html[data-theme="dark"] .hh-rk-1{background:rgba(234,88,12,.2);color:#fb923c}
html[data-theme="dark"] .hh-rk-2{background:rgba(148,163,184,.18);color:#cbd5e1}
html[data-theme="dark"] .hh-rk-3{background:rgba(245,158,11,.2);color:#fbbf24}
html[data-theme="dark"] .hh-pcv{background:#2a2d33;box-shadow:none}
html[data-theme="dark"] .hh-pinfo b{color:#e2e5e9}
html[data-theme="dark"] .hh-pcard:hover .hh-pinfo b{color:#4fd1b5}
html[data-theme="dark"] .hh-pau,
html[data-theme="dark"] .hh-rest-grid .author,
html[data-theme="dark"] .hh-more-link{color:#9ca3af}
html[data-theme="dark"] .hh-ptags span{background:#2c2820;color:#e2b866}
html[data-theme="dark"] .hh-phook{color:#c2c8d0}

html[data-theme="dark"] .hh-rest-grid li{border-top-color:#2f353b}
html[data-theme="dark"] .hh-more-inline{color:#4fd1b5}
html[data-theme="dark"] .hh-more-inline:hover{background:rgba(79,209,181,.12)}
html[data-theme="dark"] .hh-rk{background:#262a30;color:#9ca3af}
html[data-theme="dark"] .hh-rest-grid a{color:#d4d2cc}
html[data-theme="dark"] .hh-rest-grid a:hover,
html[data-theme="dark"] .hh-more-link:hover{color:#4fd1b5}
html[data-theme="dark"] .hh-rest-grid .cat{background:rgba(156,163,175,.1);border-color:rgba(156,163,175,.2);color:#9ca3af}
html[data-theme="dark"] .hh-rest-grid .cat.lu-c-blue{background:rgba(59,130,246,.09);border-color:rgba(59,130,246,.18);color:#8d9cb0}
html[data-theme="dark"] .hh-rest-grid .cat.lu-c-coral{background:rgba(234,88,12,.09);border-color:rgba(234,88,12,.18);color:#b3927e}
html[data-theme="dark"] .hh-rest-grid .cat.lu-c-violet{background:rgba(168,85,247,.09);border-color:rgba(168,85,247,.18);color:#a194b8}
html[data-theme="dark"] .hh-rest-grid .cat.lu-c-rose{background:rgba(236,72,153,.09);border-color:rgba(236,72,153,.18);color:#b38d9f}
html[data-theme="dark"] .hh-rest-grid .cat.lu-c-teal{background:rgba(45,212,191,.09);border-color:rgba(45,212,191,.18);color:#7ea8a2}
html[data-theme="dark"] .hh-rest-grid .cat.lu-c-amber{background:rgba(245,158,11,.09);border-color:rgba(245,158,11,.18);color:#aa9a7b}

html[data-theme="dark"] .hh-bfoot{border-top-color:#2f353b}

/* 窄屏适配 */
@media (max-width:900px){
  .hh-podium{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:760px){
  .hh-v3b .hh-head{padding:10px 12px}
  .hh-v3b .hh-head-r{margin-left:0}
  .hh-rest-grid{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:680px){
  .hh-v3b .hh-head-l{width:100%}
  .hh-v3b .hh-head-r{gap:6px}
  .hh-cat-tabs{width:100%;min-width:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;max-width:100%}
  .hh-cat-tabs::-webkit-scrollbar{display:none}
}
