/* ===========================================================
   机友兽 · iOS 工具与教程站
   style.css
   -----------------------------------------------------------
   简洁白主题 / 移动优先 / 全设备自适应 / 自适应深浅色
   适配要点：
     · iPhone 刘海与底部横条 → env(safe-area-inset-*)
     · iOS 地址栏伸缩 → --app-vh（JS 写入真实可视高度）
     · iOS 输入框聚焦自动放大 → 输入框字号固定 16px
     · 流式字号与栅格 → clamp() / auto-fill
   =========================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --bg:            #ffffff;
  --bg-soft:       #f6f7f9;
  --bg-card:       #ffffff;
  --bg-chip:       #f2f4f7;
  --line:          #e8ecf1;
  --line-strong:   #dbe1e9;

  --ink:           #0e1726;
  --ink-2:         #4a5768;
  --ink-3:         #8b98a9;

  --accent:        #2f6fed;   /* 后台可改 */
  --accent-deep:   #2358c8;
  --accent-soft:   #eef4ff;

  --ok:            #16a34a;
  --warn:          #d97706;

  /* 置顶角标（深浅色各一套，见下方 prefers-color-scheme） */
  --top-bg:        #fff3e0;
  --top-ink:       #b45309;
  --top-line:      #f6dfc0;

  --radius-sm:     10px;
  --radius:        14px;
  --radius-lg:     20px;

  --shadow-sm:     0 1px 2px rgba(14, 23, 38, .04);
  --shadow:        0 1px 2px rgba(14, 23, 38, .04), 0 10px 28px -16px rgba(14, 23, 38, .18);
  --shadow-hover:  0 2px 4px rgba(14, 23, 38, .05), 0 16px 36px -18px rgba(14, 23, 38, .28);

  --header-h:      58px;
  --wrap:          1000px;

  --sa-t: env(safe-area-inset-top, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --app-vh: 1vh;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #14181e;
    --bg-soft:       #1a1f26;
    --bg-card:       #1b2028;
    --bg-chip:       #232932;
    --line:          #2a313b;
    --line-strong:   #363f4b;

    --ink:           #eef2f7;
    --ink-2:         #aab6c6;
    --ink-3:         #7c8899;

    --accent-soft:   #1e293b;

    --top-bg:        #3a2c15;
    --top-ink:       #f0b45f;
    --top-line:      #4d3a1c;

    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .3);
    --shadow:        0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -16px rgba(0, 0, 0, .6);
    --shadow-hover:  0 2px 4px rgba(0, 0, 0, .35), 0 16px 36px -18px rgba(0, 0, 0, .7);
  }
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-soft);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(14px, 0.4vw + 13px, 15.5px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

img { display: block; max-width: 100%; height: auto; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
input, textarea { font: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent-soft); color: var(--accent-deep); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- 3. 通用容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, var(--sa-l));
  padding-right: max(16px, var(--sa-r));
}

.section { padding: 26px 0 4px; }
.section:last-of-type { padding-bottom: 26px; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.sec-title {
  margin: 0;
  font-size: clamp(16px, 0.6vw + 14px, 18px);
  font-weight: 700;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
}

.sec-more { font-size: 13px; color: var(--ink-3); transition: color .18s; white-space: nowrap; }
.sec-more:hover { color: var(--accent); }

.sec-desc { margin: -6px 0 14px; font-size: 13px; color: var(--ink-3); }

/* ---------- 4. 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: calc(var(--header-h) + var(--sa-t));
  padding-top: var(--sa-t);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(20, 24, 30, .86); }
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-name { font-size: 15.5px; font-weight: 700; letter-spacing: .3px; }

.brand-domain {
  font-size: 11px;
  color: var(--ink-3);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.nav a:hover { background: var(--bg-chip); color: var(--ink); }
.nav a.is-active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }

/* ---------- 5. 首屏 ---------- */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: clamp(26px, 5vw, 40px) 0 clamp(22px, 4vw, 34px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(23px, 4.4vw, 32px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.4px;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.hero p {
  margin: 0 0 20px;
  max-width: 560px;
  color: var(--ink-2);
  font-size: clamp(14px, 0.5vw + 13px, 15px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-deep); box-shadow: var(--shadow); }

.btn-ghost { background: var(--bg); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 6. 搜索与筛选 ---------- */
.filter-bar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.search { position: relative; display: flex; align-items: center; }

.search svg {
  position: absolute;
  left: 13px;
  width: 16px; height: 16px;
  stroke: var(--ink-3); fill: none; stroke-width: 2;
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 11px 42px 11px 38px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;   /* iOS 上小于 16px 会触发自动放大 */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .18s, box-shadow .18s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.search-clear {
  position: absolute;
  right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  color: var(--ink-3);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}
.search-clear:hover { background: var(--bg-chip); color: var(--ink); }
.search.has-value .search-clear { display: flex; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 13px;
  transition: all .18s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }

/* ---------- 7. 应用卡片网格 ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
@media (min-width: 520px)  { .app-grid { gap: 12px; } }
@media (min-width: 900px)  { .app-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (min-width: 1400px) { .app-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.app-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.app-card:active { transform: scale(.985); }

.app-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-chip);
  border: 1px solid var(--line);
}

.app-icon--mono {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
  background: hsl(var(--h, 215) 62% 56%);
}

.app-name { font-size: 14.5px; font-weight: 650; line-height: 1.35; }

.app-tag {
  display: inline-block;
  align-self: flex-start;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-chip);
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.6;
}

.app-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: -3px 0 0;
}

.app-card.featured { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); }

.app-card.featured::after {
  content: "推荐";
  position: absolute;
  top: 12px; right: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.7;
}

/* 置顶角标（后台勾了「置顶」的条目）。用 ::before 和「推荐」的 ::after 错开，
   两个同时在时把「推荐」往下让一格，不会叠在一起。 */
.app-card.is-top::before {
  content: "置顶";
  position: absolute;
  top: 12px; right: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--top-bg);
  color: var(--top-ink);
  border: 1px solid var(--top-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.7;
}
.app-card.is-top.featured::after { top: 41px; }

/* ---------- 8. 列表行（系统工具 / 软件源） ---------- */
.row-list { display: flex; flex-direction: column; gap: 9px; }

.row-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s;
}
.row-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.row-icon {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 11px;
  object-fit: cover;
  background: var(--bg-chip);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.row-icon svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; }

.row-body { flex: 1 1 auto; min-width: 0; }

.row-title { font-size: 14.5px; font-weight: 650; line-height: 1.4; }

.row-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-act { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }

.mini-btn {
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  transition: all .18s;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.mini-btn.is-solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.mini-btn.is-solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.mini-btn.is-done { border-color: var(--ok); color: var(--ok); background: transparent; }

/* 窄屏：列表行改为上下排，按钮换行 */
@media (max-width: 400px) {
  .row-item { flex-wrap: wrap; }
  .row-body { flex: 1 1 100%; order: 2; min-width: 0; }
  .row-item .row-icon { order: 1; }
  .row-act { order: 3; flex: 1 1 100%; justify-content: flex-end; margin-top: 2px; }
  .row-desc { white-space: normal; }
}

/* ---------- 9. 社群入口 ---------- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
}
.social-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.social-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg-chip);
  padding: 5px;
}
.social-icon.app-icon--mono { padding: 0; font-size: 15px; }

.social-name { font-size: 13.5px; font-weight: 650; line-height: 1.35; }
.social-sub  { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 10. 教程手风琴 ---------- */
.acc {
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.acc + .acc { margin-top: 10px; }

.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  text-align: left;
  transition: background .18s;
}
.acc-head:hover { background: var(--bg-soft); }

.acc-num {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-title { flex: 1 1 auto; font-size: 14.5px; font-weight: 650; }

.acc-arrow {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  stroke: var(--ink-3); fill: none; stroke-width: 2.2;
  transition: transform .22s;
}
.acc.is-open .acc-arrow { transform: rotate(180deg); }

.acc-body { display: none; padding: 0 16px 17px 52px; font-size: 14px; color: var(--ink-2); }
.acc.is-open .acc-body { display: block; }

.acc-body ol { list-style: decimal; padding-left: 20px; }
.acc-body li { margin: 5px 0; }

@media (max-width: 420px) {
  .acc-body { padding-left: 16px; }
}

.note {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 9%, var(--bg-card));
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------- 11. 通用卡片 ---------- */
.card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }

.card h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 700; }
.card p { margin: 6px 0; color: var(--ink-2); font-size: 14px; }
.card p:last-child { margin-bottom: 0; }

.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.kv dd a { color: var(--accent); }
.kv dd a:hover { text-decoration: underline; }

@media (max-width: 380px) {
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

/* ---------- 12. 空状态 ---------- */
.empty {
  display: none;
  padding: 44px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}
.empty.is-on { display: block; }
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ---------- 13. 页脚 ---------- */
.site-footer {
  margin-top: 34px;
  padding: 26px 0 calc(30px + var(--sa-b));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 16px; }
.foot-nav a { font-size: 13.5px; color: var(--ink-2); }
.foot-nav a:hover { color: var(--accent); }

.foot-info { font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }
.foot-info a { color: var(--ink-2); }
.foot-info a:hover { color: var(--accent); }

.disclaimer {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.75;
}

/* ---------- 14. 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(14px + var(--sa-t));
  z-index: 999;
  transform: translate(-50%, -14px);
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 15. 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: calc(16px + var(--sa-r));
  bottom: calc(20px + var(--sa-b));
  z-index: 40;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, color .18s, border-color .18s;
}
.to-top.is-on { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.to-top svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; }

/* ---------- 16. 页内小工具 ---------- */
.page-hero {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: clamp(22px, 4vw, 30px) 0 clamp(18px, 3vw, 26px);
}
.page-hero h1 { margin: 0 0 8px; font-size: clamp(20px, 3vw, 26px); font-weight: 800; letter-spacing: -.3px; }
.page-hero p  { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 620px; }

.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.crumb a:hover { color: var(--accent); }

.count-hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 12px; }
.count-hint b { color: var(--ink-2); }

/* ---------- 17. 下载弹窗 ---------- */
.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  /* 关掉之后立刻不可点：visibility 的过渡会延后 220ms 生效，
     这段时间里这层看不见的全屏遮罩会把手机上的下一次点击吃掉 */
  pointer-events: none;
  transition: opacity .22s, visibility .22s;
}
.dl-modal.is-on { visibility: visible; opacity: 1; pointer-events: auto; }

.dl-mask {
  position: absolute;
  inset: 0;
  background: rgba(14, 23, 38, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dl-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(var(--app-vh, 1vh) * 90);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px calc(20px + var(--sa-b));
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 40px -12px rgba(14, 23, 38, .3);
  transform: translateY(16px);
  transition: transform .26s cubic-bezier(.32, .72, .28, 1);
}
.dl-modal.is-on .dl-box { transform: translateY(0); }

@media (min-width: 640px) {
  .dl-modal { align-items: center; padding: 20px; }
  .dl-box {
    border-radius: var(--radius-lg);
    padding-bottom: 20px;
    max-height: calc(var(--app-vh, 1vh) * 82);
    transform: translateY(10px) scale(.98);
  }
  .dl-modal.is-on .dl-box { transform: translateY(0) scale(1); }
}

/* 顶部小横条（移动端下拉感） */
.dl-box::before {
  content: "";
  display: block;
  width: 38px; height: 4px;
  margin: -8px auto 14px;
  border-radius: 2px;
  background: var(--line-strong);
}
@media (min-width: 640px) { .dl-box::before { display: none; } }

.dl-x {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dl-x:hover { background: var(--bg-chip); color: var(--ink); }

.dl-head { display: flex; align-items: center; gap: 13px; padding-right: 34px; margin-bottom: 16px; }

.dl-iconwrap {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 15px;
  overflow: hidden;
  background: var(--bg-chip);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dl-icon { width: 56px; height: 56px; object-fit: cover; }

.dl-meta { min-width: 0; }
.dl-name { font-size: 17px; font-weight: 700; line-height: 1.35; }
.dl-tagline { font-size: 12.5px; color: var(--ink-3); }
.dl-tagline:empty { display: none; }

.dl-body {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.dl-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: .3px;
  margin-bottom: 6px;
}
.dl-text { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); }

.dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: background .18s, transform .16s;
}
.dl-btn:hover { background: var(--accent-deep); }
.dl-btn:active { transform: scale(.99); }
.dl-btn.is-off { background: var(--line-strong); pointer-events: none; }

/* 复制链接：主按钮的下级操作，弱化成整行文字动作条，不再是个孤零零的描边小方块 */
.dl-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 9px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 0;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s, color .16s;
  -webkit-tap-highlight-color: transparent;
}
.dl-copy:hover { background: var(--bg-chip); color: var(--ink); }
.dl-copy:active { transform: scale(.995); }
.dl-copy-ico {
  display: flex;
  width: 15px; height: 15px;
  flex: 0 0 auto;
  color: var(--ink-3);
}
.dl-copy-ico svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dl-copy.is-done { background: color-mix(in srgb, var(--ok) 12%, var(--bg-soft)); color: var(--ok); }
.dl-copy.is-done .dl-copy-ico { color: var(--ok); }

.dl-note {
  margin: 13px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- 17.5 下载密码门槛 ---------- */

.dl-pwd {
  margin-bottom: 12px;
  padding: 13px 15px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.dl-pwd-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-deep);
}
.dl-pwd-head svg {
  width: 15px; height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dl-pwd-row { display: flex; gap: 8px; }

/* 字号必须 ≥16px，否则 iOS 聚焦时会自动放大整页 */
.dl-pwd-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.dl-pwd-row input:focus { border-color: var(--accent); }
.dl-pwd-row input.is-bad { border-color: #dc2626; }

.dl-pwd-ok {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.dl-pwd-ok:active { background: var(--accent-deep); }

.dl-pwd-tip {
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
}
.dl-pwd-tip:empty { display: none; }

.dl-pwd-err {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #dc2626;
}

@keyframes dl-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}
.dl-pwd.is-shake { animation: dl-shake .34s ease; }

/* 列表行标题旁的「置顶」小标 */
.row-top {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--top-bg);
  color: var(--top-ink);
  border: 1px solid var(--top-line);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 1px;
}

/* ---------- 18. 超小屏兜底 ---------- */
@media (max-width: 560px) {
  .brand-domain { display: none; }
  .nav a { padding: 7px 9px; font-size: 13.5px; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .app-card { padding: 12px; }
  .dl-box { padding-left: 16px; padding-right: 16px; }
}

/* 横屏矮屏 */
@media (max-height: 480px) and (orientation: landscape) {
  .dl-box { max-height: calc(var(--app-vh, 1vh) * 94); }
}

/* ---------- 19. 广告位 ---------- */
/* 没有配广告时槽位是 display:none，不会留空白、不影响布局 */
.ad-slot { display: none; }
.ad-slot.is-on { display: block; margin: 16px 0; }

.ad-item + .ad-item { margin-top: 10px; }

.ad-badge {
  display: inline-block;
  margin-bottom: 5px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--bg-chip);
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .5px;
  line-height: 1.7;
}

.ad-link {
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
a.ad-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.ad-img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-text {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
}

.ad-html { padding: 12px 14px; }

/* 图片广告的角标压在图上，避免占一行高度 */
.ad-item:has(.ad-img) .ad-badge {
  position: absolute;
  margin: 9px 0 0 9px;
  background: rgba(14, 23, 38, .55);
  color: #fff;
  backdrop-filter: blur(3px);
}
.ad-item:has(.ad-img) { position: relative; }

/* 正文中间的广告位与上下文拉开一点距离 */
.art-body .ad-slot.is-on { margin: 22px 0; }

/* ---------- 20. 文章列表（教程中心） ---------- */

.art-list { display: flex; flex-direction: column; gap: 11px; }

.art-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.art-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.art-card:active { transform: scale(.995); }
.art-card.is-top { border-color: var(--top-line); }

.art-card-cover {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--h, 214) 62% 92%);
  color: hsl(var(--h, 214) 46% 40%);
  font-size: 30px;
  font-weight: 800;
}
.art-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card-cover.has-img { background: var(--bg-soft); }

.art-card-body { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }

.art-card-title {
  margin: 0 0 5px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

/* 摘要最多两行，卡片高度就齐了 */
.art-card-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.art-card-meta {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.art-top {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--top-bg);
  color: var(--top-ink);
  border: 1px solid var(--top-line);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 1px;
}

.art-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-chip);
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.7;
}

/* ---------- 21. 文章详情 ---------- */

.art { padding: 22px 0 4px; }

.art-h1 {
  margin: 0 0 10px;
  font-size: clamp(21px, 3.4vw, 29px);
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -.3px;
}

.art-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.art-cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.art-body { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }

.art-body h2 {
  margin: 26px 0 10px;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.5;
  color: var(--ink);
  padding-left: 11px;
  border-left: 3px solid var(--accent);
}
.art-body h2:first-child { margin-top: 4px; }
.art-body h3 { margin: 20px 0 8px; font-size: 16px; font-weight: 700; color: var(--ink); }
.art-body h4 { margin: 16px 0 6px; font-size: 14.5px; font-weight: 700; color: var(--ink); }

.art-body p { margin: 12px 0; }
.art-body ul, .art-body ol { margin: 12px 0; padding-left: 22px; }
.art-body ul { list-style: disc; }
.art-body ol { list-style: decimal; }
.art-body li { margin: 6px 0; }
.art-body li::marker { color: var(--accent); }

.art-body strong { color: var(--ink); font-weight: 700; }

.art-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.art-body blockquote {
  margin: 16px 0;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 14.5px;
}

.art-body code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-chip);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  color: var(--accent-deep);
}

.art-body .art-pre {
  margin: 16px 0;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.art-body .art-pre code { padding: 0; background: none; color: var(--ink-2); font-size: 13px; line-height: 1.7; }

.art-body hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }

.art-figure { margin: 16px 0; }
.art-body .art-img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.art-figure figcaption { margin-top: 7px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

.art-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.art-foot .btn { flex: 1 1 auto; }

.art-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.art-nav-item {
  min-width: 0;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.art-nav-item span { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 2px; }
.art-nav-item:hover { border-color: var(--accent); color: var(--accent); }
.art-nav-item.is-next { text-align: right; }

.rel-list { display: flex; flex-direction: column; gap: 9px; }
.rel-item {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  transition: border-color .18s, background .18s;
}
.rel-item:hover { border-color: var(--accent); background: var(--bg-soft); }
.rel-title { display: block; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.rel-desc {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty a { color: var(--accent); text-decoration: underline; }

/* ---------- 22. 文章相关的小屏兜底 ---------- */
@media (max-width: 560px) {
  .art-card { gap: 11px; padding: 11px; }
  .art-card-cover { width: 74px; height: 74px; font-size: 24px; }
  .art-card-title { font-size: 14.5px; }
  .art-card-desc { font-size: 13px; -webkit-line-clamp: 2; }
  .art-body { font-size: 16px; }
  .art-nav { grid-template-columns: 1fr; }
  .art-nav-item.is-next { text-align: left; }
}
@media (max-width: 360px) {
  .art-card-cover { width: 62px; height: 62px; font-size: 20px; }
}

/* 超大屏 */
@media (min-width: 1600px) {
  :root { --wrap: 1080px; }
}

/* 横屏 iPhone 左右安全区 */
@supports (padding: max(0px)) {
  .site-header .wrap,
  .hero .wrap,
  .site-footer .wrap { padding-left: max(16px, var(--sa-l)); padding-right: max(16px, var(--sa-r)); }
}

/* 尊重"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ===========================================================
   23. 应用列表（列表式布局）
   -----------------------------------------------------------
   原来应用页是卡片网格，改成一行一个的列表：
   图标 + 名称/标签 + 一句话说明 + 右箭头，手机上更好读。
   =========================================================== */

.app-list { display: flex; flex-direction: column; gap: 9px; }

.app-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.app-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.app-row:active { transform: scale(.995); }
.app-row.is-top { border-color: color-mix(in srgb, var(--top-ink) 26%, var(--line)); }

.app-row-icon { flex: 0 0 auto; display: flex; }
.app-row-icon .app-icon { width: 46px; height: 46px; border-radius: 13px; }

.app-row-main { flex: 1 1 auto; min-width: 0; }

.app-row-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.app-row-name { font-size: 15px; font-weight: 650; line-height: 1.35; }

.app-row-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-row-flag {
  font-size: 11px;
  line-height: 1.5;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
  white-space: nowrap;
}
.app-row-flag.is-top { background: var(--top-bg); border-color: var(--top-line); color: var(--top-ink); }
.app-row-flag.is-hot {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  color: var(--accent);
}

.app-row-go {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-chip);
  color: var(--ink-3);
  transition: background .18s, color .18s;
}
.app-row-go svg {
  width: 17px; height: 17px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.app-row:hover .app-row-go { background: var(--accent); color: #fff; }

@media (max-width: 420px) {
  .app-row { gap: 11px; padding: 11px 11px; }
  .app-row-icon .app-icon { width: 42px; height: 42px; border-radius: 12px; }
  .app-row-name { font-size: 14.5px; }
  .app-row-go { width: 26px; height: 26px; }
}

/* -----------------------------------------------------------
   23b. 应用网格（首页可选排版） + 加载更多
   -----------------------------------------------------------
   首页「推荐应用」可以在后台选两种排版：
     · 列表式 = 上面的 .app-list / .app-row
     · 网格   = 这里的 .app-grid / .app-tile
   网格的列数由 JS 写进 --cols（电脑端）与 --cols-m（手机端），
   手机端还可以用 is-rowlimit + .is-over 只留前几行。
   ----------------------------------------------------------- */

.app-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}

.app-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  min-width: 0;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.app-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.app-tile:active { transform: scale(.985); }
.app-tile.is-top { border-color: color-mix(in srgb, var(--top-ink) 26%, var(--line)); }

.app-tile-icon { flex: 0 0 auto; display: flex; }
.app-tile-icon .app-icon { width: 46px; height: 46px; border-radius: 13px; }

.app-tile-body { flex: 1 1 auto; min-width: 0; }
.app-tile-name {
  font-size: 14px; font-weight: 650; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-tile-desc {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-tile-top {
  position: absolute;
  top: 7px; right: 7px;
  font-size: 10px; line-height: 1.6;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--top-bg);
  border: 1px solid var(--top-line);
  color: var(--top-ink);
}

/* 手机端：紧凑图标墙，每行几个由后台设定 */
@media (max-width: 720px) {
  .app-grid { grid-template-columns: repeat(var(--cols-m, 5), minmax(0, 1fr)); gap: 8px; }
  .app-grid.is-rowlimit .app-tile.is-over { display: none; }
  .app-tile { flex-direction: column; gap: 7px; padding: 10px 4px; text-align: center; }
  .app-tile-icon { width: 100%; justify-content: center; }
  .app-tile-icon .app-icon { width: 100%; max-width: 58px; height: auto; aspect-ratio: 1 / 1; border-radius: 15px; }
  .app-tile-body { width: 100%; }
  .app-tile-name {
    font-size: 11.5px; font-weight: 600; line-height: 1.4;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .app-tile-desc { display: none; }
  .app-tile-top { top: 3px; right: 3px; font-size: 9.5px; padding: 0 3px; }
}

/* 加载更多（应用页分页） */
.list-more { display: flex; justify-content: center; margin-top: 14px; }
.list-more[hidden] { display: none; }
.list-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-2);
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.list-more-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.list-more-btn:active { transform: scale(.985); }
.list-more-num { font-size: 12px; color: var(--ink-3); }
.list-more-btn:hover .list-more-num { color: inherit; opacity: .75; }

/* ===========================================================
   24. 首页滚动公告
   =========================================================== */

.notice-bar {
  background: var(--accent-soft);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
}
.notice-bar[hidden] { display: none; }

.notice-bar > .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.notice-label {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 7px;
  white-space: nowrap;
}

.notice-track {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

.notice-runner {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: notice-scroll linear infinite;
}
.notice-bar:hover .notice-runner { animation-play-state: paused; }

@keyframes notice-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.notice-item {
  display: inline-block;
  padding: 0;
  font-size: 13px;
  color: var(--accent-deep);
  vertical-align: middle;
  text-align: left;
}
.notice-item:hover { text-decoration: underline; }
.notice-dot { display: inline-block; margin: 0 14px; color: var(--ink-3); }

.notice-close {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
}
.notice-close svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round;
}
.notice-close:hover { background: var(--bg-chip); color: var(--ink); }

@media (max-width: 420px) {
  .notice-item { font-size: 12.5px; }
  .notice-bar > .wrap { gap: 8px; }
}

/* 通知弹窗（复用下载弹窗的骨架，换个图标底色） */
.notice-modal .dl-iconwrap {
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.notice-modal .dl-iconwrap svg {
  width: 27px; height: 27px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ===========================================================
   25. 说明文案块（收录说明 / 使用提示 / 免责声明 / 更新日志）
   =========================================================== */

.notes-wrap { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.notes-wrap:empty { display: none; }
.notes-wrap[data-notes="apps"], .notes-wrap[data-notes="about"] { margin-top: 0; }

.note-body { font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.note-body > *:first-child { margin-top: 0; }
.note-body > *:last-child { margin-bottom: 0; }
.note-body p { margin: 8px 0; }
.note-body h2, .note-body h3, .note-body h4 { margin: 14px 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.note-body ul, .note-body ol { margin: 8px 0; padding-left: 21px; list-style: disc; }
.note-body ol { list-style: decimal; }
.note-body li { margin: 4px 0; }
.note-body ul ul { list-style: circle; }
.note-body strong { font-weight: 700; color: var(--ink); }
.note-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.note-body img { margin: 10px 0; border-radius: 10px; }
.note-body code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-chip);
  font-size: 12.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.note-body blockquote {
  margin: 10px 0;
  padding: 9px 13px;
  border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0;
  background: var(--bg-soft);
  color: var(--ink-2);
}
.note-body hr { margin: 14px 0; border: 0; border-top: 1px solid var(--line); }

/* ===========================================================
   26. 密码"免输期"提示
   =========================================================== */

.dl-pwd-remember { margin: 7px 0 0; font-size: 12px; color: var(--ok); }
.dl-pwd-remember[hidden] { display: none; }

/* ===========================================================
   27. 防扒（后台「站点设置 → 防扒」控制，strict 档生效）
   =========================================================== */

html.guard-strict,
html.guard-strict body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
html.guard-strict img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}
html.guard-strict input,
html.guard-strict textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* 减少动态效果时，公告改成"可横向手动滑动"，不自动跑 */
@media (prefers-reduced-motion: reduce) {
  .notice-runner { animation: none !important; }
  .notice-track { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

