/* ============================================
   mobile.css — 移动端专用样式
   断点：≤768px 为移动端
   首页：纵向滚动玻璃卡片流
   ============================================ */

/* ====== 移动端检测标记（由 JS 设置） ====== */

/* ====== 移动端默认样式（不依赖任何媒体查询） ======
   核心策略：移动端样式 = 默认样式，仅 html.is-desktop 时才应用桌面端布局
   这样即使 JS 不执行、媒体查询不支持，移动端也能获得正确布局
   html:not(.is-desktop) 覆盖以下情况：
   1. JS 设置了 is-mobile class
   2. JS 设置了 is-desktop 但后续被移除
   3. JS 完全不执行（两个 class 都没有）= 安全默认移动端 */
html:not(.is-desktop){
  overflow-y:scroll!important;
  overflow-x:hidden!important;
}
html:not(.is-desktop) body{
  overflow-y:scroll!important;
  overflow-x:hidden!important;
}
html:not(.is-desktop) #ajax-container{
  padding:0 0 90px;
  max-width:100%;
  margin:0 auto;
}
html:not(.is-desktop) .drag-win:not([data-pos]){
  visibility:visible!important;
}
html:not(.is-desktop) .app-window:not([style*="display:none"]):not(.win-minimized){
  display:flex!important;
}
html:not(.is-desktop) .app-window{
  position:relative!important;
  left:auto!important;top:auto!important;
  width:auto!important;max-width:100%!important;
  min-height:auto!important;height:auto!important;
  margin:0 12px 14px!important;
  border-radius:18px!important;
  border:1px solid rgba(0,0,0,0.06)!important;
  transform:none!important;
  z-index:10!important;
  overflow:hidden!important;
  box-shadow:0 4px 24px rgba(0,0,0,0.08)!important;
  display:flex!important;
  flex-direction:column;
  background:var(--card-bg,rgba(255,255,255,0.88))!important;
  backdrop-filter:blur(20px) saturate(1.5);
  -webkit-backdrop-filter:blur(20px) saturate(1.5);
}
html:not(.is-desktop)[data-theme="dark"] .app-window{
  background:var(--card-bg,rgba(30,30,50,0.88))!important;
  border-color:rgba(255,255,255,0.08)!important;
  box-shadow:0 4px 24px rgba(0,0,0,0.3)!important;
}
html:not(.is-desktop) .win-traffic,
html:not(.is-desktop) .win-resize-handle{
  display:none!important;
}
html:not(.is-desktop) .app-window .win-head{
  flex-shrink:0;cursor:default!important;
  padding:14px 16px 6px;text-align:left;
  border-bottom:none;background:transparent;
}
html:not(.is-desktop) .app-window .win-name{
  font-size:15px;font-weight:700;color:#111;
  display:flex;align-items:center;gap:8px;
}
html:not(.is-desktop)[data-theme="dark"] .app-window .win-name{ color:#fff; }
html:not(.is-desktop) .app-window .win-body{
  padding:4px 16px 16px;overflow:visible!important;
}

/* ====== 超小屏 / 横屏 媒体查询（仅做微调，不影响核心布局） ====== */

/* ====== 首页：纵向滚动玻璃卡片流 ====== */

/* 容器 — 无 padding，由内部元素自行控制边距 */
html:not(.is-desktop) #ajax-container{
  padding:0 0 90px;
  max-width:100%;
  margin:0 auto;
}

/* 所有窗口 → 独立玻璃卡片 */
html:not(.is-desktop) .app-window{
  position:relative!important;
  left:auto!important;top:auto!important;
  width:auto!important;max-width:100%!important;
  min-height:auto!important;height:auto!important;
  margin:0 12px 14px!important;
  border-radius:18px!important;
  border:1px solid rgba(0,0,0,0.06)!important;
  transform:none!important;
  z-index:10!important;
  overflow:hidden!important;
  box-shadow:0 4px 24px rgba(0,0,0,0.08)!important;
  display:flex!important;
  flex-direction:column;
  background:var(--card-bg,rgba(255,255,255,0.88))!important;
  backdrop-filter:blur(20px) saturate(1.5);
  -webkit-backdrop-filter:blur(20px) saturate(1.5);
}
html:not(.is-desktop)[data-theme="dark"] .app-window{
  background:var(--card-bg,rgba(30,30,50,0.88))!important;
  border-color:rgba(255,255,255,0.08)!important;
  box-shadow:0 4px 24px rgba(0,0,0,0.3)!important;
}

/* 让隐藏的 drag-win 可见 */
html:not(.is-desktop) .drag-win:not([data-pos]){
  visibility:visible!important;
}
html:not(.is-desktop) .app-window:not([style*="display:none"]):not(.win-minimized){
  display:flex!important;
}

/* 隐藏窗口操作按钮 */
html:not(.is-desktop) .win-traffic,
html:not(.is-desktop) .win-resize-handle{
  display:none!important;
}

/* 卡片标题栏 — 左对齐 + 图标徽章 */
html:not(.is-desktop) .app-window .win-head{
  flex-shrink:0;cursor:default!important;
  padding:14px 16px 6px;text-align:left;
  border-bottom:none;background:transparent;
}
html:not(.is-desktop) .app-window .win-name{
  font-size:15px;font-weight:700;color:#111;
  display:flex;align-items:center;gap:8px;
}
html:not(.is-desktop)[data-theme="dark"] .app-window .win-name{ color:#fff; }
html:not(.is-desktop) .win-head-icon{
  font-size:13px;color:var(--accent-color);
  width:28px;height:28px;
  display:inline-flex;align-items:center;justify-content:center;
  background:color-mix(in srgb,var(--accent-color) 12%,transparent);
  border-radius:8px;flex-shrink:0;
}

/* 卡片内容区 */
html:not(.is-desktop) .app-window .win-body{
  padding:4px 16px 16px;position:relative;
  overflow:visible!important;
}

/* Hero 区 — 第一张卡片，内容居中，顶部加间距 */
html:not(.is-desktop) .window-main{ margin-top:12px!important; }
html:not(.is-desktop) .window-main .win-head{ display:none; }
html:not(.is-desktop) .window-main .win-body{
  display:flex;flex-direction:column;
  justify-content:center;align-items:center;
  text-align:center;padding:28px 20px;
}
html:not(.is-desktop) .hero-ava{
  width:68px;height:68px;font-size:26px;margin-bottom:10px;
}
html:not(.is-desktop) .hero-text h2{
  font-size:21px;margin-bottom:6px;
}
html:not(.is-desktop) .hero-text p{
  font-size:13px;line-height:1.7;margin-bottom:8px;
}
html:not(.is-desktop) .hero-social{gap:8px;margin-bottom:6px;}
html:not(.is-desktop) .hero-social-btn{width:34px;height:34px;font-size:14px;}
html:not(.is-desktop) .hero-hitokoto{
  font-size:12px;padding:10px 14px;margin-top:20px;line-height:1.5;
  border-radius:10px;
}

/* ====== 文章列表 ====== */
html:not(.is-desktop) .art-item{
  padding:11px 0;border-bottom:1px solid rgba(0,0,0,0.05);border-radius:0;
}
html:not(.is-desktop) .art-item:last-child{ border-bottom:none; }
html:not(.is-desktop) .art-item:hover{ background:none; }
html:not(.is-desktop) .art-item h4{ font-size:14px;font-weight:500; }
html:not(.is-desktop) .art-item span{ font-size:11px; }

/* ====== 分类 — 双列网格 ====== */
html:not(.is-desktop) .cat-box{
  display:grid;grid-template-columns:1fr 1fr;gap:8px;
}
html:not(.is-desktop) .cat-box .cat-item{
  padding:10px 12px;font-size:13px;border-radius:10px;
  background:color-mix(in srgb,var(--accent-color) 5%,transparent);
}

/* ====== 标签云 ====== */
html:not(.is-desktop) .tag-box{ gap:6px; }
html:not(.is-desktop) .tag-box .tag{
  padding:5px 10px;font-size:12px;border-radius:8px;
}

/* ====== 数据窗口 → 3列网格，5项全显示 ====== */
html:not(.is-desktop) .window-data .win-body{
display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;
padding:10px 14px 14px;
}
html:not(.is-desktop) .data-item{
display:flex!important;flex-direction:column;align-items:center;
padding:12px 6px!important;border-radius:12px;border:none!important;
background:color-mix(in srgb,var(--accent-color) 6%,transparent);
font-size:12px!important;gap:3px;border-bottom:none!important;
}
html:not(.is-desktop) .data-item:hover{
background:color-mix(in srgb,var(--accent-color) 10%,transparent);transform:none;
}
html:not(.is-desktop) .data-item span:first-child{ font-size:10px;color:#888;order:2; }
html:not(.is-desktop) .data-item span:last-child{ font-size:17px;font-weight:700;color:var(--accent-color);order:1; }
html:not(.is-desktop)[data-theme="dark"] .data-item span:first-child{ color:#c8c8c8; }
/* 第4、5项跨2列，让5项均匀分布在3列网格里 */
html:not(.is-desktop) .data-item:nth-child(4){ grid-column:span 2; }
html:not(.is-desktop) .data-item:nth-child(5){ grid-column:span 1; }

/* ====== 网站信息 ====== */
html:not(.is-desktop) .info-list{ gap:0; }
html:not(.is-desktop) .info-item{
  padding:7px 0;font-size:12px;
  text-align:center;
  border-bottom:1px solid rgba(0,0,0,0.04);
}
html:not(.is-desktop) .info-item:last-child{ border-bottom:none; }
html:not(.is-desktop) .info-item i{ font-size:12px;width:14px;left:4px; }
html:not(.is-desktop) .info-item-days{ display:none; }
html:not(.is-desktop) .window-info .win-body{
  display:block!important;
  padding:16px 20px;
}
html:not(.is-desktop)[data-theme="dark"] .info-item{ border-bottom-color:rgba(255,255,255,0.06); }

/* ====== 音乐窗口 ====== */
html:not(.is-desktop) .window-music .win-body{ padding:8px 12px 12px; }
/* APlayer 适配移动端 — 紧凑模式 */
html:not(.is-desktop) .aplayer .aplayer-pic{
  width:44px!important;height:44px!important;border-radius:8px!important;
}
html:not(.is-desktop) .aplayer .aplayer-info{
  padding:0 4px!important;height:44px!important;margin-left:44px!important;
}
html:not(.is-desktop) .aplayer .aplayer-info .aplayer-music{
  padding:3px 0 0!important;
}
html:not(.is-desktop) .aplayer .aplayer-title{
  font-size:12px!important;
}
html:not(.is-desktop) .aplayer .aplayer-author{
  font-size:10px!important;
}
html:not(.is-desktop) .aplayer .aplayer-controller{
  padding:0 4px!important;margin-top:0!important;
}
html:not(.is-desktop) .aplayer .aplayer-bar-wrap{
  margin:2px 0!important;padding:0 4px!important;
}
html:not(.is-desktop) .aplayer .aplayer-time{
  font-size:9px!important;padding:0 2px!important;
}
html:not(.is-desktop) .aplayer .aplayer-icon{
  width:13px!important;height:13px!important;
}
/* 列表展开时才给高度，折叠时由 aplayer-list-hide 接管 */
html:not(.is-desktop) .aplayer .aplayer-list{
  max-height:260px;
}
html:not(.is-desktop) .aplayer .aplayer-list ol li{
  padding:6px 8px!important;
}
html:not(.is-desktop) .aplayer .aplayer-list ol li .aplayer-list-title{
  font-size:11px!important;
}
/* 全局音乐播放器固定定位 — 移动端隐藏（仅在音乐窗口中显示） */
html:not(.is-desktop) .global-music-wrap:not(#music-window-mount .global-music-wrap){
  display:none!important;
}

/* ====== 返回顶部按钮 — 移动端适配 ====== */
html:not(.is-desktop) .back-top-btn{
  right:12px;bottom:64px;
  width:38px;height:38px;
  font-size:14px;
  z-index:9998;
}

/* ====== Dock 栏适配 ====== */
html:not(.is-desktop) .dock-bar{
  padding-bottom:6px;
  z-index:9999;
}
/* 隐藏空的 dock-glass（桌面端由 JS 同步宽度，移动端不需要） */
html:not(.is-desktop) .dock-glass{
  display:none!important;
}
/* 将毛玻璃背景直接应用到 dock-bar-inner */
html:not(.is-desktop) .dock-bar-inner{
  padding:4px 10px 5px;
  gap:0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  backdrop-filter:var(--card-blur);-webkit-backdrop-filter:var(--card-blur);
  background:var(--card-bg);
  border:var(--card-border);
  border-radius:16px;
  box-shadow:var(--card-shadow),inset 0 1px 0 rgba(255,255,255,0.5);
  height:48px;
  max-width:calc(100vw - 24px);
}
html:not(.is-desktop) .dock-bar-inner::-webkit-scrollbar{
  display:none;
}
html:not(.is-desktop) .dock-item{
  width:40px;padding:3px 0 0;
}
html:not(.is-desktop) .dock-item-inner{
  width:36px;height:36px;border-radius:10px;
}
html:not(.is-desktop) .dock-icon{
  font-size:17px;
}
html:not(.is-desktop) .dock-text{
  font-size:10px;padding:3px 7px;bottom:calc(100% + 4px);
}
/* 禁用 hover 放大效果 */
html:not(.is-desktop) .dock-item:hover .dock-item-inner,
html:not(.is-desktop) .dock-minimized-item:hover .dock-item-inner{
  transform:none!important;
}
/* 最小化区域 */
html:not(.is-desktop) .dock-mini-zone{
  display:none!important;
}
/* 暗黑模式：dock-bar-inner */
html:not(.is-desktop)[data-theme="dark"] .dock-bar-inner{
  background:var(--card-bg)!important;
  border-color:rgba(255,255,255,0.14)!important;
  box-shadow:0 -2px 30px rgba(0,0,0,0.3),inset 0 1px 0 rgba(255,255,255,0.1)!important;
}

/* ====== 搜索按钮 ====== */
html:not(.is-desktop) .search-trigger{
  top:12px;right:12px;
  width:38px;height:38px;
  border-radius:11px;
  font-size:14px;
}

/* ====== 主题切换按钮 ====== */
html:not(.is-desktop) .theme-toggle{
  bottom:112px;right:12px;
  width:38px;height:38px;
  font-size:14px;
}

/* ====== 搜索弹窗 ====== */
html:not(.is-desktop) .search-modal{
  padding-top:6vh;
}
html:not(.is-desktop) .search-modal-box{
  width:calc(100vw - 24px);
  max-width:none;
  border-radius:16px;
}
html:not(.is-desktop) .search-input-wrap{
  padding:12px 14px;gap:8px;
}
html:not(.is-desktop) .search-input{
  font-size:16px; /* ≥16px 避免 iOS 自动放大 */
}
html:not(.is-desktop) .search-results{
  max-height:55vh;
}
html:not(.is-desktop) .search-item{
  padding:11px 12px;
}
html:not(.is-desktop) .search-item-title{
  font-size:14px;
}
html:not(.is-desktop) .search-item-excerpt{
  font-size:12px;
}
html:not(.is-desktop) .search-footer{
  display:none;
}

/* ====== 文章详情页 ====== */
html:not(.is-desktop) .page-container{
  padding:12px 12px 90px;
  max-width:100%;
}
html:not(.is-desktop) .page-body{
  border-radius:16px;
}
html:not(.is-desktop) .page-header{
  padding:18px 16px 12px;
}
html:not(.is-desktop) .page-header h2{
  font-size:18px;
}
html:not(.is-desktop) .page-body > .page-content{
  padding:16px;
}
html:not(.is-desktop) .article-header{
  padding:0 0 12px;
}
html:not(.is-desktop) .article-header h1{
  font-size:19px;line-height:1.4;
}
/* 文章元信息（发布时间/分类/字数等）— 移动端缩小 */
html:not(.is-desktop) .article-header .flex.items-center{
  font-size:11px!important;
  gap:4px!important;
  opacity:0.7!important;
}
html:not(.is-desktop) .article-header .flex.items-center i{
  font-size:10px;
}
html:not(.is-desktop) .article-body{
  padding:0 16px 16px;
}
html:not(.is-desktop) .article-content{
  font-size:15px;line-height:1.8;
}
html:not(.is-desktop) .article-content h1{font-size:20px;}
html:not(.is-desktop) .article-content h2{font-size:18px;}
html:not(.is-desktop) .article-content h3{font-size:16px;}
html:not(.is-desktop) .article-content p{margin:10px 0;}
html:not(.is-desktop) .article-content img{border-radius:10px;}
html:not(.is-desktop) .article-content blockquote{
  padding:8px 12px;margin:10px 0;border-radius:0 10px 10px 0;
}
html:not(.is-desktop) .article-content pre{
  padding:12px;border-radius:10px;font-size:12px;
}
html:not(.is-desktop) .article-content pre code{
  font-size:12px;
}
html:not(.is-desktop) .article-content code{
  font-size:12px;padding:1px 5px;
}
html:not(.is-desktop) .article-content table{
  font-size:12px;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;
}
html:not(.is-desktop) .article-content table th,
html:not(.is-desktop) .article-content table td{
  padding:8px 10px;
}
html:not(.is-desktop) .article-content ul,
html:not(.is-desktop) .article-content ol{
  padding-left:20px;
}
/* 代码高亮块 */
html:not(.is-desktop) .article-content figure.highlight{
  border-radius:10px;
}
html:not(.is-desktop) .article-content figure.highlight .gutter pre{
  padding:12px 8px 12px 12px;font-size:12px;
}
html:not(.is-desktop) .article-content figure.highlight .code pre{
  padding:12px 12px;font-size:12px;
}
/* 复制按钮 — 移动端常显 */
html:not(.is-desktop) .code-copy-btn{
  opacity:0.5;
}
/* 文章导航 */
html:not(.is-desktop) .article-nav{
  padding:12px 16px;gap:8px;flex-direction:row;
}
html:not(.is-desktop) .nav-prev,
html:not(.is-desktop) .nav-next{
  font-size:12px;max-width:48%;
}
/* 版权声明 */
html:not(.is-desktop) .post-copyright{
  border-radius:12px;margin:18px 0 0;
}
html:not(.is-desktop) .post-copyright-title{
  padding:8px 12px;font-size:12px;
}
html:not(.is-desktop) .post-copyright-body{
  padding:10px 12px;font-size:12px;line-height:1.7;
}
/* 评论区 */
html:not(.is-desktop) .comments-wrap{
  margin-top:24px;padding:14px;border-radius:14px;
}

/* ====== TOC 目录 ====== */
html:not(.is-desktop) .post-toc-wrap{
  display:none!important;
}
html:not(.is-desktop) .post-toc-fab{
  display:flex!important;
  right:12px;bottom:104px;
  width:40px;height:40px;font-size:15px;
}
html:not(.is-desktop) .post-toc-wrap.fab-open{
  top:60px!important;right:12px!important;left:12px!important;
  width:auto!important;max-width:none;
}
html:not(.is-desktop) .post-toc-inner{
  max-height:60vh;
}
html:not(.is-desktop) .post-toc-body{
  max-height:calc(60vh - 50px);
}

/* ====== 归档页 ====== */
html:not(.is-desktop) .archive-header h2{
  font-size:18px;
}
html:not(.is-desktop) .archive-subtitle{
  font-size:12px;
}
html:not(.is-desktop) .stat-hero-row{
  grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px;
}
html:not(.is-desktop) .stat-hero-card{
  padding:14px 16px;gap:10px;border-radius:14px;
}
html:not(.is-desktop) .stat-hero-card:nth-child(3){
  grid-column:span 2;
}
html:not(.is-desktop) .stat-hero-icon{
  width:38px;height:38px;font-size:16px;border-radius:10px;
}
html:not(.is-desktop) .stat-hero-num{
  font-size:24px;
}
html:not(.is-desktop) .stat-hero-label{
  font-size:11px;
}
html:not(.is-desktop) .stat-chart-full{
  padding:14px;border-radius:14px;
}
html:not(.is-desktop) .chart-bars-full{
  gap:8px;min-height:90px;padding:10px 0;
}
html:not(.is-desktop) .stat-detail-row{
  grid-template-columns:1fr;gap:10px;
}
html:not(.is-desktop) .stat-card{
  padding:14px;border-radius:14px;
}
html:not(.is-desktop) .chart-bars{
  height:80px;gap:6px;
}
html:not(.is-desktop) .chart-bar-wrap{
  height:55px;
}
html:not(.is-desktop) .chart-label{
  font-size:10px;
}
/* 年份折叠 */
html:not(.is-desktop) .archive-year-header{
  padding:10px 12px;
}
html:not(.is-desktop) .year-label-text{
  font-size:16px;
}
html:not(.is-desktop) .year-post-count{
  font-size:11px;
}
html:not(.is-desktop) .archive-row{
  padding:10px 10px;gap:8px;
}
html:not(.is-desktop) .row-date{
  font-size:11px;padding:2px 8px;
}
html:not(.is-desktop) .row-title{
  font-size:13px;
}
html:not(.is-desktop) .row-cat{
  display:none;
}

/* ====== 文章墙 ====== */
html:not(.is-desktop) .wall-header h2{
  font-size:18px;
}
html:not(.is-desktop) .wall-filter{
  gap:6px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  flex-wrap:nowrap;
  justify-content:flex-start;
  padding-bottom:4px;
  /* 允许横向滚动到首尾按钮（覆盖桌面端 center 导致左侧裁切） */
  margin:0 -4px;
  padding-left:4px;
  padding-right:4px;
}
html:not(.is-desktop) .wall-filter::-webkit-scrollbar{
  display:none;
}
html:not(.is-desktop) .filter-btn{
  padding:5px 12px;font-size:11px;white-space:nowrap;flex-shrink:0;
}
html:not(.is-desktop) .wall-grid{
  column-count:1;column-gap:12px;
}
/* ====== 文章墙卡片 — 移动端紧凑 ====== */
html:not(.is-desktop) .wall-card{
  padding:10px 12px;border-radius:12px;margin-bottom:8px;
}
html:not(.is-desktop) .card-title{
  font-size:13px;margin-bottom:3px;
}
html:not(.is-desktop) .card-summary{
  font-size:11px;line-height:1.4;margin-bottom:4px;
}
html:not(.is-desktop) .card-top{ margin-bottom:4px; }
html:not(.is-desktop) .card-cat{ font-size:10px;padding:1px 6px; }
html:not(.is-desktop) .card-date{ font-size:10px; }
html:not(.is-desktop) .card-tag{ font-size:10px;padding:1px 5px; }
html:not(.is-desktop) .card-tags{ gap:3px; }

/* ====== 关于页 ====== */
html:not(.is-desktop) .about-card{
  padding:24px 18px;border-radius:16px;
}
html:not(.is-desktop) .about-ava{
  width:64px;height:64px;font-size:26px;margin-bottom:12px;
}
html:not(.is-desktop) .about-name{
  font-size:18px;
}
html:not(.is-desktop) .about-desc{
  font-size:13px;line-height:1.7;margin-bottom:14px;
}
html:not(.is-desktop) .about-content{
  font-size:14px;line-height:1.8;
}

/* ====== 友链页 ====== */
html:not(.is-desktop) .links-header h2{
  font-size:18px;
}
html:not(.is-desktop) .links-grid{
  grid-template-columns:1fr;gap:10px;
}
html:not(.is-desktop) .link-card{
  padding:12px;border-radius:12px;gap:10px;
}
html:not(.is-desktop) .link-ava{
  width:36px;height:36px;border-radius:8px;
}
html:not(.is-desktop) .link-name{
  font-size:14px;
}
html:not(.is-desktop) .link-desc{
  font-size:11px;
}

/* ====== 豆瓣页 ====== */
html:not(.is-desktop) .douban-section{
  margin-bottom:24px;
}
html:not(.is-desktop) .douban-sec-head h3{
  font-size:16px;
}
html:not(.is-desktop) .douban-grid{
  grid-template-columns:1fr;gap:12px;
}
html:not(.is-desktop) .douban-card{
  padding:12px;gap:10px;border-radius:12px;
}
html:not(.is-desktop) .douban-cover{
  width:64px;height:90px;border-radius:6px;
}
html:not(.is-desktop) .douban-name{
  font-size:14px;
}
html:not(.is-desktop) .douban-original-name{
  font-size:11px;
}
html:not(.is-desktop) .douban-note{
  font-size:11px;
}
html:not(.is-desktop) .douban-meta{
  font-size:10px;
}
html:not(.is-desktop) .douban-link{
  font-size:10px;
}

/* ====== 相册页 ====== */
html:not(.is-desktop) .gallery-masonry{
  column-count:3;column-gap:6px;
}
html:not(.is-desktop) .gallery-item{
  margin-bottom:6px;border-radius:8px;
}
html:not(.is-desktop) .gallery-overlay{
  padding:16px 6px 5px;
}
html:not(.is-desktop) .gallery-overlay span{
  font-size:10px;
}
/* 灯箱 */
html:not(.is-desktop) .lightbox-close{
  top:14px;right:14px;width:36px;height:36px;font-size:16px;
}
html:not(.is-desktop) .lightbox-prev,
html:not(.is-desktop) .lightbox-next{
  width:40px;height:40px;font-size:18px;
}
html:not(.is-desktop) .lightbox-prev{left:10px;}
html:not(.is-desktop) .lightbox-next{right:10px;}

/* ====== 404 页面 ====== */
html:not(.is-desktop) .not-found-page{
  padding-top:6vh;
}
html:not(.is-desktop) .not-found-card{
  padding:36px 20px;border-radius:18px;
}
html:not(.is-desktop) .not-found-code{
  font-size:56px;
}
html:not(.is-desktop) .not-found-code .nf-emoji{
  font-size:44px;
}
html:not(.is-desktop) .not-found-title{
  font-size:19px;
}
html:not(.is-desktop) .not-found-desc{
  font-size:13px;line-height:1.7;
}

/* ====== 文章列表页（post-list） ====== */
html:not(.is-desktop) .post-list-item{
  padding:10px 12px!important;
}
html:not(.is-desktop) .post-list-item h3{
  font-size:13px;margin-bottom:2px;
}
html:not(.is-desktop) .post-list-item .post-meta{
  font-size:10px;gap:3px;
}
html:not(.is-desktop) .post-excerpt{
  font-size:11px;line-height:1.4;margin-top:3px;
}
html:not(.is-desktop) .post-list-tag{
  font-size:10px;padding:1px 5px;
}
html:not(.is-desktop) .post-list-tags{ gap:3px;margin-top:4px; }
html:not(.is-desktop) .pagination{
  gap:12px;padding:12px 14px;
}
html:not(.is-desktop) .page-btn{
  padding:5px 12px;font-size:12px;
}
html:not(.is-desktop) .page-info{
  font-size:12px;
}

/* ====== Mesh 背景动画 — 移动端减弱 ====== */
html:not(.is-desktop) .mesh-blob{
  opacity:0.2;
}
html:not(.is-desktop) .mesh-blob-1{width:300px;height:300px;}
html:not(.is-desktop) .mesh-blob-2{width:280px;height:280px;}
html:not(.is-desktop) .mesh-blob-3{width:250px;height:250px;}
html:not(.is-desktop) .mesh-blob-4{display:none;}

/* ====== 全局用户选择 — 移动端允许正常选择 ====== */
html:not(.is-desktop) body{
  user-select:text;
  -webkit-user-select:text;
  -webkit-tap-highlight-color:transparent;
}

/* ====== 超小屏（≤380px）微调 ====== */
@media (max-width:380px){
/* 非滑动模式 */
html:not(.is-desktop) #ajax-container{
  padding:0 0 85px;
}
  html:not(.is-desktop) .hero-text h2{
    font-size:18px;
  }
  html:not(.is-desktop) .article-content{
    font-size:14px;
  }
  html:not(.is-desktop) .page-container{
    padding:10px 8px 85px;
  }
  html:not(.is-desktop) .page-body > .page-content{
    padding:12px;
  }
  html:not(.is-desktop) .article-body{
    padding:0 12px 12px;
  }
  html:not(.is-desktop) .dock-item{
    width:36px;
  }
  html:not(.is-desktop) .dock-item-inner{
    width:32px;height:32px;border-radius:9px;
  }
  html:not(.is-desktop) .dock-icon{
    font-size:15px;
  }
  html:not(.is-desktop) .gallery-masonry{
    column-count:2;
  }
  html:not(.is-desktop) .stat-hero-row{
    grid-template-columns:1fr;
  }
  html:not(.is-desktop) .stat-hero-card:nth-child(3){
    grid-column:span 1;
  }
}

/* ====== 横屏适配 ====== */
@media (max-width:900px) and (orientation:landscape) and (max-height:500px){
  html:not(.is-desktop) #ajax-container{
    padding-top:8px;
  }
  html:not(.is-desktop) .search-modal{
    padding-top:4vh;
  }
  html:not(.is-desktop) .search-results{
    max-height:40vh;
  }
}
