/*
 * 800BUS / PTFA DRAW —— 摄影社区风格共用主题
 * 使用方式：<body class="hm-page ..."> + 内容外层包 <div class="hm">
 *   1) body.hm-page 提供全部 Design Token（亮/暗）与页面底色
 *   2) .hm 提供内容区底色、组件作用域与遗留区块的统一化
 *   3) 组件类一律 hm- 前缀，避免与 dark-theme.css 的 !important 旧规则冲突
 * 引入位置：必须放在 system/dark-theme.css 之后
 */

/* ══════════════════════════════════════════════════════════
   摄影社区风格 UI —— PC / 移动端共用同一套结构与组件
   令牌作用域：亮色在 body.hm-page，暗色在 html[data-theme="dark"] body.hm-page
   （特异性高于 dark-theme.css 的 [data-theme="dark"] body，可压掉其 !important），
   两套主题共用同一 DOM 与组件，仅切换变量值。
   新组件一律使用 hm- 前缀，避开 dark-theme.css 中的 !important 旧规则。
   ══════════════════════════════════════════════════════════ */
/* 令牌挂在 body.hm-page 上，使 .hm 之外的固定导航等元素也能取到同一套变量 */
body.hm-page{
    --bg-primary:#f7f7f5;
    --bg-secondary:#f0f0ed;
    --bg-card:#ffffff;
    --bg-elevate:#ffffff;
    --text-primary:#0b0b0c;
    --text-secondary:#5b5f66;
    --text-muted:#8b9099;
    --border-color:#e7e7e3;
    --accent-color:#0e7bb8;
    --accent-soft:rgba(14,123,184,.10);
    --accent-ink:#ffffff;
    --nav-background:rgba(247,247,245,.86);
    --shadow-card:0 1px 2px rgba(0,0,0,.05);
    --r-card:16px;
    --r-pill:999px;
    /* 旧变量桥接：站内多数页面的自有 <style> 与 system/dark-theme.css 都使用
       --ink/--ink-soft/--muted/--surface/--line/--accent 这一组旧变量名。
       把它们在 body 上重新指向新令牌，旧组件无需改标记即可换成新配色；
       写在 body 上可同时压过 html 上的 :root{...} 与 html[data-theme="dark"]{...}。 */
    --ink:var(--text-primary);
    --ink-soft:var(--text-secondary);
    --muted:var(--text-secondary);
    --mute:var(--text-muted);
    --line:var(--border-color);
    --line-strong:var(--border-color);
    --surface:var(--bg-card);
    --surface-2:var(--bg-secondary);
    --surface-3:var(--bg-elevate);
    --accent:var(--accent-color);
    --accent-hover:var(--accent-color);
    --gold:var(--accent-color);
    --bg:var(--bg-primary);
    --bg-deep:var(--bg-primary);
    /* 后台/通用命名兼容组 */
    --primary:var(--accent-color);
    --primary-light:var(--accent-color);
    --primary-dark:var(--accent-color);
    --card:var(--bg-card);
    --text:var(--text-primary);
    --border:var(--border-color);
    background-color:#f7f7f5;
    background-image:none;
    color:var(--text-primary);
}
/* 暗色：dark-theme.css 的 [data-theme="dark"] body 带 !important，
   必须同名 !important 且更高特异性才能压掉，否则顶部会露出 #0f0f0f 黑条 */
html[data-theme="dark"] body.hm-page{
    --bg-primary:#06121f;
    --bg-secondary:#0a1826;
    --bg-card:#0d1b2a;
    --bg-elevate:#122437;
    --text-primary:#ffffff;
    --text-secondary:#8fa6bf;
    --text-muted:#6b809a;
    --border-color:rgba(255,255,255,.10);
    --accent-color:#2fa8ff;
    --accent-soft:rgba(47,168,255,.14);
    --accent-ink:#04121e;
    --nav-background:rgba(6,18,31,.86);
    --shadow-card:0 1px 2px rgba(0,0,0,.4);
    background-color:#06121f !important;
    background-image:none !important;
}
/* 固定导航（.nav 在 .hm 之外）跟随新版主题 */
body.hm-page .nav{
    background:var(--nav-background);
    border-color:var(--border-color);
    box-shadow:0 4px 24px rgba(0,0,0,.08),0 1px 3px rgba(0,0,0,.04);
}
html[data-theme="dark"] body.hm-page .nav{
    background:rgba(6,18,31,.86) !important;
    border-color:rgba(255,255,255,.10) !important;
    box-shadow:0 4px 24px rgba(0,0,0,.35) !important;
}
/* 页头 Logo：dark-theme.css 在暗色下给 .logo-bus 套橙底 + 发光，
   与新主题（深蓝 + 青蓝强调色、无发光）冲突，此处按新主题拉平 */
html[data-theme="dark"] .hm h1 .logo-800{
    color:var(--text-primary) !important;
}
html[data-theme="dark"] .hm h1 .logo-bus{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    -webkit-text-fill-color:var(--accent-ink) !important;
    box-shadow:none !important;
}
/* 遗留区块与新版区块对齐：.content-section 原本没有 max-width，
   在宽屏上会顶到屏幕两侧，而新版区块在 .container(1200px) 内 */
.hm .content-section{
    max-width:1200px;
    margin-left:auto;
    margin-right:auto;
}
.hm{
    background:var(--bg-primary);
    color:var(--text-primary);
    min-height:100vh;
}

/* ── 编辑式页头 ── */
/* 首页已去掉大标题与页内搜索框（搜索框移入顶部导航栏），
   因此首屏只留标签云与公告，收紧顶部留白 */
.hm-hero{background:transparent;padding:12px 0 6px;text-align:left}
@media(max-width:768px){.hm-hero{padding:8px 0 2px}}
.hm-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.hm-tags a{
    font-size:11.5px;color:var(--text-secondary);text-decoration:none;
    border:1px solid var(--border-color);border-radius:var(--r-pill);
    padding:4px 10px;transition:color .18s,border-color .18s,background .18s;
}
.hm-tags a:hover{color:var(--accent-color);border-color:var(--accent-color);background:var(--accent-soft)}
.hm-notice{margin-top:14px}
.hm-notice details{
    border:1px solid var(--border-color);border-left:3px solid var(--accent-color);
    border-radius:10px;background:var(--bg-card);padding:10px 14px;
}
.hm-notice details[open]{padding-bottom:12px}
.hm-notice summary{
    cursor:pointer;font-size:12.5px;font-weight:700;color:var(--accent-color);
    list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.hm-notice summary::-webkit-details-marker{display:none}
.hm-notice summary a{color:var(--text-muted);font-weight:600}
.hm-notice .hm-notice-body{
    margin-top:8px;font-size:12.5px;line-height:1.7;color:var(--text-secondary);
}
.hm-notice.is-banned details{border-left-color:#e05252}
.hm-notice.is-banned summary{color:#e05252}

/* ── 区块标题（英文小标签 + 中文标题） ── */
.hm-sec{margin:36px 0}
@media(max-width:768px){.hm-sec{margin:26px 0}}
/* index.php 中「最新资讯 / 管理员审核榜 / 月贡献者排行」等区块直接挂在 .hm 下，
   没有 .container 包裹，宽屏下会顶到屏幕两侧（内容贴边）。这里给这类区块
   套上与 .container 一致的栅格：1200px 居中 + 32px 内边距，小屏 20px。
   只作用于 .hm 的直接子元素，避免与已在 .container 内的区块重复留白。 */
.hm > .hm-sec{
    max-width:1200px;
    margin-left:auto;
    margin-right:auto;
    padding-left:32px;
    padding-right:32px;
}
@media(max-width:768px){
    .hm > .hm-sec{padding-left:20px;padding-right:20px}
}
.hm-sec-head{
    display:flex;align-items:flex-end;justify-content:space-between;
    gap:12px;margin-bottom:14px;
}
.hm-sec-label{
    display:block;font-size:10.5px;font-weight:700;letter-spacing:.16em;
    text-transform:uppercase;color:var(--text-muted);margin-bottom:4px;
}
.hm-sec-title{
    margin:0;font-size:21px;font-weight:800;letter-spacing:-.015em;
    color:var(--text-primary);line-height:1.2;
}
@media(max-width:768px){.hm-sec-title{font-size:18px}}
.hm-sec-more{
    font-size:12.5px;font-weight:600;color:var(--accent-color);
    text-decoration:none;white-space:nowrap;padding-bottom:2px;
}
.hm-sec-more:hover{opacity:.75}

/* ── Featured 推荐 ── */
.hm-feat{display:grid;grid-template-columns:1.55fr 1fr;gap:14px}
@media(max-width:900px){.hm-feat{grid-template-columns:1fr}}
.hm-feat-main{
    position:relative;display:block;overflow:hidden;
    border-radius:var(--r-card);background:var(--bg-secondary);
    aspect-ratio:16/9;box-shadow:var(--shadow-card);
}
.hm-feat-main img{width:100%;height:100%;object-fit:cover;display:block}
.hm-feat-overlay{
    position:absolute;left:0;right:0;bottom:0;padding:16px 18px 14px;
    background:linear-gradient(to top,rgba(6,10,16,.86),rgba(6,10,16,.45) 52%,rgba(6,10,16,0));
    color:#fff;
}
.hm-feat-tag{
    display:inline-block;font-size:10.5px;font-weight:700;letter-spacing:.06em;
    background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28);
    color:#fff;padding:3px 9px;border-radius:var(--r-pill);margin-bottom:8px;
    backdrop-filter:blur(4px);
}
.hm-feat-title{
    margin:0;font-size:19px;font-weight:800;line-height:1.25;
    color:#fff;text-shadow:0 1px 12px rgba(0,0,0,.35);
    display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;
}
.hm-feat-meta{
    margin-top:6px;font-size:12px;color:rgba(255,255,255,.82);
    display:flex;align-items:center;gap:10px;flex-wrap:wrap;
}
.hm-feat-meta b{font-weight:600}
@media(max-width:768px){
    .hm-feat-main{aspect-ratio:4/3}
    .hm-feat-title{font-size:16px}
}
.hm-feat-side{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:900px){
    .hm-feat-side{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:600px){
    .hm-feat-side{grid-template-columns:repeat(2,1fr);gap:8px}
}
.hm-feat-mini{
    position:relative;display:block;overflow:hidden;border-radius:12px;
    background:var(--bg-secondary);aspect-ratio:1/1;
}
.hm-feat-mini img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.hm-feat-mini:hover img{transform:scale(1.04)}
.hm-feat-mini span{
    position:absolute;left:8px;bottom:8px;font-size:11px;font-weight:600;color:#fff;
    text-shadow:0 1px 8px rgba(0,0,0,.6);
}
/* PC（>900px）左右两栏底部严格齐平 —— 高度单向流动，不靠比例近似：
   ① 大图宽度由 flex 系数 1.55:1 决定，aspect-ratio:16/9 推出高度，是唯一高度来源；
   ② .hm-feat-side 在 flex 行内被 align-items:stretch（默认）拉到与大图同高；
   ③ side 内部为 2×2 grid（田字型），两列两行 1fr 严格平分，间距 10px；
   ④ 小图必须去掉 aspect-ratio —— 元素一旦有 aspect-ratio，浏览器会拒绝
      stretch 拉伸（前几次改不准的根因）；img 绝对定位铺满，object-fit:cover 缩放。
   高度链：大图比例 → 行高 → side → 四个小格，无循环依赖、无像素误差。 */
@media(min-width:901px){
    .hm-feat{display:flex}
    .hm-feat-main{flex:1.55 1 0;min-width:0}
    .hm-feat-main:only-child{flex:1 1 0}
    .hm-feat-side{
        flex:1 1 0;min-width:0;
        display:grid;
        grid-template-columns:1fr 1fr;
        grid-template-rows:1fr 1fr;
        gap:10px;
    }
    .hm-feat-mini{min-width:0;min-height:0;aspect-ratio:auto}
    .hm-feat-mini img{position:absolute;inset:0}
}

/* ── 用户入口卡 ── */
.hm-user{
    display:flex;align-items:center;gap:13px;text-decoration:none;
    background:var(--bg-card);border:1px solid var(--border-color);
    border-radius:var(--r-card);padding:14px 16px;box-shadow:var(--shadow-card);
    transition:border-color .18s,transform .18s;
}
.hm-user:hover{border-color:var(--accent-color);transform:translateY(-2px)}
.hm-user:active{transform:scale(.995)}
.hm-user-avatar{
    flex:0 0 auto;width:42px;height:42px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    background:var(--accent-soft);color:var(--accent-color);
    font-size:17px;font-weight:800;overflow:hidden;
}
.hm-user-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.hm-user-text{flex:1;min-width:0}
.hm-user-text b{
    display:block;font-size:14px;font-weight:700;color:var(--text-primary);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hm-user-text span{display:block;font-size:12px;color:var(--text-muted);margin-top:2px}
.hm-user-badge{
    flex:0 0 auto;font-size:11px;font-weight:700;color:var(--accent-color);
    background:var(--accent-soft);border-radius:var(--r-pill);padding:3px 8px;
}
.hm-arrow{flex:0 0 auto;color:var(--text-muted);font-size:19px;line-height:1}

/* ── 横向滚动卡片（热门） ── */
.hm-rail{
    display:grid;grid-template-columns:repeat(4,1fr);gap:16px;
}
@media(max-width:900px){
    .hm-rail{
        display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;
        padding-bottom:6px;-webkit-overflow-scrolling:touch;
        scrollbar-width:none;
    }
    .hm-rail::-webkit-scrollbar{display:none}
}
.hm-rail-card{
    position:relative;display:block;overflow:hidden;text-decoration:none;
    border-radius:var(--r-card);background:var(--bg-card);
    border:1px solid var(--border-color);box-shadow:var(--shadow-card);
    transition:transform .2s,border-color .2s;
}
.hm-rail-card:hover{transform:translateY(-3px);border-color:var(--accent-color)}
.hm-rail-card:active{transform:scale(.99)}
@media(max-width:900px){
    .hm-rail-card{flex:0 0 62vw;max-width:280px;scroll-snap-align:start}
}
.hm-rail-thumb{position:relative;aspect-ratio:4/3;background:var(--bg-secondary);overflow:hidden}
.hm-rail-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.hm-rail-card:hover .hm-rail-thumb img{transform:scale(1.04)}
.hm-rail-cap{padding:10px 12px 12px}
.hm-rail-name{
    font-size:13.5px;font-weight:700;color:var(--text-primary);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hm-rail-meta{
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    margin-top:5px;font-size:11.5px;color:var(--text-muted);
}
.hm-rail-like{display:inline-flex;align-items:center;gap:4px;color:var(--text-secondary);font-weight:600}
.hm-rail-like svg{width:12px;height:12px;fill:#e0527a}

/* ── 分类胶囊 ── */
.hm-pills{
    display:flex;gap:8px;flex-wrap:wrap;margin:2px 0 16px;
}
@media(max-width:768px){
    .hm-pills{
        flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
        padding-bottom:4px;-webkit-overflow-scrolling:touch;
    }
    .hm-pills::-webkit-scrollbar{display:none}
}
.hm-pill{
    flex:0 0 auto;font-size:12.5px;font-weight:600;text-decoration:none;
    color:var(--text-secondary);background:var(--bg-card);
    border:1px solid var(--border-color);border-radius:var(--r-pill);
    padding:7px 15px;transition:color .18s,background .18s,border-color .18s;
}
.hm-pill:hover{color:var(--accent-color);border-color:var(--accent-color)}
.hm-pill.is-on{
    background:var(--accent-color);border-color:var(--accent-color);
    color:var(--accent-ink);font-weight:700;
}

/* ── 图片网格 ── */
.hm-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media(max-width:1024px){.hm-grid{grid-template-columns:repeat(3,1fr);gap:12px}}
@media(max-width:768px){.hm-grid{grid-template-columns:repeat(2,1fr);gap:10px}}
/* 分区无刷新切换：网格容器淡出 → 替换 → 淡入（200ms，遵循减弱动效偏好） */
#hm-latest-body{transition:opacity .2s ease,transform .2s ease}
#hm-latest-body.is-switching{opacity:0;transform:translateY(8px)}
@media(prefers-reduced-motion:reduce){
    #hm-latest-body{transition:none}
    #hm-latest-body.is-switching{transform:none}
}
/* 请求进行中暂时锁住分区按钮，避免连点造成竞态 */
.hm-pills.is-loading{opacity:.55;pointer-events:none}
.hm-tile{
    position:relative;display:block;overflow:hidden;text-decoration:none;
    border-radius:var(--r-card);background:var(--bg-secondary);
    box-shadow:var(--shadow-card);
}
.hm-tile img{
    width:100%;aspect-ratio:4/3;object-fit:cover;display:block;
    transition:transform .3s;
}
@media(max-width:900px){.hm-tile img{aspect-ratio:1/1}}
.hm-tile:hover img{transform:scale(1.04)}
.hm-tile-cap{
    position:absolute;left:0;right:0;bottom:0;padding:22px 11px 9px;
    background:linear-gradient(to top,rgba(6,10,16,.82),rgba(6,10,16,0));
    color:#fff;
}
.hm-tile-name{
    font-size:12.5px;font-weight:700;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hm-tile-meta{
    margin-top:3px;font-size:11px;color:rgba(255,255,255,.78);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hm-tile-state{
    position:absolute;top:8px;left:8px;font-size:10.5px;font-weight:700;
    background:var(--accent-color);color:var(--accent-ink);
    padding:3px 8px;border-radius:var(--r-pill);
}

/* ── 图片淡入（懒加载完成） ── */
.hm img.lazy-img{opacity:1;transition:opacity .25s ease}
.hm img.lazy-img.is-loading{opacity:.72}
.hm img.lazy-img.loaded{opacity:1}

/* ── 旧区块（数据卡/资讯/排行）在新主题下的中性化 ── */
.hm .stats-card{
    background:var(--bg-card);border:1px solid var(--border-color);
    border-radius:var(--r-card);box-shadow:var(--shadow-card);
    color:var(--text-primary);
}
.hm .donate-banner{
    background:var(--bg-card);border:1px solid var(--border-color);
    border-radius:var(--r-card);color:var(--text-secondary);
}
.hm .rank-card{
    background:var(--bg-card);border:1px solid var(--border-color);
    border-radius:14px;color:var(--text-primary);
}
.hm .rank-card:hover{border-color:var(--accent-color)}
.hm .hm-plain-card{
    background:var(--bg-card);border:1px solid var(--border-color);
    border-radius:var(--r-card);padding:12px 16px;
    display:flex;justify-content:space-between;align-items:center;
    color:var(--text-primary);
}
.hm .hm-news-card{
    display:block;text-decoration:none;color:inherit;
    background:var(--bg-card);border:1px solid var(--border-color);
    border-radius:14px;overflow:hidden;
    transition:border-color .18s,transform .18s;
    flex:1 1 300px;max-width:400px;
}
.hm .hm-news-card:hover{border-color:var(--accent-color);transform:translateY(-2px)}
.hm .hm-news-cover{position:relative;height:180px;overflow:hidden;background:var(--bg-secondary)}
.hm .hm-news-cover img{width:100%;height:100%;object-fit:cover;display:block}
.hm .hm-news-body{padding:16px 18px 18px}
.hm .hm-news-title{
    margin:0 0 8px;font-size:15.5px;font-weight:700;line-height:1.4;
    color:var(--text-primary);
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.hm .hm-news-desc{
    margin:0;font-size:12.5px;line-height:1.65;color:var(--text-secondary);
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.hm .hm-news-foot{
    margin-top:12px;padding-top:12px;border-top:1px solid var(--border-color);
    display:flex;justify-content:space-between;align-items:center;
    font-size:11.5px;color:var(--text-muted);
}
.hm .hm-news-grid{
    display:flex;flex-wrap:wrap;gap:20px;justify-content:center;
}
/* 手机端资讯一行两个：卡片改为等宽两列，同步收紧封面高度与内边距 */
@media(max-width:768px){
    .hm .hm-news-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
    .hm .hm-news-card{flex:none;max-width:none;border-radius:12px}
    .hm .hm-news-cover{height:104px}
    .hm .hm-news-body{padding:10px 11px 12px}
    .hm .hm-news-title{font-size:13px;line-height:1.35;margin-bottom:6px}
    .hm .hm-news-desc{font-size:11.5px;line-height:1.5;-webkit-line-clamp:2}
    .hm .hm-news-foot{
        margin-top:8px;padding-top:8px;font-size:10.5px;gap:6px;
    }
    /* 地区名过长时截断，避免与日期挤在一起 */
    .hm .hm-news-foot span:first-child{
        min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    }
}
.hm .hm-chip{
    font-size:10.5px;font-weight:700;padding:3px 8px;border-radius:var(--r-pill);
    background:var(--accent-soft);color:var(--accent-color);
}
.hm .hm-list-row{
    display:flex;justify-content:space-between;align-items:center;
    padding:8px 12px;background:var(--bg-secondary);border-radius:10px;margin-bottom:6px;
    color:var(--text-secondary);
}

/* ── 空状态 ── */
.hm-empty{
    padding:40px 0;text-align:center;color:var(--text-muted);font-size:13px;
}

/* ── 用户入口区块间距（比常规区块紧凑） ── */
.hm-sec--tight{margin:18px 0}
.hm-notice-extra a{color:var(--text-muted);font-weight:600;text-decoration:none}
.hm-notice-extra a:hover{color:var(--accent-color)}

/* ══════════════════════════════════════════════════════════
   暗色覆盖：dark-theme.css 对旧类名（.hero / .stats-card /
   .donate-banner / .rank-card）使用 !important 的硬编码黑橙配色，
   此处用更高特异性 html[data-theme="dark"] .hm … 拉回新主题。
   ══════════════════════════════════════════════════════════ */
html[data-theme="dark"] .hm .hero{
    background:transparent !important;
    border-bottom:0 !important;
    padding:30px 0 6px !important;
}
html[data-theme="dark"] .hm .hero h1{
    color:var(--text-primary) !important;
    text-shadow:none !important;
}
html[data-theme="dark"] .hm .hero .hm-sub,
html[data-theme="dark"] .hm .hero .subtitle{
    color:var(--text-secondary) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    font-size:13.5px !important;
    font-weight:400 !important;
}
@media(max-width:768px){
    html[data-theme="dark"] .hm .hero{padding:20px 0 2px !important}
}
html[data-theme="dark"] .hm .stats-card{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-card) !important;
    box-shadow:var(--shadow-card) !important;
}
html[data-theme="dark"] .hm .stat-value{
    color:var(--text-primary) !important;
    text-shadow:none !important;
}
html[data-theme="dark"] .hm .stat-item.blue .stat-value{color:#5aa9e6 !important}
html[data-theme="dark"] .hm .stat-item.green .stat-value{color:#5fd08a !important}
html[data-theme="dark"] .hm .stat-item.orange .stat-value{color:#e6b45a !important}
html[data-theme="dark"] .hm .stat-item.teal .stat-value{color:#4fd1c5 !important}
html[data-theme="dark"] .hm .stat-label{color:var(--text-muted) !important}
html[data-theme="dark"] .hm .stat-item + .stat-item::before{background:var(--border-color) !important}
html[data-theme="dark"] .hm .rank-card{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-radius:14px !important;
}
html[data-theme="dark"] .hm .rank-card:hover{
    background:var(--bg-elevate) !important;
    border-color:var(--accent-color) !important;
}
html[data-theme="dark"] .hm .rank-card:nth-child(1),
html[data-theme="dark"] .hm .rank-card:nth-child(2),
html[data-theme="dark"] .hm .rank-card:nth-child(3){
    background:var(--bg-card) !important;
    border-left:1px solid var(--border-color) !important;
}
html[data-theme="dark"] .hm .rank-num{color:var(--text-muted) !important}
html[data-theme="dark"] .hm .rank-card:nth-child(1) .rank-num{color:#e6b45a !important}
html[data-theme="dark"] .hm .rank-card:nth-child(2) .rank-num{color:#c9d2dc !important}
html[data-theme="dark"] .hm .rank-card:nth-child(3) .rank-num{color:#cd8f5a !important}
html[data-theme="dark"] .hm .rank-info b{color:var(--text-primary) !important}
html[data-theme="dark"] .hm .rank-info span{color:var(--text-muted) !important}
html[data-theme="dark"] .hm .donate-banner{
    background:var(--bg-card) !important;
    color:var(--text-secondary) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-card) !important;
    padding:18px 22px !important;
    font-weight:400 !important;
}
html[data-theme="dark"] .hm .donate-banner a{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    border-radius:var(--r-pill) !important;
    font-weight:700 !important;
}
html[data-theme="dark"] .hm .donate-banner a:hover{
    background:var(--accent-color) !important;
    opacity:.88;
    box-shadow:none !important;
}
html[data-theme="dark"] .hm .pending-banner{
    border-radius:var(--r-card) !important;
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
}

/* ══════════════════════════════════════════════════════════
   暗色：中和 dark-theme.css 对「旧组件」的硬编码黑/橙 !important。
   选择器为 html[data-theme="dark"] .hm …（特异性 0,3,1 > 0,2,0），
   只在已适配页面（body 带 .hm）生效，后台页面不受影响。
   dark-theme.css 中基于 var(--ink|--surface|--line|--accent) 的规则
   已由 body.hm-page 的变量桥接自动换成新配色，这里只处理字面量颜色。
   ══════════════════════════════════════════════════════════ */

/* 区块标题 / 「更多」按钮 */
html[data-theme="dark"] .hm .section-title{
    color:var(--text-primary) !important;
    text-transform:none !important;
    letter-spacing:-.015em !important;
    font-size:20px !important;
    font-weight:800 !important;
    padding-left:0 !important;
    border-left:0 !important;
    line-height:1.25 !important;
}
html[data-theme="dark"] .hm .section-link{
    background:var(--bg-card) !important;
    color:var(--accent-color) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-pill) !important;
    font-size:12px !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    padding:5px 13px !important;
}
html[data-theme="dark"] .hm .section-link:hover{
    color:var(--accent-color) !important;
    border-color:var(--accent-color) !important;
    background:var(--accent-soft) !important;
}

/* 搜索框 */
html[data-theme="dark"] .hm .search-bar{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-pill) !important;
}
html[data-theme="dark"] .hm .search-bar input::placeholder{
    color:var(--text-muted) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .search-bar button{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    border-radius:var(--r-pill) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .search-bar button:hover{
    background:var(--accent-color) !important;
    opacity:.88;
    box-shadow:none !important;
}

/* 分类导航 / 标签云（胶囊化） */
html[data-theme="dark"] .hm .section-nav a{
    background:var(--bg-card) !important;
    color:var(--text-secondary) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-pill) !important;
    font-size:12.5px !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    padding:7px 15px !important;
}
html[data-theme="dark"] .hm .section-nav a:hover{
    border-color:var(--accent-color) !important;
    color:var(--accent-color) !important;
    background:var(--bg-card) !important;
}
html[data-theme="dark"] .hm .section-nav a.active{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    border-color:var(--accent-color) !important;
    box-shadow:none !important;
}
html[data-theme="dark"] .hm .tags-cloud a{
    color:var(--text-secondary) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-pill) !important;
    padding:4px 11px !important;
    text-transform:none !important;
}
html[data-theme="dark"] .hm .tags-cloud a:hover{
    background:var(--accent-soft) !important;
    color:var(--accent-color) !important;
    border-color:var(--accent-color) !important;
}

/* 公告条 */
html[data-theme="dark"] .hm .notice-bar > details{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-left:3px solid var(--accent-color) !important;
    border-radius:10px !important;
}
html[data-theme="dark"] .hm .notice-bar .notice-content{
    color:var(--text-secondary) !important;
}

/* 图片卡片网格（gallery / region / browse / archive / favorites） */
html[data-theme="dark"] .hm .photo-grid,
html[data-theme="dark"] .hm .archive-grid,
html[data-theme="dark"] .hm .fav-grid{gap:12px !important}
html[data-theme="dark"] .hm .photo-card,
html[data-theme="dark"] .hm .photo-grid .photo-card,
html[data-theme="dark"] .hm .archive-grid .photo-card,
html[data-theme="dark"] .hm .fav-grid .photo-card{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-card) !important;
}
html[data-theme="dark"] .hm .photo-card:hover{
    border-color:var(--accent-color) !important;
    box-shadow:var(--shadow-card) !important;
    transform:translateY(-3px);
}
html[data-theme="dark"] .hm .photo-card .photo-img{background:var(--bg-secondary) !important}
html[data-theme="dark"] .hm .photo-card .photo-info{
    background:transparent !important;
    border-top:0 !important;
    padding:10px 12px 12px !important;
}
html[data-theme="dark"] .hm .photo-card .photo-brand{
    color:var(--text-primary) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .photo-card .photo-meta{
    color:var(--text-muted) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    font-size:11.5px !important;
}
html[data-theme="dark"] .hm .photo-card .photo-meta::before{content:none !important}

/* 精选横滚 / 探索卡 / 资讯卡 */
html[data-theme="dark"] .hm .featured-item{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-card) !important;
}
html[data-theme="dark"] .hm .featured-item:hover{
    border-color:var(--accent-color) !important;
    box-shadow:var(--shadow-card) !important;
}
html[data-theme="dark"] .hm .featured-item .featured-badge{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    font-size:10.5px !important;
    border-radius:var(--r-pill) !important;
}
html[data-theme="dark"] .hm .explore-card{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    color:var(--text-primary) !important;
    border-radius:var(--r-card) !important;
}
html[data-theme="dark"] .hm .explore-card::before{content:none !important}
html[data-theme="dark"] .hm .explore-card:hover{
    border-color:var(--accent-color) !important;
    box-shadow:var(--shadow-card) !important;
    transform:translateY(-2px);
}
html[data-theme="dark"] .hm .explore-card .ec-icon{
    background:var(--accent-soft) !important;
    border-color:transparent !important;
    color:var(--accent-color) !important;
}
html[data-theme="dark"] .hm .explore-card .ec-text h3{
    color:var(--text-primary) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .explore-card .ec-text p{color:var(--text-secondary) !important}
html[data-theme="dark"] .hm .explore-card .ec-arrow{color:var(--accent-color) !important}
html[data-theme="dark"] .hm .news-card{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-radius:14px !important;
}
html[data-theme="dark"] .hm .news-card:hover{
    border-color:var(--accent-color) !important;
    box-shadow:var(--shadow-card) !important;
}
html[data-theme="dark"] .hm .news-card .news-title{color:var(--text-primary) !important}
html[data-theme="dark"] .hm .news-card .news-meta,
html[data-theme="dark"] .hm .news-card .news-content{color:var(--text-secondary) !important}

/* 后台入口格 / 轮播 */
html[data-theme="dark"] .hm .admin-grid > div{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    border-left:3px solid var(--accent-color) !important;
    color:var(--text-primary) !important;
    border-radius:12px !important;
}
html[data-theme="dark"] .hm .admin-grid > div:hover{
    background:var(--bg-elevate) !important;
    border-color:var(--accent-color) !important;
    border-left-color:var(--accent-color) !important;
}
html[data-theme="dark"] .hm .carousel-wrap{
    background:var(--bg-secondary) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-card) !important;
}
html[data-theme="dark"] .hm .carousel-dot{background:rgba(255,255,255,.32) !important}
html[data-theme="dark"] .hm .carousel-dot.active{background:var(--accent-color) !important}

/* 通用卡片 / 详情页 */
html[data-theme="dark"] .hm .card,
html[data-theme="dark"] .hm .info-card,
html[data-theme="dark"] .hm .stats-box,
html[data-theme="dark"] .hm .upload-card,
html[data-theme="dark"] .hm .detail-card,
html[data-theme="dark"] .hm .info-panel,
html[data-theme="dark"] .hm .glass-card{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    color:var(--text-primary) !important;
    border-radius:var(--r-card) !important;
    box-shadow:var(--shadow-card) !important;
}
html[data-theme="dark"] .hm .detail-card h1,
html[data-theme="dark"] .hm .detail-card h2,
html[data-theme="dark"] .hm .detail-card h3{color:var(--text-primary) !important}
html[data-theme="dark"] .hm .breadcrumb,
html[data-theme="dark"] .hm .detail-meta{color:var(--text-muted) !important}
html[data-theme="dark"] .hm h2{color:var(--text-primary) !important}
html[data-theme="dark"] .hm .upload-area{
    background:var(--bg-secondary) !important;
    border:2px dashed var(--border-color) !important;
    border-radius:var(--r-card) !important;
}
html[data-theme="dark"] .hm .upload-area:hover{
    border-color:var(--accent-color) !important;
    background:var(--accent-soft) !important;
}
html[data-theme="dark"] .hm .empty-state{color:var(--text-muted) !important}

/* 表单 */
html[data-theme="dark"] .hm label{
    color:var(--text-secondary) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm input::placeholder,
html[data-theme="dark"] .hm textarea::placeholder{color:var(--text-muted) !important}
html[data-theme="dark"] .hm .form-group label{color:var(--text-secondary) !important}

/* 按钮：新主题为胶囊 + 强调色 */
html[data-theme="dark"] .hm .btn,
html[data-theme="dark"] .hm .btn-primary,
html[data-theme="dark"] .hm button[type="submit"]{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    border:0 !important;
    border-radius:var(--r-pill) !important;
    font-weight:700 !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .btn:hover,
html[data-theme="dark"] .hm .btn-primary:hover,
html[data-theme="dark"] .hm button[type="submit"]:hover{
    background:var(--accent-color) !important;
    opacity:.88;
    box-shadow:none !important;
}
html[data-theme="dark"] .hm .btn-outline{
    background:transparent !important;
    border:1px solid var(--border-color) !important;
    color:var(--text-secondary) !important;
    border-radius:var(--r-pill) !important;
}
html[data-theme="dark"] .hm .btn-outline:hover,
html[data-theme="dark"] .hm .btn-outline.active{
    border-color:var(--accent-color) !important;
    color:var(--accent-color) !important;
    background:var(--accent-soft) !important;
}

/* 表格 / 分页 */
html[data-theme="dark"] .hm th{
    background:var(--bg-secondary) !important;
    color:var(--text-muted) !important;
    border-bottom:1px solid var(--border-color) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .pagination a,
html[data-theme="dark"] .hm .page-nav a,
html[data-theme="dark"] .hm .page-btn{
    background:var(--bg-card) !important;
    color:var(--text-secondary) !important;
    border:1px solid var(--border-color) !important;
    border-radius:var(--r-pill) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .pagination a:hover,
html[data-theme="dark"] .hm .page-nav a:hover,
html[data-theme="dark"] .hm .page-btn:hover{
    border-color:var(--accent-color) !important;
    color:var(--accent-color) !important;
    background:var(--bg-card) !important;
}
html[data-theme="dark"] .hm .pagination a.active,
html[data-theme="dark"] .hm .page-nav a.active,
html[data-theme="dark"] .hm .page-btn.active{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    border-color:var(--accent-color) !important;
}

/* 弹层 */
html[data-theme="dark"] .hm .modal-content,
html[data-theme="dark"] .hm .dialog{
    background:var(--bg-card) !important;
    border:1px solid var(--border-color) !important;
    color:var(--text-primary) !important;
    border-radius:var(--r-card) !important;
    box-shadow:0 24px 60px rgba(0,0,0,.5) !important;
}
html[data-theme="dark"] .hm .toast{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
    border-radius:var(--r-pill) !important;
}

/* 页脚 */
html[data-theme="dark"] .hm footer{
    background:transparent !important;
    border-top:1px solid var(--border-color) !important;
}
html[data-theme="dark"] .hm footer p{color:var(--text-muted) !important}
html[data-theme="dark"] .hm footer a{color:var(--text-secondary) !important}
html[data-theme="dark"] .hm footer a:hover{color:var(--accent-color) !important}
html[data-theme="dark"] .hm .footer-logo{color:var(--text-primary) !important;letter-spacing:normal !important}
html[data-theme="dark"] .hm .footer-logo::before{background:var(--accent-color) !important;box-shadow:none !important}
html[data-theme="dark"] .hm .footer-links{border-bottom-color:var(--border-color) !important}
html[data-theme="dark"] .hm .footer-links a{
    color:var(--text-muted) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    font-size:13px !important;
}
html[data-theme="dark"] .hm .footer-links a:hover{color:var(--accent-color) !important}

/* 通知下拉的少量字面量灰底 */
html[data-theme="dark"] .hm .noti-dropdown-header,
html[data-theme="dark"] .hm .noti-dropdown-footer{background:var(--bg-elevate) !important}
html[data-theme="dark"] .hm .noti-item:hover{background:var(--bg-elevate) !important}

/* 用户中心侧边栏 */
html[data-theme="dark"] .hm .sidebar,
html[data-theme="dark"] .hm .left-sidebar{
    background:var(--bg-card) !important;
    border-right:1px solid var(--border-color) !important;
    border-left:1px solid var(--border-color) !important;
}
html[data-theme="dark"] .hm .sidebar h2{
    color:var(--text-primary) !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
html[data-theme="dark"] .hm .sidebar a.active,
html[data-theme="dark"] .hm .sidebar a.upload-btn{
    background:var(--accent-color) !important;
    color:var(--accent-ink) !important;
}
html[data-theme="dark"] .hm .content,
html[data-theme="dark"] .hm .main-content,
html[data-theme="dark"] .hm #mainContent{
    background:transparent !important;
    color:var(--text-primary) !important;
}

/* ══════════════════════════════════════════════════════════
   亮色对齐：上面那批「中和」规则只在暗色生效，会与亮色下页面原有
   几何/字体产生差异（例如暗色 .section-title 大写 14px、亮色为页面原值）。
   这里把同一批组件的「几何 / 字体」在亮色下也钉成同一套值，
   保证亮暗两套主题仅颜色不同，结构与排版完全一致。
   （不使用 !important：亮色下 dark-theme.css 不参与，页面自身优先级更高）
   ══════════════════════════════════════════════════════════ */
.hm .section-title{
    text-transform:none;letter-spacing:-.015em;
    font-size:20px;font-weight:800;padding-left:0;border-left:0;line-height:1.25;
}
.hm .section-link{
    border-radius:var(--r-pill);font-size:12px;
    text-transform:none;letter-spacing:normal;padding:5px 13px;
}
.hm .search-bar{border-radius:var(--r-pill)}
.hm .search-bar input::placeholder{text-transform:none;letter-spacing:normal}
.hm .search-bar button{border-radius:var(--r-pill);text-transform:none;letter-spacing:normal}
.hm .section-nav a{
    border-radius:var(--r-pill);font-size:12.5px;
    text-transform:none;letter-spacing:normal;padding:7px 15px;
}
.hm .tags-cloud a{border-radius:var(--r-pill);padding:4px 11px;text-transform:none}
.hm .notice-bar > details{border-radius:10px}
.hm .photo-grid,.hm .archive-grid,.hm .fav-grid{gap:12px}
.hm .photo-card,.hm .photo-grid .photo-card,
.hm .archive-grid .photo-card,.hm .fav-grid .photo-card{border-radius:var(--r-card)}
.hm .photo-card .photo-info{background:transparent;border-top:0;padding:10px 12px 12px}
.hm .photo-card .photo-brand,.hm .photo-card .photo-meta{text-transform:none;letter-spacing:normal}
.hm .photo-card .photo-meta{font-size:11.5px}
.hm .photo-card .photo-meta::before{content:none}
.hm .featured-item{border-radius:var(--r-card)}
.hm .featured-item .featured-badge{
    border-radius:var(--r-pill);font-size:10.5px;
    text-transform:none;letter-spacing:normal;
}
.hm .news-card{border-radius:14px}
.hm .explore-card{border-radius:var(--r-card)}
.hm .explore-card::before{content:none}
.hm .explore-card .ec-text h3{text-transform:none;letter-spacing:normal}
.hm .carousel-wrap{border-radius:var(--r-card)}
.hm .admin-grid > div{border-radius:12px}
.hm .pagination a,.hm .page-nav a,.hm .page-btn{
    border-radius:var(--r-pill);text-transform:none;letter-spacing:normal;
}
.hm .footer-links a{text-transform:none;letter-spacing:normal;font-size:13px}
.hm .footer-logo{letter-spacing:normal}
.hm th{text-transform:none;letter-spacing:normal}
