/* =========================================================
   MIRROR HUB · 系统镜像目录站 样式样板（home.css）
   纯 HTML5 + CSS3，无框架、无构建工具
   三页共用：index.php / pages/devices.php / pages/device.php
   ========================================================= */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 颜色 */
  --bg:            #0B0D12;
  --surface:       #14171F;
  --surface-2:     #191D27;
  --surface-hover: #1D222D;
  --line:          rgba(255, 255, 255, .07);
  --line-strong:   rgba(255, 255, 255, .12);

  --text:          #E6E9F0;
  --text-muted:    #8A93A6;
  --text-dim:      #626B7E;

  --teal:          #4DE1C1;
  --violet:        #7C5CFF;
  --grad:          linear-gradient(135deg, var(--teal), var(--violet));
  --grad-soft:     linear-gradient(135deg, rgba(77,225,193,.16), rgba(124,92,255,.16));

  /* 尺寸 */
  --radius:        14px;
  --radius-sm:     10px;
  --radius-pill:   999px;
  --gutter:        24px;
  --sidebar-w:     260px;

  --ease:          cubic-bezier(.4, 0, .2, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 12% -8%,  rgba(124, 92, 255, .10), transparent 60%),
    radial-gradient(760px 460px at 96% 0%,   rgba(77, 225, 193, .08), transparent 62%),
    var(--bg);
  color: var(--text);
  font: 400 14px/1.55 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
}

/* 极淡网格纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 44px 44px;
}

h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

/* 统一焦点样式（键盘可达） */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 3. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease),
              box-shadow .18s var(--ease), transform .18s var(--ease);
}
.btn--ghost {
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }

.btn--primary {
  color: #07100E;
  background: var(--grad);
  font-weight: 600;
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(77,225,193,.28); }

.btn--sm { height: 30px; padding: 0 14px; font-size: 12.5px;
  color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--sm:hover { color: var(--text); background: var(--surface-2); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn.is-on { color: var(--teal); }

.link-btn {
  font-size: 12.5px;
  color: var(--text-dim);
  transition: color .18s var(--ease);
}
.link-btn:hover { color: var(--teal); }

/* 渐变描边（用 padding-box/border-box 双层背景模拟） */
.grad-outline {
  box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
}
.grad-outline::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .55;
  pointer-events: none;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 12px; color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.chip--removable button {
  font-size: 10px; color: var(--text-dim); padding: 0; line-height: 1;
}
.chip--removable a {
  font-size: 10px; color: var(--text-dim); padding: 0; line-height: 1;
  transition: color .15s var(--ease);
}
.chip--removable:hover { color: var(--teal); box-shadow: inset 0 0 0 1px rgba(77,225,193,.45); }
.chip--removable a:hover { color: var(--teal); }
.chip--ok { color: var(--teal); box-shadow: inset 0 0 0 1px rgba(77,225,193,.32); }
.chip--warn { color: #FFB547; box-shadow: inset 0 0 0 1px rgba(255,181,71,.40); }

/* ---------- 4. 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 13, 18, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1440px; margin: 0 auto;
  height: 62px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--grad);
  box-shadow: 0 0 16px rgba(77,225,193,.35);
}
.logo__text {
  font-size: 15px; font-weight: 700; letter-spacing: 1.2px;
}
.logo__text span { color: var(--teal); font-weight: 600; }

/* 主导航（三页统一） */
.topbar__nav { display: flex; align-items: center; gap: 4px; flex: none; }
.topbar__nav a {
  padding: 6px 11px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted);
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.topbar__nav a:hover { color: var(--text); background: var(--surface-2); }
.topbar__nav a.is-active { color: var(--teal); background: var(--grad-soft); }

.search { flex: 1; max-width: 560px; position: relative; }
.search__icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--text-dim);
  stroke-width: 1.7; stroke-linecap: round;
}
.search__input {
  width: 100%; height: 38px;
  padding: 0 62px 0 38px;
  border: 0; border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text); font-size: 13.5px;
  transition: box-shadow .2s var(--ease), background .2s var(--ease);
}
.search__input::placeholder { color: var(--text-dim); }
.search__input:focus {
  outline: 0;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(77,225,193,.55), 0 0 0 3px rgba(77,225,193,.10);
}
.search__kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 2px 7px; border-radius: 6px;
  font: 600 10.5px/1.4 ui-monospace, monospace;
  color: var(--text-dim);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.topbar__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ---------- 5. 分类标签 ---------- */
.tabs { border-bottom: 1px solid var(--line); }
.tabs__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.tabs__inner::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; padding: 0 15px;
  border-radius: var(--radius-pill);
  font-size: 13px; color: var(--text-muted);
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab em { font-style: normal; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tab.is-active {
  color: var(--text); font-weight: 500;
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px rgba(77,225,193,.45);
}
.tab.is-active em { color: var(--teal); }

/* ---------- 6. 主体布局 ---------- */
.layout {
  position: relative; z-index: 1;
  max-width: 1440px; margin: 0 auto;
  padding: var(--gutter);
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
}

/* ---------- 7. 左侧筛选栏 ---------- */
.filters { position: sticky; top: 86px; }

.filters__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.filters__title { font-size: 13px; font-weight: 600; letter-spacing: .4px; }

.filters__applied { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.filter-search input {
  width: 100%; height: 32px; margin-bottom: 14px;
  padding: 0 12px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12.5px;
}
.filter-search input::placeholder { color: var(--text-dim); }
.filter-search input:focus { outline: 0; box-shadow: inset 0 0 0 1px rgba(77,225,193,.5); }

.fgroup {
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--line);
  background: rgba(20, 23, 31, .55);
  margin-bottom: 8px;
  overflow: hidden;
}
.fgroup__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  font-size: 12.5px; font-weight: 500; color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background .18s var(--ease);
}
.fgroup__head::-webkit-details-marker { display: none; }
.fgroup__head::before {
  content: ""; width: 5px; height: 5px; margin-right: 8px;
  border-right: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
  transform: rotate(-45deg);
  transition: transform .2s var(--ease);
}
.fgroup__head span { flex: 1; }
.fgroup__head:hover { background: var(--surface-hover); }
.fgroup[open] .fgroup__head::before { transform: rotate(45deg); }
.fgroup__head em {
  font-style: normal; font-size: 11px; color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.fgroup__list { padding: 2px 8px 10px; }
.fgroup__list label {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-muted);
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.fgroup__list label:hover { background: var(--surface-hover); color: var(--text); }
.fgroup__list label span { flex: 1; }
.fgroup__list label em {
  font-style: normal; font-size: 11px; color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* 自定义复选框 */
.fgroup__list input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px; flex: none;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: transparent;
  transition: background .16s var(--ease), box-shadow .16s var(--ease);
}
.fgroup__list input[type="checkbox"]:checked {
  background: var(--grad);
  box-shadow: 0 0 10px rgba(77,225,193,.35);
}
.fgroup__list input[type="checkbox"]:checked + span { color: var(--text); }

/* 链接式筛选项（列表页用，等价于可点击的复选行） */
.fgroup__link {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-muted);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.fgroup__link::before {
  content: ""; width: 15px; height: 15px; flex: none;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: transparent;
  transition: background .16s var(--ease), box-shadow .16s var(--ease);
}
.fgroup__link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fgroup__link em { font-style: normal; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; flex: none; }
.fgroup__link:hover { background: var(--surface-hover); color: var(--text); }
.fgroup__link.is-active { color: var(--text); }
.fgroup__link.is-active::before { background: var(--grad); box-shadow: 0 0 10px rgba(77,225,193,.35); }

/* ---------- 8. 工具条 ---------- */
/* 右主列：min-width:0 防止等宽文件名撑破 grid */
.results { min-width: 0; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.toolbar__count { font-size: 12.5px; color: var(--text-muted); }
.toolbar__count strong {
  color: var(--teal); font-weight: 600; font-variant-numeric: tabular-nums;
}
.toolbar__right { display: flex; align-items: center; gap: 6px; }

.select {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
.select select {
  border: 0; background: transparent; color: var(--text);
  font-size: 12.5px; outline: 0; cursor: pointer;
}
.select select option { background: var(--surface); color: var(--text); }

/* ---------- 9. 分组与条目 ---------- */
.group { margin-top: 18px; }
.group__head {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .6px;
  color: var(--text-muted); text-transform: uppercase;
}
.group__bar {
  width: 3px; height: 13px; border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(77,225,193,.4);
}
.group__head em {
  font-style: normal; font-weight: 400; font-size: 11px;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
}

.rows { box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); overflow: hidden; }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 16px;
  background: var(--surface);
  transition: background .18s var(--ease);
}
.row + .row { box-shadow: inset 0 1px 0 var(--line); }
.row::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .18s var(--ease);
}
.row:hover { background: var(--surface-hover); }
.row:hover::before, .row.is-active::before { opacity: 1; }
.row.is-active { background: var(--surface-hover); }

.badge {
  justify-self: start;
  padding: 3px 8px; border-radius: 6px;
  font: 600 10.5px/1.4 ui-monospace, "SF Mono", monospace;
  letter-spacing: .3px;
  color: var(--teal);
  background: rgba(77, 225, 193, .10);
  box-shadow: inset 0 0 0 1px rgba(77, 225, 193, .28);
}
.badge--alt {
  color: var(--violet);
  background: rgba(124, 92, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .30);
}

.row__main { min-width: 0; }
.row__name {
  display: block;
  font: 500 13.5px/1.45 ui-monospace, "SF Mono", "Cascadia Code", monospace;
  color: #7FE7D6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .16s var(--ease);
}
.row__name:hover, .row.is-active .row__name { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

.row__meta {
  margin-top: 4px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.row__meta i { font-style: normal; color: rgba(255,255,255,.14); }
.row__meta-accent { color: rgba(77, 225, 193, .78); }
.row__meta-warn { color: #FFB547; }

.row__actions { display: flex; align-items: center; gap: 6px; }
.row .row__actions .btn--sm { opacity: .55; transition: opacity .18s var(--ease); }
.row:hover .row__actions .btn--sm,
.row.is-active .row__actions .btn--sm { opacity: 1; }

/* ---------- 10. 分页 ---------- */
.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; padding: 26px 0 8px; }
.page {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: all .18s var(--ease);
}
.page:hover:not(:disabled):not(.is-active) { color: var(--text); background: var(--surface-2); }
.page.is-active {
  color: #07100E; font-weight: 600; background: var(--grad);
  box-shadow: 0 4px 14px rgba(77,225,193,.25);
}
.page:disabled, .page[disabled] { opacity: .35; cursor: not-allowed; }
.page--gap { box-shadow: none; color: var(--text-dim); cursor: default; }

/* 空状态 */
.empty-state {
  padding: 48px 20px; text-align: center; color: var(--text-muted);
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface);
}
.empty-state p + p { margin-top: 12px; }

/* ---------- 11. 页脚（三页统一） ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 20px; }
.footer__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 32px var(--gutter) 26px;
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  align-items: start; gap: 40px;
  font-size: 12px; color: var(--text-dim);
}
.footer__brand { min-width: 0; }
.footer__slogan { margin-top: 10px; font-size: 12px; color: var(--text-dim); max-width: 220px; }
/* style.css 里的 .footer{text-align:center} 会让移动端页脚整体居中, 此处显式左对齐 */
.footer, .footer__inner { text-align: left; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col-title { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.footer .footer__col-title { margin-bottom: 0; }
.footer__col a { font-size: 12px; color: var(--text-dim); transition: color .18s var(--ease); }
.footer__col a:hover { color: var(--teal); }
.footer__bar { border-top: 1px solid var(--line); }
.footer__bar p {
  max-width: 1440px; margin: 0 auto;
  padding: 16px var(--gutter);
  font-size: 11.5px; color: var(--text-dim);
}

/* 页脚响应式（三页统一） */
@media (max-width: 1024px) {
  .footer__inner { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 28px var(--gutter) 22px; }
}
@media (max-width: 860px) {
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
  .footer__col { gap: 7px; }
}
@media (max-width: 520px) {
  /* 窄屏保留两列: 四组链接堆成一列会把页脚拉得很长 */
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .footer__inner { gap: 18px; padding: 22px var(--gutter) 18px; }
  .footer__slogan { max-width: none; }
  .footer__bar p { padding-right: 68px; }   /* 避开右下角悬浮的「返回顶部」按钮 */
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1180px) {
  .topbar__nav { display: none; }        /* 窄屏收起主导航，保留 logo + 搜索 + 操作 */
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  .search { max-width: 380px; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .fgroup { display: none; }
  .fgroup[open] { display: block; }   /* 窄屏默认折叠，展开才显示 */
  /* 移动端: 徽标 / 内容 / 操作 同排, 避免「查看」按钮独占一行 */
  .row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px 11px 14px; }
  .row__actions { justify-content: flex-end; }
  .row .row__actions .btn--sm { opacity: 1; }   /* 触屏无 hover, 操作按钮保持常亮 */
  .topbar__inner { height: auto; padding: 12px var(--gutter); flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .topbar__actions { margin-left: auto; }
}

@media (max-width: 520px) {
  .row__meta { font-size: 11.5px; }
  .toolbar { flex-wrap: wrap; }
  .pager { gap: 6px; padding: 20px 0 4px; }
  .page { min-width: 30px; height: 30px; padding: 0 9px; font-size: 12.5px; }
}

/* ---------- 13. 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* =========================================================
   14. 首页专属模块（index.php）—— 仪表盘式布局
   ========================================================= */

/* ---------- 14.1 公告条 ---------- */
.notice {
  position: relative; z-index: 1;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 23, 31, .5);
}
.notice__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 9px var(--gutter);
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-muted);
}
.notice__dot {
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.notice__text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice__more { flex: none; font-size: 12.5px; color: var(--teal); transition: opacity .18s var(--ease); }
.notice__more:hover { opacity: .75; }

/* ---------- 14.2 顶部数据卡片 ---------- */
.stats { position: relative; z-index: 1; }
.stats__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 22px var(--gutter) 4px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat {
  position: relative;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.stat::after { opacity: .30; transition: opacity .2s var(--ease); }
.stat:hover { background: var(--surface-hover); transform: translateY(-2px); }
.stat:hover::after { opacity: 1; }

.stat__label { font-size: 12.5px; color: var(--text-dim); }
.stat__num {
  margin-top: 8px;
  font: 600 30px/1.15 "Inter", system-ui, sans-serif;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__delta { margin-top: 8px; font-size: 11.5px; color: var(--text-dim); }
.stat__delta .up { color: var(--teal); font-weight: 500; }
.stat__delta .ok { color: #3DDC97; }

/* ---------- 14.3 分类快捷条 ---------- */
.catbar { position: relative; z-index: 1; }
.catbar__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 16px var(--gutter) 0;
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.catbar__inner::-webkit-scrollbar { display: none; }
.catpill {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 13px; color: var(--text-muted);
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.catpill em { font-style: normal; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.catpill:hover { color: var(--text); background: var(--surface); }
.catpill.is-active {
  color: var(--text); font-weight: 500;
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px rgba(77,225,193,.45);
}
.catpill.is-active em { color: var(--teal); }

/* ---------- 14.4 首页主体双栏 ---------- */
.home { position: relative; z-index: 1; }
.home__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 28px var(--gutter) 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gutter);
  align-items: start;
}

/* 左主列：min-width:0 防止等宽文件名撑破 grid */
.home__main { min-width: 0; }

.section__title { font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.section__head--spaced { margin-top: 34px; }
.section__more { font-size: 12.5px; color: var(--text-dim); transition: color .18s var(--ease); }
.section__more:hover { color: var(--teal); }

/* ---------- 14.5 热门发行版卡片网格 ---------- */
.dgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 12px;
}
.dcard {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.dcard::after { opacity: .28; transition: opacity .2s var(--ease); }
.dcard:hover, .dcard.is-hover { background: var(--surface-hover); transform: translateY(-3px); }
.dcard:hover::after, .dcard.is-hover::after { opacity: 1; }

.dcard__top { display: flex; align-items: center; gap: 10px; }
.dcard__logo {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  font: 600 16px/1 "Inter", sans-serif;
  color: var(--teal);
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px rgba(77,225,193,.22);
}
.dcard__id { min-width: 0; flex: 1; }
.dcard__name { font-size: 14px; font-weight: 500; }
.dcard__sub {
  margin-top: 2px; font-size: 11.5px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dcard__count {
  flex: none;
  font-size: 12.5px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dcard__ver {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  box-shadow: inset 0 0 0 1px var(--line);
}
.dcard__ver-main {
  font: 500 13px/1.4 ui-monospace, "SF Mono", monospace;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dcard__size { flex: none; font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.dcard__foot { display: flex; align-items: center; gap: 6px; }
.dcard__go {
  margin-left: auto;
  font-size: 11.5px; color: var(--text-dim);
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.dcard:hover .dcard__go, .dcard.is-hover .dcard__go { color: var(--teal); transform: translateX(3px); }

/* ---------- 14.6 最新同步列表 ---------- */
.feed {
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
  overflow: hidden;
}
.feed__row {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 92px 76px 78px 58px auto;
  align-items: center; gap: 12px;
  padding: 12px 14px;
  transition: background .18s var(--ease);
}
.feed__row + .feed__row { box-shadow: inset 0 1px 0 var(--line); }
.feed__row:hover, .feed__row.is-hover { background: var(--surface-hover); }

.feed__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(77,225,193,.35);
  transition: background .18s var(--ease), box-shadow .18s var(--ease);
}
.feed__row:hover .feed__dot, .feed__row.is-hover .feed__dot {
  background: var(--teal); box-shadow: 0 0 8px var(--teal);
}

.feed__name {
  font: 500 13px/1.4 ui-monospace, "SF Mono", monospace;
  color: #7FE7D6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed__name:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.feed__tag { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.feed__size, .feed__time {
  font-size: 11.5px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; text-align: right;
}
.feed__src {
  justify-self: end;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; color: var(--violet);
  background: rgba(124, 92, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .26);
}

/* ---------- 14.7 右侧面板 ---------- */
.home__side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
.panel {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(20, 23, 31, .55);
  box-shadow: inset 0 0 0 1px var(--line);
}
.panel__title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .4px;
  color: var(--text-muted);
}
.panel__title::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px;
  background: var(--grad); box-shadow: 0 0 8px rgba(77,225,193,.4);
}
.panel__more { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--text-dim); transition: color .18s var(--ease); }
.panel__more:hover { color: var(--teal); }

/* 快速入口 */
.quick li + li { margin-top: 2px; }
.quick a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text);
  transition: background .18s var(--ease), padding-left .18s var(--ease);
}
.quick a span { font-size: 11.5px; color: var(--text-dim); }
.quick a:hover { background: var(--surface-hover); padding-left: 14px; }
.quick a:hover span { color: var(--teal); }

/* 仓库源状态 */
.mirrors li + li { margin-top: 2px; }
.mirror {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 12.5px;
  transition: background .18s var(--ease);
}
.mirror:hover { background: var(--surface-hover); }
.mirror__dot {
  width: 7px; height: 7px; flex: none; border-radius: 50%;
  background: #3DDC97; box-shadow: 0 0 8px #3DDC97;
}
.mirror--warn .mirror__dot { background: #FFB547; box-shadow: 0 0 8px #FFB547; animation: pulse 1.8s var(--ease) infinite; }
.mirror__name { flex: 1; color: var(--text-muted); }
.mirror__ms { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* 本周热门 */
.top__item {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) 56px;
  align-items: center; gap: 10px;
  padding: 8px 0;
  font-size: 12.5px;
}
.top__rank {
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 6px;
  font: 600 11px/1 "Inter", sans-serif;
  color: var(--text-dim);
  background: var(--surface-2);
}
.top__rank--1 { color: #07100E; background: var(--grad); }
.top__name {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .18s var(--ease);
}
.top__name:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.top__num { text-align: right; font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------- 14.8 首页响应式 ---------- */
@media (max-width: 1180px) {
  .stats__inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .home__inner { grid-template-columns: minmax(0, 1fr); }
  .home__side { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .stats__inner { padding-top: 16px; }
  .stat__num { font-size: 26px; }
  .dgrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .home__side { grid-template-columns: 1fr; }
  .feed__row { grid-template-columns: 8px minmax(0, 1fr) 76px auto; row-gap: 4px; }
  .feed__tag, .feed__time { display: none; }
}
@media (max-width: 560px) {
  .stats__inner { grid-template-columns: 1fr; gap: 10px; }
  .dgrid { grid-template-columns: 1fr; }
  .feed__row { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .feed__size { display: none; }
  .notice__more { display: none; }
}

/* =========================================================
   15. 内容页 / 镜像详情页（device.php）
   ========================================================= */

/* ---------- 15.1 面包屑 ---------- */
.crumbs {
  position: relative; z-index: 1;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 23, 31, .5);
}
.crumbs__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 11px var(--gutter);
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim);
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.crumbs__inner::-webkit-scrollbar { display: none; }
.crumbs__inner a { transition: color .18s var(--ease); }
.crumbs__inner a:hover { color: var(--teal); }
.crumbs__sep { color: rgba(255,255,255,.18); }
.crumbs__now { color: var(--text-muted); }

/* ---------- 15.2 详情页布局 ---------- */
.detail { position: relative; z-index: 1; }
.detail__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 26px var(--gutter) 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gutter);
  align-items: start;
}
.detail__main { min-width: 0; }
.detail__side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }

/* ---------- 15.3 文件头 ---------- */
.dhead { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.dhead__top { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.dhead__name {
  margin-top: 12px;
  font: 600 22px/1.35 ui-monospace, "SF Mono", "Cascadia Code", monospace;
  letter-spacing: -.2px;
  word-break: break-all;
}
.dhead__sub { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.dhead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }

/* ---------- 15.4 内容区块 ---------- */
.dblock { margin-top: 26px; }
.dblock__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.dblock__title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .4px;
  color: var(--text-muted);
}
.dblock__title::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px;
  background: var(--grad); box-shadow: 0 0 8px rgba(77,225,193,.4);
}
.dblock__head .dblock__title { margin-bottom: 0; }
.dblock__subtitle { margin: 14px 0 8px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.dblock__note { margin-top: 10px; font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }

/* ---------- 15.5 基本信息表 ---------- */
.dtable {
  margin: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
  overflow: hidden;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dtable__row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 12px 16px;
}
.dtable__row:nth-child(odd) { box-shadow: inset -1px 0 0 var(--line); }
.dtable__row:nth-child(n+3) { box-shadow: inset 0 1px 0 var(--line); }
.dtable__row:nth-child(odd):nth-child(n+3) { box-shadow: inset -1px 0 0 var(--line), inset 0 1px 0 var(--line); }
.dtable dt { flex: none; width: 72px; font-size: 12px; color: var(--text-dim); }
.dtable dd {
  margin: 0; flex: 1; min-width: 0;
  font-size: 13px; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dtable dd code {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px; color: var(--text-muted);
  background: var(--surface-2);
  padding: 1px 6px; border-radius: 5px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.dtable__dim { color: var(--text-dim); font-size: 11.5px; }

/* ---------- 15.6 校验值 ---------- */
.hashes {
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
  overflow: hidden;
}
.hash {
  display: grid; grid-template-columns: minmax(64px, auto) minmax(0, 1fr) 32px;
  align-items: center; gap: 10px;
  padding: 11px 12px 11px 16px;
  transition: background .18s var(--ease);
}
.hash + .hash { box-shadow: inset 0 1px 0 var(--line); }
.hash:hover { background: var(--surface-hover); }
.hash__algo {
  font: 600 11px/1 ui-monospace, monospace; letter-spacing: .4px;
  color: var(--violet);
}
.hash__value {
  font: 12px/1.5 ui-monospace, "SF Mono", monospace;
  color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hash:hover .hash__value { color: var(--text); }

/* ---------- 15.7 源站列表 ---------- */
.srcs {
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 16px;
}
.srcs:last-child { margin-bottom: 0; }
.src {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  transition: background .18s var(--ease);
}
.src + .src { box-shadow: inset 0 1px 0 var(--line); }
.src:hover { background: var(--surface-hover); }
.src::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--grad); opacity: 0; transition: opacity .18s var(--ease);
}
.src.is-active { background: var(--surface-hover); }
.src.is-active::before { opacity: 1; }

.src__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3DDC97; box-shadow: 0 0 8px #3DDC97; flex: none;
}
.src__name { font-size: 13px; font-weight: 500; flex: none; }
.src__region { font-size: 11.5px; color: var(--text-dim); flex: none; }
.src__ms { font-size: 11.5px; color: var(--teal); font-variant-numeric: tabular-nums; flex: none; }
.src__url {
  flex: 1; min-width: 0;
  font: 11.5px/1.4 ui-monospace, "SF Mono", monospace;
  color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.src:hover .src__url { color: var(--text-muted); }
.src .btn--sm { margin-left: 4px; flex: none; }

/* ---------- 15.8 代码块 ---------- */
.code {
  position: relative;
  border-radius: var(--radius);
  background: #0E1118;
  overflow: hidden;
}
.code::after { opacity: .30; }
.code__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 8px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.code__label {
  font: 600 11px/1 ui-monospace, monospace; letter-spacing: .5px;
  color: var(--teal);
}
.code__copy {
  font-size: 11.5px; color: var(--text-dim);
  padding: 3px 9px; border-radius: 7px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: color .18s var(--ease), box-shadow .18s var(--ease);
}
.code__copy:hover { color: var(--teal); box-shadow: inset 0 0 0 1px rgba(77,225,193,.45); }

.code__body {
  margin: 0; padding: 14px 16px 16px;
  overflow-x: auto;
  font: 12.5px/1.85 ui-monospace, "SF Mono", "Cascadia Code", monospace;
  color: var(--text-muted);
  tab-size: 2;
}
.code__body code { font: inherit; }
.c-cmt  { color: #5A6377; font-style: italic; }
.c-cmd  { color: var(--teal); font-weight: 600; }
.c-arg  { color: var(--violet); }

/* ---------- 15.9 同版本其他架构 ---------- */
.variants {
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
  overflow: hidden;
}
.variant {
  position: relative;
  display: grid;
  /* 标签 / 文件名 / 大小 / 来源 / 最新
     尾部三列必须固定宽度: 每个 li 是独立网格, 若用 max-content 则带「最新」的行
     会挤掉尾部宽度, 导致各行大小列/来源列错位 */
  grid-template-columns: max-content minmax(0, 1fr) 68px 72px 44px;
  align-items: center; gap: 12px;
  padding: 12px 14px;
  transition: background .18s var(--ease);
}
.variant + .variant { box-shadow: inset 0 1px 0 var(--line); }
.variant:hover { background: var(--surface-hover); }
.variant::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--grad); opacity: 0; transition: opacity .18s var(--ease);
}
.variant:hover::before, .variant.is-active::before { opacity: 1; }
.variant.is-active { background: var(--surface-hover); }

.variant__name {
  min-width: 0;
  font: 500 13px/1.4 ui-monospace, "SF Mono", monospace;
  color: #7FE7D6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.variant__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.variant__size { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; text-align: left; }
.variant__src, .variant__tag {
  justify-self: end;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; white-space: nowrap;
}
.variant__tag {
  color: var(--teal); background: rgba(77,225,193,.12); box-shadow: inset 0 0 0 1px rgba(77,225,193,.28);
}
.variant__src { color: var(--violet); background: rgba(124,92,255,.12); box-shadow: inset 0 0 0 1px rgba(124,92,255,.26); }

/* ---------- 15.10 右侧下载卡 ---------- */
.panel--download { position: relative; padding: 18px; background: var(--surface); }
.panel--download::after { opacity: .45; }
.dl__size {
  font: 600 28px/1.15 "Inter", system-ui, sans-serif; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dl__desc { margin-top: 6px; font-size: 12px; color: var(--text-dim); }

.btn--block { display: flex; justify-content: center; width: 100%; height: 38px; margin-top: 16px; font-size: 14px; }

.dl__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  font-size: 12px; color: var(--text-dim);
  box-shadow: inset 0 1px 0 var(--line);
  font-variant-numeric: tabular-nums;
}
.dl__row:first-of-type { margin-top: 14px; }
.dl__ok { color: var(--teal); }

/* ---------- 15.11 路径树 ---------- */
.tree { font-size: 12.5px; }
.tree__node {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 7px;
  color: var(--text-muted);
  transition: background .18s var(--ease);
}
.tree__node:hover { background: var(--surface-hover); }
.tree__node--1 { padding-left: 20px; }
.tree__node--2 { padding-left: 32px; }
.tree__node--3 { padding-left: 44px; }
.tree__ico { color: var(--text-dim); font-size: 11px; width: 10px; }
.tree__node.is-now {
  color: var(--teal);
  background: rgba(77,225,193,.08);
  box-shadow: inset 0 0 0 1px rgba(77,225,193,.22);
}
.tree__node.is-now .tree__ico { color: var(--teal); }

/* ---------- 15.12 推荐列表 ---------- */
.reco__item + .reco__item { margin-top: 2px; }
.reco__item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  transition: background .18s var(--ease);
}
.reco__item:hover { background: var(--surface-hover); }
.reco__name {
  font: 12px/1.4 ui-monospace, "SF Mono", monospace;
  color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .18s var(--ease);
}
.reco__item:hover .reco__name { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.reco__meta { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------- 15.13 提示面板 ---------- */
.panel--tip { background: rgba(124, 92, 255, .06); box-shadow: inset 0 0 0 1px rgba(124,92,255,.20); }
.tip__text { font-size: 12px; line-height: 1.7; color: var(--text-muted); }

/* ---------- 15.14 详情页响应式 ---------- */
@media (max-width: 1024px) {
  .detail__inner { grid-template-columns: minmax(0, 1fr); }
  .detail__side { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .dhead__name { font-size: 18px; }
  .dtable { grid-template-columns: minmax(0, 1fr); }
  .dtable__row:nth-child(odd) { box-shadow: none; }
  .dtable__row:nth-child(odd):nth-child(n+3) { box-shadow: inset 0 1px 0 var(--line); }
  /* 源站行: 版本 + 大小 / 规格 + 下载按钮 / 完整链接 —— 避免按钮独占一行 */
  .src {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center; column-gap: 10px; row-gap: 6px;
  }
  .src__dot { grid-area: 1 / 1; }
  .src__name { grid-area: 1 / 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .src__ms { grid-area: 1 / 3; justify-self: end; }
  .src__region { grid-area: 2 / 1 / 3 / 3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .src .btn--sm { grid-area: 2 / 3; justify-self: end; margin-left: 0; }
  .src__url { grid-area: 3 / 1 / 4 / 4; }
  .variant { grid-template-columns: max-content minmax(0, 1fr) 72px 44px; }
  .variant__size { display: none; }
  .detail__side { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* 复制按钮与版本号同行, MD5 值换行后完整展示 */
  .hash { grid-template-columns: minmax(0, 1fr) auto; align-items: center; row-gap: 8px; }
  .hash__algo { grid-area: 1 / 1; }
  .hash .icon-btn { grid-area: 1 / 2; justify-self: end; }
  .hash__value { grid-area: 2 / 1 / 3 / 3; }
  .variant { grid-template-columns: max-content minmax(0, 1fr); }
  .variant__tag, .variant__src { display: none; }
}

/* =========================================================
   16. 列表页专属补充（devices.php）：SEO 深链枢纽 / 设备内筛选
   ========================================================= */

/* 列表页分组内的小标题（设备页“可用镜像”按地区归类） */
.dblock__subtitle { color: var(--text-muted); }

/* 版本分支切换（详情页，仅全部 / 稳定版 / 开发版） */
.branchswitch {
  display: inline-flex; gap: 4px; padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.branchswitch__item {
  display: inline-flex; align-items: center; height: 28px; padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px; color: var(--text-muted);
  transition: color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.branchswitch__item:hover { color: var(--text); background: var(--surface-hover); }
.branchswitch__item.is-active {
  color: var(--text); font-weight: 500;
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px rgba(77,225,193,.45);
}
/* 分支局部刷新时的轻量加载态 */
[data-rom-pane] { transition: opacity .15s var(--ease); }
[data-rom-pane].is-loading { opacity: .5; }

/* SEO 深链枢纽：按品牌 × 地区 / 品牌 × 系统 */
.section { margin-top: 30px; }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.section-header h2 { margin: 0; font-size: 16px; font-weight: 600; }

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin-top: 12px;
}
.region-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.region-card:hover { background: var(--surface-hover); transform: translateY(-2px); }
.region-name { font-size: 13.5px; font-weight: 500; }
.region-count { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* 列表页响应式补充 */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .filters { position: static; order: 2; }
  .results { order: 1; }
}
@media (max-width: 768px) {
  .layout { padding: 0 14px 32px; }
  .tabs__inner { padding: 8px 14px 0; }
  .row { flex-wrap: wrap; gap: 8px; }
  .row .badge { min-width: 0; }
  .row__actions { margin-left: auto; }
  .toolbar { padding: 10px 14px; }
  .region-grid { grid-template-columns: 1fr; }
}
