/* ============================================================
 * 应用市场 全站样式 —— 对标华为/小米应用市场视觉
 * ============================================================ */
:root {
  --primary: #2B6BFF;
  --primary-dark: #1E56E0;
  --bg: #F6F7FB;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --border: #EEF0F5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,42,100,.04), 0 4px 16px rgba(16,42,100,.06);
  --shadow-hover: 0 4px 10px rgba(16,42,100,.08), 0 14px 34px rgba(16,42,100,.12);
  --star: #FF9500;
  --own: #FF6A00;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden; overflow-x: clip;
}
main, body > #detail-root { flex: 1 0 auto; }
a { text-decoration: none; color: inherit; }
img { display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border), 0 4px 14px rgba(20,40,90,.04);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: block; flex-shrink: 0;
}
.logo-text { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.logo-brand {
  font-size: 26px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(120deg, #2B6BFF 20%, #7C3AED 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #2B6BFF;
  margin-right: 2px;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  padding: 6px 14px; border-radius: 8px; font-size: 14px;
  color: var(--text-2); transition: .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: #EEF3FF; font-weight: 600; }
.search-box {
  flex: 1; max-width: 440px; margin-left: auto; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  background: #F2F4F8; border-radius: 20px; padding: 8px 16px;
  border: 1px solid transparent; transition: .15s;
}
.search-box:focus-within { background: #fff; border-color: var(--primary); }
.search-box input {
  border: none; outline: none; background: transparent;
  flex: 1; min-width: 0; font-size: 14px; color: var(--text);
}
.search-box .icon { width: 16px; height: 16px; flex-shrink: 0; }
.search-btn { cursor: pointer; color: var(--text-3); white-space: nowrap; }

/* ---------- Banner ---------- */
.banner-section { margin-top: 18px; }
.banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  height: 260px; color: #fff;
  background: linear-gradient(115deg, #16295E 0%, #1D4ED8 52%, #3B82F6 100%);
  display: flex; align-items: center;
}
.banner-content { padding: 0 52px; position: relative; z-index: 2; max-width: 58%; }
.banner-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  padding: 5px 14px; border-radius: 16px; font-size: 12.5px; letter-spacing: 1px;
  margin-bottom: 16px; backdrop-filter: blur(4px);
}
.banner h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; letter-spacing: 1px; }
.banner p { font-size: 14.5px; opacity: .88; line-height: 1.8; max-width: 480px; }
.banner-caps { display: flex; gap: 26px; margin-top: 22px; }
.banner-caps .cap { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: .92; }
.banner-caps .cap i {
  width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px;
}
.banner-icons { position: absolute; right: 48px; top: 0; bottom: 0; width: 380px; z-index: 1; }
.banner-icons img {
  position: absolute; width: 84px; height: 84px; border-radius: 20px; object-fit: cover;
  box-shadow: 0 14px 34px rgba(6,18,58,.4); border: 3px solid rgba(255,255,255,.9);
  background: #fff;
}
.banner-icons img:nth-child(1) { right: 250px; top: 32px; transform: rotate(-7deg); }
.banner-icons img:nth-child(2) { right: 148px; top: 86px; transform: rotate(5deg); z-index: 2; }
.banner-icons img:nth-child(3) { right: 20px; top: 30px; transform: rotate(9deg); }
.banner-icons img:nth-child(4) { right: 230px; bottom: 30px; transform: rotate(6deg); }
.banner-icons img:nth-child(5) { right: 90px; bottom: 46px; transform: rotate(-5deg); z-index: 2; }
.banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 30%, rgba(255,255,255,.12) 0 140px, transparent 140px),
              radial-gradient(circle at 66% 85%, rgba(255,255,255,.08) 0 180px, transparent 180px);
}
.banner-dots { position: absolute; bottom: 14px; left: 52px; display: flex; gap: 8px; z-index: 3; }
.banner-dots span { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.4); cursor: pointer; transition: .2s; }
.banner-dots span.on { width: 22px; background: #fff; }

/* ---------- 广告条（后台可配置） ---------- */
.ad-bar {
  display: flex; align-items: center; gap: 12px;
  max-width: 1200px; margin: 12px auto 0; padding: 10px 18px;
  background: linear-gradient(100deg, #FFF7E8 0%, #FFEDD1 100%);
  border: 1px solid #FFE1A8; border-radius: 12px;
  font-size: 13.5px; color: #8A5A16;
}
.ad-bar .ad-flag {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #FFA34D, #F07818);
  padding: 2px 7px; border-radius: 6px; letter-spacing: 1px;
}
.ad-bar .ad-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-bar .ad-btn {
  flex-shrink: 0; font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #FF9A3D, #F07818);
  padding: 5px 14px; border-radius: 14px; cursor: pointer; transition: .15s;
}
.ad-bar .ad-close {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #C29A5B; font-size: 12px; cursor: pointer; transition: .15s;
}
.ad-bar .ad-close:hover { background: rgba(0,0,0,.06); color: #8A5A16; }

/* ---------- 分类快捷入口 ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px; background: var(--card); border-radius: var(--radius);
  padding: 18px 10px; box-shadow: var(--shadow);
}
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 4px; border-radius: 12px; cursor: pointer; transition: .18s;
}
.cat-item:hover { background: #F3F6FF; transform: translateY(-2px); }
.cat-icon {
  width: 46px; height: 46px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: 1px;
  transition: .18s;
}
.cat-item:hover .cat-icon { box-shadow: 0 6px 14px rgba(16,42,100,.14); }
.cat-item span { font-size: 12.5px; color: var(--text-2); }

/* ---------- 区块 ---------- */
.section { margin-top: 26px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h3 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-head h3::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: var(--primary); display: inline-block;
}
.section-head .more { font-size: 13px; color: var(--text-3); cursor: pointer; }
.section-head .more:hover { color: var(--primary); }

/* ---------- 应用卡片 ---------- */
.app-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
}
.app-card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px 10px 14px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  position: relative;
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.app-icon-wrap { position: relative; display: inline-block; }
.app-icon {
  width: 62px; height: 62px; border-radius: 15px; margin: 0 auto 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03);
  background: #fff;
}
.app-name {
  font-size: 14px; font-weight: 600; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-dev { font-size: 11.5px; color: var(--text-3); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-meta { font-size: 11.5px; color: var(--text-2); margin-bottom: 9px; }
.app-desc, .app-meta2 { display: none; }  /* 手机端列表专属行（仿小米商店） */
.btn-dl {
  display: inline-block; width: 82%; padding: 7px 0;
  background: linear-gradient(135deg, #3D7BFF, #2B6BFF);
  color: #fff; border-radius: 17px;
  font-size: 12.5px; font-weight: 600; border: none; cursor: pointer;
  transition: .18s;
  box-shadow: 0 3px 8px rgba(43,107,255,.28);
}
.btn-dl:hover { background: linear-gradient(135deg, #2B6BFF, #1E56E0); box-shadow: 0 5px 12px rgba(43,107,255,.36); }
.btn-dl.ghost {
  background: #fff; color: var(--primary); border: 1px solid #C4D5FF;
  box-shadow: none; width: auto; padding: 7px 20px;
}
.btn-dl.ghost:hover { background: #F0F4FF; border-color: var(--primary); }
.own-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: linear-gradient(135deg,#FF8A00,#FF5C00); color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 8px; font-weight: 600;
}

/* 排行榜：三列铺满 */
.rank-list {
  background: var(--card); border-radius: var(--radius);
  padding: 6px 22px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 34px; max-width: 100%; box-sizing: border-box;
}
.rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-bottom: 1px solid var(--border); cursor: pointer;
  border-radius: 12px; transition: background .15s;
}
.rank-item:hover { background: #F6F8FE; }
.rank-list .rank-item:nth-last-child(-n+3) { border-bottom: none; }
.rank-no {
  width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; font-style: normal;
  color: #8A93A8; background: #F1F3F8;
}
.rank-list .rank-item:nth-child(1) .rank-no { background: linear-gradient(135deg,#FF6A5B,#E5372B); color:#fff; box-shadow: 0 3px 8px rgba(229,55,43,.3); }
.rank-list .rank-item:nth-child(2) .rank-no { background: linear-gradient(135deg,#FFA34D,#F07818); color:#fff; box-shadow: 0 3px 8px rgba(240,120,24,.3); }
.rank-list .rank-item:nth-child(3) .rank-no { background: linear-gradient(135deg,#FFC53D,#F5A623); color:#fff; box-shadow: 0 3px 8px rgba(245,166,35,.3); }
.rank-item .app-icon { width: 52px; height: 52px; margin: 0; border-radius: 12px; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-btn {
  padding: 6px 16px; border-radius: 15px; font-size: 12px; font-weight: 600;
  background: #F2F5FB; color: var(--primary); cursor: pointer; border: 1px solid transparent;
  flex-shrink: 0; transition: .15s;
}
.rank-btn:hover { background: var(--primary); color: #fff; }

/* 精品推荐：白底横向卡 */
.feature-scroll {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.feature-card {
  background: var(--card); border-radius: var(--radius); cursor: pointer;
  padding: 16px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
  position: relative; overflow: hidden; min-height: 96px;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(30,60,120,.10); }
.feature-card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3.5px;
  border-radius: 0 3px 3px 0;
  background: var(--fc-color, var(--primary));
}
.feature-card img.fc-icon {
  width: 60px; height: 60px; border-radius: 15px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.03);
}
.fc-info { flex: 1; min-width: 0; }
.fc-tag { font-size: 11px; color: var(--fc-color, var(--primary)); font-weight: 600; letter-spacing: .5px; }
.feature-card h4 { font-size: 16px; font-weight: 700; margin: 3px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-card p { font-size: 12px; color: var(--text-3); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-card .btn-dl { width: auto; padding: 7px 18px; flex-shrink: 0; }

/* ---------- 详情页 ---------- */
.detail-hero {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 34px 0 26px;
}
.detail-top { display: flex; gap: 24px; align-items: flex-start; }
.detail-top .app-icon { width: 108px; height: 108px; border-radius: 24px; margin: 0; flex-shrink: 0; }
.detail-basic { flex: 1; min-width: 0; }
.detail-basic h1 { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-sub { color: var(--text-2); font-size: 14px; margin: 8px 0 16px; }
.detail-stats { display: flex; gap: 38px; margin-bottom: 20px; }
.detail-stat b { display: block; font-size: 17px; }
.detail-stat span { font-size: 12px; color: var(--text-3); }
.btn-dl-big {
  display: inline-block; padding: 12px 46px; border-radius: 24px;
  background: linear-gradient(135deg, #3D7BFF, #2B6BFF);
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; border: none; transition: .18s;
  box-shadow: 0 6px 16px rgba(43,107,255,.32);
}
.btn-dl-big:hover { background: linear-gradient(135deg, #2B6BFF, #1E56E0); box-shadow: 0 8px 20px rgba(43,107,255,.4); }
.btn-dl-big.na {
  background: rgba(120,130,150,.28); color: rgba(255,255,255,.55);
  box-shadow: none;
}
.btn-dl-big.na:hover { background: rgba(120,130,150,.28); box-shadow: none; }
.detail-qr { text-align: center; flex-shrink: 0; }
/* ---------- 详情页（沉浸式深色 hero，仿独立下载页） ---------- */
.d-hero {
  background: linear-gradient(160deg, #1a237e 0%, #283593 35%, #4a35c4 70%, #6a3fd8 100%);
  color: #fff; text-align: center; padding: 30px 20px 46px;
}
.d-badge {
  display: inline-block; font-size: 12px; letter-spacing: 2px;
  color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; padding: 5px 14px; margin-bottom: 20px;
}
.d-hero .app-icon {
  width: 104px; height: 104px; border-radius: 24px; margin: 0 auto 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 4px rgba(255,255,255,.12);
}
.d-hero h1 { font-size: 24px; margin: 14px 0 6px; font-weight: 700; color: #fff; }
.d-sub { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 22px; }
.d-stats { display: flex; justify-content: center; gap: 22px; margin-bottom: 26px; flex-wrap: wrap; }
.d-stats .item { font-size: 12px; color: rgba(255,255,255,.65); }
.d-stats .item b { display: block; font-size: 15px; color: #fff; margin-bottom: 2px; }
.d-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 340px; margin: 0 auto 12px;
  padding: 14px 0; border-radius: 999px;
  font-size: 16px; font-weight: 600; border: none; cursor: pointer;
  font-family: inherit; transition: .15s;
}
.d-btn-android {
  background: linear-gradient(90deg, #2962FF, #7C4DFF);
  color: #fff; box-shadow: 0 8px 22px rgba(64,90,255,.45);
}
.d-btn-ios {
  background: rgba(255,255,255,.14); color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
/* 未上传对应安装包：按钮变灰但文案不变，点击提示 */
.d-btn-android.na {
  background: rgba(255,255,255,.10); color: rgba(255,255,255,.45);
  box-shadow: none;
}
.d-btn-ios.na {
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.4);
  border-color: rgba(255,255,255,.16);
}
.d-tip { font-size: 11px; color: rgba(255,255,255,.5); margin-bottom: 26px; }
.d-qr-card {
  background: rgba(255,255,255,.96); color: #333;
  max-width: 340px; margin: 0 auto 28px; padding: 20px 16px 14px;
  border-radius: 18px; box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.d-qr-card h3 { font-size: 15px; color: #283593; margin-bottom: 12px; }
.d-qr-card { text-align: center; }
.d-qr-card img, .d-qr-card canvas { width: 180px; height: 180px; }
.d-qr-card p { font-size: 11px; color: #888; margin-top: 10px; }
.d-guide { max-width: 380px; margin: 0 auto; text-align: left; }
.d-guide h2 { font-size: 17px; margin-bottom: 14px; text-align: center; color: #fff; }
.d-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.d-tabs button {
  flex: 1; padding: 10px 0; border-radius: 10px; font-size: 13px;
  border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff;
  cursor: pointer; font-family: inherit;
}
.d-tabs button.on { background: rgba(255,255,255,.95); color: #283593; font-weight: 600; border-color: transparent; }
.d-panel { display: none; background: rgba(255,255,255,.1); border-radius: 14px; padding: 18px 16px; }
.d-panel.on { display: block; }
.d-panel ol { padding-left: 20px; }
.d-panel li { font-size: 13px; line-height: 2; color: rgba(255,255,255,.9); }
.d-warn { margin-top: 12px; font-size: 12px; color: #ffd54f; line-height: 1.8; }
.detail-qr img, .detail-qr canvas { width: 108px; height: 108px; border-radius: 8px; }
.detail-qr p { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; margin-top: 18px; }
.detail-card {
  background: var(--card); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.detail-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.detail-card p.intro { font-size: 14px; line-height: 1.9; color: var(--text-2); white-space: pre-line; }
.info-line { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-line:last-child { border-bottom: none; }
.info-line b { width: 88px; color: var(--text-3); font-weight: 400; flex-shrink: 0; }
.info-line span { color: var(--text); }
.notice {
  margin-top: 18px; background: #FFF9EC; border: 1px solid #FFE7B3;
  border-radius: 10px; padding: 12px 16px; font-size: 12.5px; color: #8A6A1F; line-height: 1.8;
}
.stars { color: var(--star); font-size: 13px; letter-spacing: 2px; }

/* 分类页 / 搜索页 */
.page-title { margin: 22px 0 16px; font-size: 22px; font-weight: 700; }
.filter-bar {
  display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap;
}
.chip {
  padding: 7px 18px; border-radius: 18px; font-size: 13px;
  background: var(--card); color: var(--text-2); cursor: pointer;
  border: 1px solid var(--border); transition: .15s;
}
.chip:hover { color: var(--primary); }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.result-count { font-size: 13px; color: var(--text-3); margin-left: 4px; }
.empty {
  background: var(--card); border-radius: var(--radius); padding: 60px 20px;
  text-align: center; color: var(--text-3); box-shadow: var(--shadow);
}
.empty .big { font-size: 44px; margin-bottom: 12px; }

/* 面包屑 */
.crumb { padding-top: 18px; font-size: 13px; color: var(--text-3); }
.crumb a:hover { color: var(--primary); }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 46px; background: var(--card); flex-shrink: 0;
  border-top: 1px solid var(--border); padding: 26px 0;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; gap: 10px;
}
.footer-inner a { color: var(--text-2); margin-right: 18px; }
.footer-inner a:hover { color: var(--primary); }

/* toast */
.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: rgba(20,24,34,.88); color: #fff; padding: 10px 22px;
  border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: .25s; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 手机专属组件（桌面隐藏，样式在 640px 断点内） */
.dl-fixed { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .nav-links { display: none; }
  .detail-body { grid-template-columns: minmax(0, 1fr); }
  .feature-scroll { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-list .rank-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .banner-icons { display: none; }
  .banner-content { max-width: 85%; }
}
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .header-inner { gap: 10px; height: 54px; padding: 0 14px; }
  .logo { gap: 8px; }
  .logo-mark { width: 30px; height: 30px; border-radius: 8px; }
  .logo-text { font-size: 15px; }
  .logo-brand { font-size: 20px; }
  .search-box { padding: 7px 12px; border-radius: 17px; }
  .search-box input { font-size: 16px; }  /* ≥16px 防止 iOS 聚焦时页面自动放大 */
  .search-btn { display: none; }   /* 手机端隐藏文字按钮，回车/键盘搜索键提交 */
  .banner-section { margin-top: 14px; }
  .banner { height: auto; padding: 4px 0 6px; }
  .banner-content { padding: 20px 22px 16px; max-width: 100%; }
  .banner h2 { font-size: 21px; }
  .banner p { font-size: 12.5px; }
  .banner-caps { gap: 12px 16px; margin-top: 14px; flex-wrap: wrap; }
  .banner-caps .cap { font-size: 12px; }
  .section { margin-top: 16px; }
  .section-head { margin-bottom: 9px; }
  .section-head h3 { font-size: 16px; }
  .page-title { font-size: 19px; margin: 18px 0 12px; }
  .chip { padding: 6px 13px; font-size: 12px; border-radius: 16px; }
  .filter-bar { gap: 8px; }
  .result-count { width: 100%; margin: 2px 0 0; }
  .ad-bar { margin: 10px 14px 0; padding: 9px 12px; gap: 8px; font-size: 12.5px; }
  .ad-bar .ad-btn { padding: 4px 10px; font-size: 11.5px; }
  .app-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 6px; }
  .cat-icon { width: 40px; height: 40px; font-size: 15px; }
  .cat-item span { font-size: 12px; }
  .detail-hero { padding: 22px 0 18px; }
  .detail-top { flex-wrap: wrap; }
  .detail-top .app-icon { width: 84px; height: 84px; border-radius: 19px; }
  .detail-basic h1 { font-size: 20px; }
  .detail-sub { font-size: 13px; }
  .detail-stats {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px; margin-bottom: 18px;
  }
  .detail-stat b { font-size: 15px; white-space: nowrap; }
  .detail-stat span { white-space: nowrap; }
  .detail-qr { display: none; }  /* 手机端已在手机上，扫码模块无意义，隐藏 */
  .btn-dl-big { width: 100%; }
  .d-hero { padding: 24px 16px 38px; }
  .d-hero .app-icon { width: 88px; height: 88px; border-radius: 21px; }
  .d-hero h1 { font-size: 21px; }
  .d-stats { gap: 16px; }
  .d-tabs button { font-size: 12px; padding: 9px 0; }
  /* 手机端应用卡片紧凑横排（仿小米商店列表）：图标左 · 名称/简介/下载量中 · 按钮右 */
  .app-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    column-gap: 11px; row-gap: 1px;
    padding: 8px 12px; text-align: left;
    align-items: center;
    border-radius: 12px;
  }
  .app-card .app-icon-wrap { grid-row: 1 / 4; grid-column: 1; }
  .app-card .app-name { grid-column: 2; margin: 0; font-size: 14.5px; }
  .app-card .app-dev { display: none; }
  .app-card .app-meta { display: none; }
  .app-card .app-desc {
    display: block; grid-column: 2; margin: 0; font-size: 11.5px; color: var(--text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .app-card .app-meta2 {
    display: block; grid-column: 2; margin: 0; font-size: 10.5px; color: var(--text-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .app-card .btn-dl {
    grid-row: 1 / 4; grid-column: 3;
    width: auto; padding: 5px 15px; align-self: center;
    font-size: 12px; border-radius: 15px;
  }
  .app-icon { width: 44px; height: 44px; border-radius: 10px; margin: 0; box-shadow: none; }
  /* 手机端详情页吸底下载栏（无底部标签栏，直接贴底） */
  .dl-fixed {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 98;
    display: flex; justify-content: center; padding: 9px 14px env(safe-area-inset-bottom);
    background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .dl-fixed .btn-dl-big { display: block; width: 100%; padding: 11px 0; border-radius: 22px; text-align: center; }
  body.has-dlfix { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .feature-scroll { grid-template-columns: minmax(0, 1fr); }
  .rank-list { grid-template-columns: minmax(0, 1fr); padding: 4px 16px; }
  .rank-list .rank-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .rank-list .rank-item:last-child { border-bottom: none; }
  .rank-item .app-icon { width: 44px; height: 44px; }
  .footer { margin-top: 28px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); flex-shrink: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12px; }
  .toast { top: 66px; width: max-content; max-width: 86vw; text-align: center; }
}

/* ---------- 触屏设备适配（手机优先） ----------
 * 触屏没有真正的「悬停」：点按会触发 :hover 并粘住不还原。
 * 在 hover:none / 粗指针设备上关闭全部悬停位移与变色，
 * 改用 :active 按压反馈（缩放+透明度），手感与正规商店一致。 */
@media (hover: none), (pointer: coarse) {
  .nav-links a:hover { color: var(--text-2); background: transparent; font-weight: 400; }
  .nav-links a.active { color: var(--primary); background: #EEF3FF; font-weight: 600; }
  .cat-item:hover { background: transparent; transform: none; }
  .cat-item:hover .cat-icon { box-shadow: none; }
  .app-card:hover, .feature-card:hover { transform: none; box-shadow: var(--shadow); }
  .rank-item:hover { background: transparent; }
  .chip:hover { color: var(--text-2); }
  .section-head .more:hover, .crumb a:hover, .footer-inner a:hover { color: var(--text-3); }
  .btn-dl:hover { background: linear-gradient(135deg, #3D7BFF, #2B6BFF); box-shadow: 0 3px 8px rgba(43,107,255,.28); }
  .btn-dl.ghost:hover { background: #fff; border-color: #C4D5FF; }
  .btn-dl-big:hover { background: linear-gradient(135deg, #3D7BFF, #2B6BFF); box-shadow: 0 6px 16px rgba(43,107,255,.32); }
  .rank-btn:hover { background: #F2F5FB; color: var(--primary); }
  /* 按压反馈 */
  .app-card:active, .feature-card:active, .rank-item:active, .cat-item:active { transform: scale(.98); }
  .btn-dl:active, .btn-dl-big:active, .d-btn:active, .rank-btn:active, .chip:active { transform: scale(.94); opacity: .85; }
  .app-card:active, .feature-card:active { box-shadow: var(--shadow); }
}
