/* 凯云软件超市 —— 前台样式
   视觉：深海军蓝（信任）+ 云蓝（操作）+ 印章绿（实测通过）+ 价签黄（付费）
   记忆点：首页右侧的「实测单」——像超市小票一样列出最近的测试记录；每款通过实测的软件带绿色印章 */
:root {
  --ink: #14213D; --ink-2: #3A4A66; --muted: #64748B; --line: #E2E8F0; --line-2: #CBD5E1;
  --bg: #F4F6FA; --panel: #FFFFFF; --paper: #FFFEFA;
  --sky: #2F6FED; --sky-2: #1F55C7; --sky-soft: #E9F0FE;
  --seal: #0E9F6E; --seal-soft: #E2F5EC; --amber: #F5A524; --amber-ink: #8A5A00; --amber-soft: #FEF3DC;
  --red: #D14343; --red-soft: #FDECEC;
  --hero: #14213D; --hero-ink: #F3F6FC; --hero-muted: #A9B6D0;
  --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 2px rgba(20,33,61,.05), 0 6px 20px rgba(20,33,61,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans SC", "Noto Sans KR", "Noto Sans Arabic", sans-serif;
  --display: "Manrope", var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8EDF7; --ink-2: #B8C3D9; --muted: #8391AB; --line: #253149; --line-2: #34425E;
    --bg: #0B1220; --panel: #131C2E; --paper: #F7F5EE;
    --sky: #5B8DF6; --sky-2: #7AA3FA; --sky-soft: #1A2846; --seal: #2DBE8C; --seal-soft: #123528;
    --amber-soft: #3A2C10; --amber-ink: #F5C46B; --red-soft: #3B1A1D;
    --hero: #0E1730; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E8EDF7; --ink-2: #B8C3D9; --muted: #8391AB; --line: #253149; --line-2: #34425E;
  --bg: #0B1220; --panel: #131C2E; --paper: #F7F5EE;
  --sky: #5B8DF6; --sky-2: #7AA3FA; --sky-soft: #1A2846; --seal: #2DBE8C; --seal-soft: #123528;
  --amber-soft: #3A2C10; --amber-ink: #F5C46B; --red-soft: #3B1A1D;
  --hero: #0E1730; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--sky) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 12px; }
.spread { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--panel); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
svg.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.boot { min-height: 70vh; display: grid; place-items: center; }

/* ---------- 按钮、表单 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); cursor: pointer; font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: var(--sky); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--sky); border-color: var(--sky); color: #fff; }
.btn.primary:hover { background: var(--sky-2); border-color: var(--sky-2); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--sky-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: inherit; }
.icon-btn:hover { background: var(--sky-soft); }
.link { background: none; border: 0; color: var(--sky); cursor: pointer; padding: 0; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }
.link:disabled { color: var(--muted); cursor: default; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], select, textarea, input:not([type]) {
  height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--panel); width: 100%; min-width: 0; font-weight: 400; }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 22%, transparent); }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--sky); }
.hint { font-size: 12px; color: var(--muted); }

/* ---------- 标签、印章 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.free { background: var(--seal-soft); color: var(--seal); border-color: transparent; }
.tag.price { background: var(--amber-soft); color: var(--amber-ink); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.tag.own { background: var(--sky-soft); color: var(--sky); border-color: transparent; }
.tag svg.i { width: 14px; height: 14px; }
.tag.st-paid { background: var(--seal-soft); color: var(--seal); } .tag.st-pending { background: var(--amber-soft); color: var(--amber-ink); }
.tag.st-cancelled, .tag.st-refunded { background: var(--red-soft); color: var(--red); }
.seal { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 4px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--seal); background: var(--seal-soft); }
.seal svg.i { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: var(--seal); color: #fff; stroke-width: 3; }
.seal small { display: block; font-weight: 500; }
.ver { font-size: 13px; font-weight: 700; color: var(--muted); font-family: var(--font); }
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars svg.i { width: var(--s); height: var(--s); color: var(--line-2); fill: currentColor; stroke: none; }
.stars .on svg.i { color: var(--amber); }
.stars .half svg.i { color: var(--amber); opacity: .5; }
.res { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13px; }
.res svg.i { width: 15px; height: 15px; stroke-width: 2.6; }
.res.pass { color: var(--seal); } .res.warn { color: var(--amber-ink); } .res.fail { color: var(--red); }
.banner { padding: 12px 16px; border-radius: var(--r-sm); display: flex; gap: 8px; align-items: center; }
.banner.bad { background: var(--red-soft); color: var(--red); } .banner.good { background: var(--seal-soft); color: var(--seal); font-weight: 600; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--sky); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loading { min-height: 50vh; display: grid; place-items: center; }

/* ---------- 顶部 ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex: none; }
.brand b { display: block; font-family: var(--display); font-size: 17px; font-weight: 800; line-height: 1.1; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.nav a:hover { background: var(--sky-soft); }
.nav a.on { color: var(--sky); background: var(--sky-soft); }
.nav .nav-admin { display: none; }
@media (max-width: 560px) { .nav .nav-admin { display: block; } }
.top-search { flex: 1; max-width: 380px; position: relative; margin-inline-start: auto; }
.top-search svg { position: absolute; inset-inline-start: 11px; top: 11px; color: var(--muted); }
.top-search input { height: 40px; padding-inline-start: 36px; background: var(--bg); border-color: transparent; border-radius: 999px; }
.top-tools { display: flex; align-items: center; gap: 8px; }
.top-tools #who { display: flex; align-items: center; gap: 6px; }
.lang { width: auto; height: 36px; border-radius: 999px; padding: 0 8px; font-size: 13px; background: var(--bg); border-color: transparent; }
.who { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; text-decoration: none !important; }
.who img, .av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.av { display: inline-grid; place-items: center; background: var(--sky-soft); color: var(--sky); font-weight: 800; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .top-in { gap: 10px; }
  .brand small, .who-n { display: none; }
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; background: var(--panel); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 16px; }
  .menu-open .nav { display: flex; }
  .menu-btn { display: inline-grid; }
  .top-search { max-width: none; }
}
@media (max-width: 560px) {
  .top-search { display: none; }
  .top-tools { margin-inline-start: auto; gap: 4px; }
  .top-tools .admin-link { display: none; }
  .brand b { font-size: 15px; }
  .brand img { width: 30px; height: 30px; }
  .lang { max-width: 92px; }
}

/* ---------- 首页 · 英雄区 + 实测单 ---------- */
.hero { background: var(--hero); color: var(--hero-ink); padding: 44px 0 52px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 15% 0%, rgba(47,111,237,.35), transparent 70%),
  radial-gradient(500px 260px at 90% 110%, rgba(14,159,110,.22), transparent 70%); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; max-width: 14em; letter-spacing: -.02em; }
.hero .lead { color: var(--hero-muted); font-size: 17px; max-width: 34em; margin: 16px 0 24px; }
.big-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 6px 6px 6px 14px; max-width: 560px; color: #14213D; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.big-search svg { color: #64748B; }
.big-search input { border: 0; height: 46px; background: transparent; color: #14213D; font-size: 16px; box-shadow: none !important; }
.big-search .btn { height: 46px; }
.aisles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.aisle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px; border-radius: 10px; color: var(--hero-ink); text-decoration: none !important;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-inline-start: 3px solid var(--c); font-weight: 600; font-size: 14px; }
.aisle:hover { background: rgba(255,255,255,.14); }
.aisle small { color: var(--hero-muted); font-weight: 500; }
.aisle svg.i { color: var(--c); }

/* 实测单：白色小票，上下锯齿边 */
.receipt { background: var(--paper); color: #14213D; padding: 22px 22px 18px; position: relative; border-radius: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.35);
  --zig: radial-gradient(circle at 8px 0, transparent 7px, #000 7.5px) -8px 0 / 16px 100% repeat-x;
  -webkit-mask: linear-gradient(#000 0 0) center / 100% calc(100% - 14px) no-repeat, radial-gradient(circle at 50% 0, transparent 6px, #000 6.5px) 0 100% / 14px 8px repeat-x, radial-gradient(circle at 50% 100%, transparent 6px, #000 6.5px) 0 0 / 14px 8px repeat-x;
          mask: linear-gradient(#000 0 0) center / 100% calc(100% - 14px) no-repeat, radial-gradient(circle at 50% 0, transparent 6px, #000 6.5px) 0 100% / 14px 8px repeat-x, radial-gradient(circle at 50% 100%, transparent 6px, #000 6.5px) 0 0 / 14px 8px repeat-x; }
.r-head { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 2px dashed #CBD5E1; }
.r-head b { display: block; font-family: var(--display); font-size: 16px; }
.r-head small { color: #64748B; font-variant-numeric: tabular-nums; }
.r-rows { list-style: none; margin: 0; padding: 0; }
.r-rows li { border-bottom: 1px dashed #E2E8F0; }
.r-rows a { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n r" "e r"; gap: 0 12px; padding: 10px 0; color: inherit; text-decoration: none; }
.r-rows a:hover .r-name { color: #2F6FED; }
.r-name { grid-area: n; font-weight: 700; } .r-name small { color: #64748B; font-weight: 500; }
.r-env { grid-area: e; font-size: 13px; color: #64748B; }
.r-res { grid-area: r; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; font-variant-numeric: tabular-nums; }
.r-res small { font-size: 12px; color: #64748B; }
.receipt .res.pass { color: #0E9F6E; } .receipt .res.warn { color: #8A5A00; } .receipt .res.fail { color: #D14343; }
.r-total { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; margin-top: 2px; border-top: 2px dashed #CBD5E1; font-size: 13px; font-weight: 600; }
.r-total a { color: #2F6FED; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; gap: 32px; } .hero { padding: 28px 0 36px; } }

/* ---------- 区块 ---------- */
.sec { padding-top: 40px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-h a { font-weight: 600; font-size: 14px; }
.sec.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.sec.two > div { min-width: 0; }
@media (max-width: 860px) { .sec.two { grid-template-columns: minmax(0, 1fr); } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.card.sw { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.card.sw:hover { border-color: var(--sky); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card.sw:hover { transform: none; } .spinner { animation-duration: 3s; } }
.sw-top { display: flex; gap: 12px; align-items: center; }
.sw-name { min-width: 0; } .sw-name h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-name .muted { font-size: 13px; }
.sw-sum { margin: 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.sw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; font-size: 13px; color: var(--muted); }
.sw-meta .rt { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--ink-2); }
.dl { display: inline-flex; align-items: center; gap: 3px; } .dl svg.i { width: 15px; height: 15px; }
.plats { display: inline-flex; gap: 4px; margin-inline-start: auto; color: var(--muted); } .plats svg.i { width: 15px; height: 15px; }
.logo-img { border-radius: 22%; object-fit: cover; flex: none; background: var(--bg); border: 1px solid var(--line); }
.logo-img.ph { display: inline-grid; place-items: center; font-weight: 800; color: #fff; border: 0; background: hsl(var(--h, 220) 55% 48%); font-family: var(--display); }
.logo-img.broken { visibility: hidden; }

.rows { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.rows a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: var(--ink); text-decoration: none; }
.rows a:hover { background: var(--sky-soft); }
.rows b { display: block; } .rows small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--muted); font-size: 13px; flex: none; }
.rows .right svg.i { width: 15px; height: 15px; }
.rank .rk { width: 24px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--muted); flex: none; }
.rank li:nth-child(-n+3) .rk { color: var(--amber); }
.rank .right { flex-direction: row; align-items: center; gap: 4px; }

.site-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.site { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none !important; position: relative; min-width: 0; }
.site:hover { border-color: var(--sky); }
.site img { border-radius: 8px; flex: none; object-fit: contain; }
.s-txt { min-width: 0; } .s-txt b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-txt small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; position: absolute; top: 8px; inset-inline-end: 8px; }
.dot.up { background: var(--seal); } .dot.down { background: var(--red); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.news { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--ink); text-decoration: none !important; }
.news:hover { border-color: var(--sky); }
.news img, .news-ph { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky); }
.news-ph svg.i { width: 36px; height: 36px; opacity: .6; }
.news-ph.kind-release { background: var(--seal-soft); color: var(--seal); } .news-ph.kind-notice { background: var(--amber-soft); color: var(--amber-ink); }
.n-txt { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.n-kind { display: flex; gap: 6px; align-items: center; }
.n-txt b { font-family: var(--display); font-size: 16px; line-height: 1.3; }
.n-txt > small { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.method { margin-top: 56px; padding: 48px 0; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.method .lead { color: var(--ink-2); max-width: 46em; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 0; margin: 24px 0 0; }
.steps li { counter-increment: s; padding: 16px; border-radius: var(--r); background: var(--bg); position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--seal); color: #fff; font-weight: 800; margin-bottom: 10px; font-family: var(--display); }
.steps b { display: block; margin-bottom: 4px; } .steps span { color: var(--ink-2); font-size: 14px; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 列表页 ---------- */
.list-page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding-top: 28px; padding-bottom: 40px; }
.filters { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.filters h2 { font-size: 13px; color: var(--muted); margin: 16px 0 6px; font-family: var(--font); font-weight: 700; }
.filters h2:first-child { margin-top: 0; }
.filters a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; }
.filters a:hover { background: var(--panel); }
.filters a.on { background: var(--sky-soft); color: var(--sky); font-weight: 700; }
.filters a small { margin-inline-start: auto; color: var(--muted); }
.filters a i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.filters .check { margin-top: 14px; font-size: 14px; }
.res-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.res-h h1 { font-size: 26px; }
.sort { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sort select { width: auto; height: 36px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }
@media (max-width: 820px) {
  .list-page { grid-template-columns: 1fr; gap: 12px; }
  .filters { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .filters h2 { width: 100%; margin: 8px 0 0; }
  .filters a { background: var(--panel); border: 1px solid var(--line); padding: 5px 10px; }
  .filters a small { display: none; }
}

/* ---------- 详情页 ---------- */
.detail { padding-top: 20px; padding-bottom: 48px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.d-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.d-title h1 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.d-sum { margin: 6px 0 10px; color: var(--ink-2); font-size: 16px; }
.d-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; align-items: center; }
.d-meta .rt { display: inline-flex; gap: 4px; align-items: center; color: var(--ink); text-decoration: none; }
.d-plats { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.d-plats .plats { margin: 0; }
.d-cta { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 220px; text-align: center; }
.d-cta .tag { align-self: center; }
@media (max-width: 820px) { .d-head { grid-template-columns: auto minmax(0, 1fr); } .d-cta { grid-column: 1 / -1; } }

.test-card { margin-top: 16px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--seal) 40%, var(--line)); border-radius: var(--r); padding: 18px 20px; }
.test-card.plain { border-color: var(--line); }
.test-card.plain h2 { margin-bottom: 12px; }
.tc-seal { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tc-seal > svg.i { width: 44px; height: 44px; color: var(--seal); stroke-width: 1.6; }
.tc-seal b { display: block; font-family: var(--display); font-size: 18px; color: var(--seal); }
.tc-seal span { color: var(--ink-2); font-size: 14px; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--panel); }
.tbl th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 700; padding: 9px 12px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .c { text-align: center; } .tbl .n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .ok { color: var(--seal); } .tbl .no { color: var(--red); } .tbl .ok svg.i, .tbl .no svg.i { stroke-width: 2.6; }

.d-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; margin-top: 24px; }
.d-main > section { margin-bottom: 32px; }
.d-main h2 { margin-bottom: 12px; }
@media (max-width: 900px) { .d-body { grid-template-columns: 1fr; } }
.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.shot { flex: none; border: 1px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden; background: var(--panel); cursor: zoom-in; scroll-snap-align: start; }
.shot img { display: block; height: 220px; width: auto; }
.editor { background: var(--amber-soft); border-radius: var(--r); padding: 16px 18px; }
.ed-h { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; color: var(--amber-ink); }
.prose { color: var(--ink-2); line-height: 1.75; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 1.2em 0 .4em; }
.prose p { margin: 0 0 .9em; } .prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 .9em; }
.prose code { background: var(--bg); border-radius: 5px; padding: 1px 5px; font-size: .92em; }
.prose img { border-radius: 10px; border: 1px solid var(--line); }
.prose blockquote { margin: 0 0 .9em; padding: 8px 14px; border-inline-start: 3px solid var(--sky); background: var(--sky-soft); border-radius: 0 8px 8px 0; }
.files { display: flex; flex-direction: column; gap: 8px; }
.file { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.f-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.f-main > svg.i { width: 26px; height: 26px; color: var(--muted); margin-top: 2px; }
.f-main small { display: block; }
.f-side { display: flex; gap: 10px; align-items: center; }
.sha { border: 0; background: var(--bg); border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--muted); cursor: pointer; margin-top: 4px; display: inline-flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; }
.sha svg.i { width: 13px; height: 13px; }
.scan { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 700; }
.scan.ok { color: var(--seal); } .scan.warn { color: var(--amber-ink); }
.versions details { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 8px; }
.versions summary { display: flex; gap: 10px; align-items: center; padding: 10px 14px; cursor: pointer; }
.versions .prose { padding: 0 14px 6px; }
.d-side { display: flex; flex-direction: column; gap: 14px; }
.facts { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 16px; display: grid; grid-template-columns: auto 1fr; }
.facts dt, .facts dd { padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); padding-inline-end: 14px; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.facts .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.facts .tags a { font-size: 12px; background: var(--bg); padding: 1px 8px; border-radius: 999px; }
.side-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.side-box h3 { margin-bottom: 8px; }
.side-box a { display: block; padding: 7px 0; border-top: 1px solid var(--line); color: var(--ink); }
.side-box a:first-of-type { border-top: 0; }
.side-box a small { display: block; color: var(--muted); }

/* 评论 */
.rating-sum { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.rating-sum .big { font-family: var(--display); font-size: 44px; font-weight: 800; line-height: 1; }
.rating-sum small { display: block; }
.dist { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.dist div { display: grid; grid-template-columns: 12px 1fr 28px; gap: 8px; align-items: center; }
.dist i { height: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; } .dist b { display: block; height: 100%; background: var(--amber); }
.cmt-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.rate-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rate-in { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rate-in input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-in label { cursor: pointer; line-height: 0; }
.rate-in label svg.i { width: 28px; height: 28px; color: var(--line-2); fill: currentColor; stroke: none; }
.rate-in input:checked ~ label svg.i, .rate-in label:hover svg.i, .rate-in label:hover ~ label svg.i { color: var(--amber); }
.rate-in input:focus-visible + label { outline: 2px solid var(--sky); border-radius: 4px; }
.cmts, .replies { list-style: none; margin: 0; padding: 0; }
.cmts > li { padding: 14px 0; border-top: 1px solid var(--line); }
.cmts p { margin: 6px 0; overflow-wrap: anywhere; }
.c-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-h img, .c-h .av { width: 28px; height: 28px; border-radius: 50%; font-size: 13px; }
.c-act { display: flex; gap: 14px; font-size: 13px; }
.replies { margin-top: 8px; padding-inline-start: 18px; border-inline-start: 2px solid var(--line); }
.replies li { padding: 8px 0; }
li.official > p { background: var(--sky-soft); padding: 8px 12px; border-radius: 8px; }
.reply-form { display: flex; gap: 8px; margin-top: 8px; align-items: flex-start; }
.login-hint { background: var(--panel); border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px 14px; }

/* 网址导航 */
.sites-page, .news-page { padding-top: 28px; padding-bottom: 48px; }
.sites-page #siteQ { max-width: 280px; margin-inline-start: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.site-nav a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.site-nav small { color: var(--muted); }
.site-cat { padding-top: 26px; scroll-margin-top: 76px; }
.site-cat h2 { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.site-cat h2 svg.i { color: var(--c); width: 22px; height: 22px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

/* 新闻 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; text-decoration: none !important; }
.chip.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; padding-top: 24px; padding-bottom: 48px; }
.article { max-width: 760px; }
.article h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 6px 0 10px; }
.a-meta { display: flex; gap: 14px; color: var(--muted); font-size: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.article .cover { width: 100%; border-radius: var(--r); margin-bottom: 18px; }
.article .lead { font-size: 18px; color: var(--ink-2); }
.article .prose { font-size: 16px; }
.card.sw.inline { flex-direction: row; align-items: center; margin: 24px 0; }
.card.sw.inline > span:nth-child(2) { flex: 1; min-width: 0; } .card.sw.inline small { display: block; color: var(--muted); }
#comments { margin-top: 36px; } #comments h2 { margin-bottom: 12px; }
@media (max-width: 900px) { .article-wrap { grid-template-columns: 1fr; } }

/* 登录 */
.auth-page { min-height: calc(100vh - 64px); display: grid; place-items: center; padding-top: 32px; padding-bottom: 32px; }
.auth-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.auth-card img { margin: 0 auto; } .auth-card form { text-align: start; }
.gbtn { min-height: 44px; display: flex; justify-content: center; } .gbtn.busy { opacity: .5; pointer-events: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-in { font-size: 24px; letter-spacing: .4em; text-align: center; height: 54px; font-variant-numeric: tabular-nums; }
.terms { margin: 0; }

/* 账号、订单 */
.account { padding-top: 28px; padding-bottom: 48px; max-width: 900px; }
.account > section { margin-top: 28px; } .account h2 { margin-bottom: 12px; }
.acc-h { display: flex; align-items: center; gap: 16px; }
.acc-h > div { flex: 1; } .av-lg { width: 64px !important; height: 64px !important; font-size: 26px; border-radius: 50%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; margin-bottom: 12px; }
.form-grid > .row:last-child { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.order-page { padding-top: 32px; padding-bottom: 48px; max-width: 640px; }
.order-card { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.buy-sum { display: flex; gap: 14px; align-items: center; }
.buy-sum > div { flex: 1; } .buy-sum h1 { font-size: 22px; }
.price-big { display: block; font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--amber-ink); }
.instructions { background: var(--bg); border-radius: 10px; padding: 14px 16px; }
.pays { border: 0; padding: 0; margin: 16px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.pays legend { font-weight: 700; margin-bottom: 6px; }
.pay { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.pay:has(input:checked) { border-color: var(--sky); background: var(--sky-soft); }
.pay input { margin-top: 4px; accent-color: var(--sky); } .pay small { display: block; color: var(--muted); }
.empty-page { padding-top: 80px; padding-bottom: 80px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* 底部 */
.foot { margin-top: 56px; background: var(--hero); color: var(--hero-muted); padding: 40px 0 20px; font-size: 14px; }
.method + .foot, main:has(.method) + .foot { margin-top: 0; }
.foot-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 28px; }
.foot h3 { color: var(--hero-ink); font-size: 14px; margin-bottom: 10px; }
.foot a, .foot span { display: flex; gap: 6px; align-items: center; color: var(--hero-muted); padding: 3px 0; }
.foot a:hover { color: #fff; }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand b { color: var(--hero-ink); font-family: var(--display); font-size: 17px; }
.foot-brand p { margin: 4px 0 0; }
.foot-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 16px; font-size: 13px; }
@media (max-width: 820px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* 弹窗、提示 */
.modal-bg { position: fixed; inset: 0; background: rgba(11,18,32,.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 16px; width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 980px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.modal-b { padding: 8px 18px 16px; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.gal { margin: 0; text-align: center; } .gal img { max-height: 72vh; border-radius: 8px; } .gal figcaption { margin-top: 8px; }
.toasts { position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
[dir=rtl] .toasts { transform: translateX(50%); }
.toast { background: var(--ink); color: var(--panel); padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw; }
.toast.good { background: var(--seal); color: #fff; } .toast.bad { background: var(--red); color: #fff; }

/* 阿拉伯语：左右箭头翻转 */
[dir=rtl] .pager svg.i { transform: scaleX(-1); }
