:root{
  --bg:#f6f7f9;
  --card:#ffffff;
  --text:#16181d;
  --muted:#6b7280;
  --border:#e6e8ec;
  --brand:#2563eb;
  --brand-600:#1d4ed8;
  --ok:#059669;
  --warn:#d97706;
  --danger:#dc2626;
  --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg);color:var(--text);
  font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
code{background:#f1f3f6;padding:1px 5px;border-radius:5px;font-size:.9em}
.container{max-width:920px;margin:0 auto;padding:0 16px}
.dim{color:var(--muted)}
.warn{color:var(--warn)}
.danger{color:var(--danger)}

/* topbar */
.topbar{background:rgba(255,255,255,.8);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:20}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;height:60px}
.brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:17px;letter-spacing:.2px}
.brand-dot{width:10px;height:10px;border-radius:4px;background:linear-gradient(135deg,#2563eb,#7c3aed);display:inline-block}
.nav{display:flex;gap:20px;font-size:14px;color:var(--muted)}
.nav a:hover{color:var(--text)}

/* hero */
.hero{padding:64px 0 24px;text-align:center}
.hero-title{font-size:34px;line-height:1.25;margin:0 0 10px;letter-spacing:-.5px}
.hero-sub{margin:0 0 28px;color:var(--muted);font-size:14px}
.hero-sub strong{color:var(--text)}
.hero-stats{margin-top:18px;font-size:13px;color:var(--muted)}
.hero-stats .dot{margin:0 8px}

/* search box */
.searchbox{
  max-width:660px;margin:0 auto;background:var(--card);border:1.5px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow);padding:14px 16px 10px;transition:.18s;
}
.searchbox:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px rgba(37,99,235,.1),var(--shadow)}
.searchbox input[type=search]{
  width:100%;border:0;outline:0;background:transparent;font-size:16px;padding:8px 2px 12px;color:var(--text);
}
.searchbox-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}
.searchbox-sm{max-width:100%;margin:0 0 14px;padding:8px 10px 8px 16px}
.searchbox-row{display:flex;align-items:center;gap:10px}
.searchbox-row input[type=search]{padding:6px 0;flex:1;min-width:0}
.btn-search{
  width:34px;height:34px;border-radius:50%;border:0;background:var(--brand);color:#fff;
  display:grid;place-items:center;cursor:pointer;transition:.15s;flex:none
}
.btn-search:hover{background:var(--brand-600)}
.btn-search:active{transform:scale(.95)}

/* pills */
.pills{display:flex;gap:4px;background:#f1f3f6;border-radius:9px;padding:3px;flex-wrap:wrap}
.pill{
  border:0;background:transparent;color:var(--muted);font-size:13px;padding:5px 11px;border-radius:7px;
  cursor:pointer;transition:.15s;white-space:nowrap;display:inline-block
}
.pill:hover{color:var(--text)}
.pill.active{background:#fff;color:var(--brand);box-shadow:0 1px 2px rgba(16,24,40,.08);font-weight:600}
.filters{display:flex;gap:6px;margin:0 0 14px;flex-wrap:wrap}

/* cards */
.section{margin:40px 0}
.section-title{font-size:15px;font-weight:600;margin:0 0 14px;color:var(--text)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;transition:.16s}
.card-link:hover{box-shadow:var(--shadow);border-color:#d7dbe2;transform:translateY(-1px)}
.card-top{display:flex;gap:6px;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.card-title{font-size:14px;font-weight:600;margin:0;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card-meta{font-size:12px;color:var(--muted);margin-top:8px;display:flex;gap:6px;flex-wrap:wrap}

/* badges */
.badge{font-size:11px;padding:2px 7px;border-radius:6px;background:#eef2ff;color:#3730a3;font-weight:600;white-space:nowrap}
.badge-quark{background:#eef2ff;color:#3730a3}
.badge-baidu{background:#e8f4ff;color:#0b5cad}
.badge-uc{background:#fff1e8;color:#9a3412}
.badge-xunlei{background:#e8f7f0;color:#065f46}
.badge-aliyun{background:#fef3c7;color:#92400e}
.badge-soft{background:#f3f4f6;color:#4b5563;font-weight:500}
.badge-ok{background:#ecfdf5;color:#047857}
.chip{display:inline-block;background:#fff;border:1px solid var(--border);border-radius:999px;padding:5px 13px;font-size:13px;color:var(--muted);margin:0 8px 8px 0}
.platform-row{display:flex;flex-wrap:wrap}

/* results */
.search-head{margin:26px 0 18px}
.result-meta{font-size:13px;color:var(--muted);margin-bottom:6px}
.list{display:flex;flex-direction:column;gap:10px}
.result-card{display:flex;align-items:center;gap:16px}
.result-main{flex:1;min-width:0}
.result-title{font-size:15px;margin:0 0 6px;line-height:1.45}
.result-title a:hover{color:var(--brand)}
.result-title mark{background:rgba(37,99,235,.12);color:var(--brand);padding:0 2px;border-radius:3px}
.result-action{flex:none}
.empty{text-align:center;padding:60px 0;color:var(--muted)}
.empty p{margin:6px 0}
.pager{display:flex;gap:12px;align-items:center;justify-content:center;margin:28px 0}
.pager-btn{padding:7px 16px;border-radius:9px;border:1px solid var(--border);background:#fff;font-size:13px}
.pager-btn:hover{border-color:var(--brand);color:var(--brand)}

/* buttons */
.btn-primary{
  display:inline-block;background:var(--brand);color:#fff;border:0;border-radius:9px;
  padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;transition:.15s;white-space:nowrap
}
.btn-primary:hover{background:var(--brand-600)}
.btn-lg{padding:11px 26px;font-size:15px;border-radius:11px}
.btn-ghost{display:inline-block;border:1px solid var(--border);background:#fff;border-radius:9px;padding:8px 16px;font-size:13px}
.btn-ghost:hover{border-color:var(--brand);color:var(--brand)}

/* detail */
.crumbs{font-size:13px;color:var(--muted);margin:22px 0 14px}
.crumbs a:hover{color:var(--brand)}
.crumbs span{margin:0 6px}
.detail{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:26px;box-shadow:var(--shadow)}
.detail-title{font-size:23px;line-height:1.4;margin:12px 0 12px;letter-spacing:-.3px}
.detail-desc{color:#4b5563;font-size:14px;margin:0 0 16px}
.detail-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:18px 0}
.notice{margin-top:16px;background:#f8fafc;border:1px dashed var(--border);border-radius:10px;padding:11px 14px;font-size:13px;color:var(--muted)}

/* preparing */
.prep{max-width:520px;margin:70px auto;text-align:center}
.prep-title{font-size:21px;margin:22px 0 6px}
.prep-sub{color:var(--muted);font-size:14px;margin:0 0 26px;word-break:break-all}
.spinner{
  width:42px;height:42px;margin:0 auto;border-radius:50%;
  border:3px solid #e5e7eb;border-top-color:var(--brand);animation:spin .8s linear infinite
}
@keyframes spin{to{transform:rotate(360deg)}}
.progress{height:6px;background:#e9ecf1;border-radius:999px;overflow:hidden;max-width:360px;margin:0 auto}
.progress-bar{height:100%;background:linear-gradient(90deg,#2563eb,#7c3aed);transition:width .5s ease;border-radius:999px}
.prep-stage{font-size:13px;color:var(--muted);margin-top:12px;min-height:20px}
.prep-fallback{margin-top:26px}
.prep-fallback p{font-size:13px}

/* auth & admin */
.auth{max-width:360px;margin:80px auto;text-align:center}
.auth-title{font-size:22px;margin-bottom:20px}
.auth-form{display:flex;flex-direction:column;gap:12px;margin-bottom:16px}
.auth-form input{padding:11px 14px;border:1px solid var(--border);border-radius:10px;font-size:14px;outline:0;background:#fff}
.auth-form input:focus{border-color:var(--brand)}
.admin-head{display:flex;justify-content:space-between;align-items:center;margin:26px 0 18px;flex-wrap:wrap;gap:12px}
.admin-head h1{font-size:22px;margin:0}
.admin-tabs{display:flex;gap:6px;align-items:center;background:#f1f3f6;padding:4px;border-radius:10px;flex-wrap:wrap}
.admin-tabs .pill{background:transparent;box-shadow:none}
.admin-tabs .pill.active{background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.08)}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;margin-bottom:18px}
.stat{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:4px}
.stat-num{font-size:24px;font-weight:700;letter-spacing:-.5px}
.stat-label{font-size:12px;color:var(--muted)}
.table{width:100%;border-collapse:collapse;background:var(--card);border:1px solid var(--border);border-radius:12px;overflow:hidden;font-size:13px}
.table th,.table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border);vertical-align:middle}
.table th{background:#fafbfc;font-weight:600;color:var(--muted);font-size:12px}
.table tr:last-child td{border-bottom:0}
.ellipsis{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-actions{display:flex;gap:10px}
.link{border:0;background:none;color:var(--brand);cursor:pointer;font-size:13px;padding:0}
.link.danger{color:var(--danger)}
.inline{display:inline}
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;background:var(--card);border:1px solid var(--border);border-radius:12px;padding:18px;margin-bottom:24px}
.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted)}
.form-grid input,.form-grid textarea{padding:9px 11px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;outline:0}
.form-grid input:focus,.form-grid textarea:focus{border-color:var(--brand)}
.form-grid .span-2{grid-column:span 3}
.form-grid button{grid-column:span 3;justify-self:start}

/* footer */
.footer{border-top:1px solid var(--border);margin-top:60px;padding:24px 0;font-size:12px;color:var(--muted);text-align:center}
.footer a:hover{color:var(--brand)}

@media (max-width:640px){
  .hero{padding:40px 0 16px}
  .hero-title{font-size:25px}
  .result-card{flex-direction:column;align-items:stretch;gap:10px}
  .result-action .btn-primary{width:100%;text-align:center}
  .form-grid{grid-template-columns:1fr}
  .form-grid .span-2{grid-column:span 1}
  .form-grid button{grid-column:span 1}
  .detail{padding:18px}
  .detail-title{font-size:19px}
}

/* ===== 搜索联想 / 热词 / 后台补丁 ===== */
.sug-wrap { position: relative; }
.sug-list { display: none; position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 6px;
  background: var(--card, #fff); border: 1px solid rgba(0,0,0,.08); border-radius: 12px; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.sug-list.open { display: block; }
.sug-item { display: block; padding: 9px 14px; font-size: 14px; color: inherit; text-decoration: none; }
.sug-item:hover { background: rgba(0,0,0,.05); }
.hot-words { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; font-size: 13px; }
.chip-link { text-decoration: none; }
.chip-link:hover { opacity: .8; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
label.check input { width: auto; }
.ok { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; padding: 8px 12px; border-radius: 10px; }
input.mini { width: 140px; font-size: 12px; padding: 4px 8px; }
.update-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge-ok { background: #dcfce7; color: #15803d; }
/* 后台复选框：恢复成横向一行 */
.form-grid label.check,
.form-grid label.check span {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.form-grid label.check input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
/* ================= 后台 v2 ================= */
.panel { background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; padding: 18px 20px; margin: 0 0 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.panel-subtitle { font-size: 13px; font-weight: 600; margin: 16px 0 8px; }
.panel-desc { font-size: 12px; color: #6b7280; margin: 0; line-height: 1.6; }
.panel-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.panel-head .panel-actions { margin-top: 0; }
.cfg-form { margin: 0; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cfg-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cfg-item--wide { grid-column: 1 / -1; }
.cfg-item--check { justify-content: center; }
.cfg-label { font-size: 12px; font-weight: 600; color: #374151; }
.cfg-grid input[type="text"], .cfg-grid input:not([type]), .cfg-grid input[type="number"], .cfg-grid select, .cfg-grid textarea {
  width: 100%; padding: 8px 10px; border: 1px solid rgba(0,0,0,.12); border-radius: 9px; font-size: 13px; background: #fff;
}
.cfg-grid input:focus, .cfg-grid select:focus, .cfg-grid textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.cfg-hint { font-size: 11px; color: #9ca3af; margin: 0; line-height: 1.5; }
.cfg-key { font-size: 10px; color: #c4c8d0; font-family: ui-monospace, monospace; }
.switch-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.switch-label input[type="checkbox"] { width: 16px; height: 16px; }
.switch-text { font-size: 13px; font-weight: 600; color: #374151; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.kv-item { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; background: #f9fafb; border-radius: 9px; font-size: 12px; }
.kv-k { color: #6b7280; }
.kv-v { font-weight: 600; color: #111827; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.table-sm td, .table-sm th { padding: 6px 8px; font-size: 12px; }
.row-sub td { background: #fafafa; padding-top: 0; }
.update-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.update-form .grow { flex: 1 1 260px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; font-size: 12px;
  border: 1px solid rgba(0,0,0,.12); background: #fff; color: #374151; text-decoration: none; cursor: pointer; }
.btn-ghost:hover { border-color: #2563eb; color: #2563eb; }
.btn-ghost.danger:hover { border-color: #dc2626; color: #dc2626; }
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin: 0 0 14px; }
.alert-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
/* ================= 扫码获取页 ================= */
.scan-mask { position: fixed; inset: 0; background: rgba(17,24,39,.45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px 16px; z-index: 60; overflow: auto; }
.scan-card { position: relative; width: 100%; max-width: 380px; background: #fff; border-radius: 18px;
  padding: 34px 26px 22px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.22);
  animation: scan-in .22s ease-out; }
@keyframes scan-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.scan-close{
  position:absolute; right:14px; top:14px; width:32px; height:32px; padding:0;
  border:0; border-radius:50%; background:#f4f5f7; color:#8b919c;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition:background .15s,color .15s,transform .15s;
}
.scan-close svg{ width:14px; height:14px; }
.scan-close:hover{ background:#eceef2; color:#374151; transform:rotate(90deg); }
.scan-check { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: #ecfdf5; color: #10b981;
  display: flex; align-items: center; justify-content: center; }
.scan-title { font-size: 19px; font-weight: 700; margin: 0 0 6px; color: #111827; }
.scan-tip { font-size: 12px; color: #9ca3af; margin: 0 0 18px; }
.scan-qr { width: 208px; height: 208px; margin: 0 auto 14px; padding: 12px; box-sizing: content-box;
  border: 1px solid #eef0f3; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; }
.scan-qr svg { display: block; width: 100%; height: 100%; }
.scan-qr-loading { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.scan-spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #e5e7eb; border-top-color: #2563eb;
  animation: scan-spin .8s linear infinite; }
@keyframes scan-spin { to { transform: rotate(360deg); } }
.scan-fail { font-size: 13px; color: #b91c1c; margin: 0; }
.scan-res-title { font-size: 14px; color: #374151; margin: 0 0 14px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scan-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.scan-actions .btn-primary, .scan-actions .btn-ghost { padding: 9px 16px; font-size: 13px; border-radius: 10px; text-decoration: none; }
.scan-divider { height: 1px; background: #f1f3f5; margin: 4px 0 14px; }
.scan-warn { font-size: 12px; color: #6b7280; margin: 0 0 6px; }
.scan-warn.dim { color: #9ca3af; }
.scan-group { font-size: 12px; margin: 10px 0 0; }
.scan-group a { color: #2563eb; text-decoration: none; }
/* ================= 后台外壳（侧边栏布局） ================= */
.admin-body { background: #f6f7f9; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 208px; flex: 0 0 208px; background: #fff; border-right: 1px solid #ebedf0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-logo { display: flex; align-items: center; gap: 10px; padding: 16px 18px; text-decoration: none; color: #111827; border-bottom: 1px solid #f1f3f5; }
.admin-logo-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg,#3b82f6,#22d3ee); display: inline-block; }
.admin-logo-text { font-size: 14px; font-weight: 700; display: flex; flex-direction: column; line-height: 1.25; }
.admin-logo-text em { font-style: normal; font-size: 10px; font-weight: 400; color: #9ca3af; }
.admin-menu { padding: 10px 0; flex: 1; overflow-y: auto; }
.admin-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; color: #4b5563;
  text-decoration: none; border-left: 3px solid transparent; }
.admin-menu-item svg { width: 16px; height: 16px; flex: 0 0 16px; color: #9ca3af; }
.admin-menu-item:hover { background: #f8fafc; color: #111827; }
.admin-menu-item.active { background: #eef4ff; color: #2563eb; border-left-color: #2563eb; font-weight: 600; }
.admin-menu-item.active svg { color: #2563eb; }
.admin-side-foot { border-top: 1px solid #f1f3f5; padding: 12px 16px; display: flex; justify-content: space-between;
  align-items: center; font-size: 11px; color: #9ca3af; }
.admin-side-foot a { color: #6b7280; text-decoration: none; }
.admin-side-foot a:hover { color: #2563eb; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { height: 50px; background: #fff; border-bottom: 1px solid #ebedf0; display: flex; align-items: center;
  justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 20; }
.admin-crumb { font-size: 13px; color: #6b7280; display: flex; gap: 8px; align-items: center; }
.admin-crumb .crumb-cur { color: #111827; font-weight: 600; }
.admin-crumb .crumb-sep { color: #d1d5db; }
.admin-top-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #4b5563; }
.admin-logout { border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; color: #4b5563; }
.admin-logout:hover { border-color: #2563eb; color: #2563eb; }
.admin-content { padding: 20px 22px 40px; max-width: 1180px; width: 100%; }

/* 子标签（基础设置 / 搜索加速 / 扫码与清理） */
.sub-tabs { display: flex; gap: 22px; border-bottom: 1px solid #ebedf0; margin-bottom: 16px; }
.sub-tab { padding: 0 2px 10px; font-size: 13px; color: #6b7280; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sub-tab:hover { color: #2563eb; }
.sub-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }

/* 截图式表单：label 左、控件右、说明在下 */
.settings-form { margin: 0; }
.settings-body { padding: 4px 2px 8px; }
.settings-group-title { font-size: 14px; font-weight: 700; margin: 6px 0 4px; color: #111827; }
.settings-group-desc { font-size: 12px; color: #9ca3af; margin: 0 0 14px; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 6px 16px; align-items: start; padding: 9px 0; }
.form-label { font-size: 13px; color: #4b5563; text-align: right; padding-top: 8px; line-height: 1.4; }
.form-field { min-width: 0; }
.form-input { width: 100%; max-width: 620px; height: 34px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 6px;
  font-size: 13px; background: #fff; color: #111827; box-sizing: border-box; }
textarea.form-input { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; }
select.form-input { height: 34px; }
.form-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; padding-top: 8px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; }
.form-hint { font-size: 11px; color: #9ca3af; margin: 6px 0 0; line-height: 1.5; }
.form-key { font-size: 10px; color: #d1d5db; font-family: ui-monospace, monospace; display: block; margin-top: 3px; }
.settings-foot { display: flex; align-items: center; gap: 12px; padding: 16px 0 2px; margin-left: 148px; flex-wrap: wrap; }
.settings-foot--tools { margin-left: 0; border-top: 1px solid #f1f3f5; margin-top: 8px; padding-top: 14px; }
.settings-foot .dim { font-size: 12px; }

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; flex: none; height: auto; position: static; }
  .admin-menu { display: flex; overflow-x: auto; padding: 6px; }
  .admin-menu-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .admin-menu-item.active { border-left: none; border-bottom-color: #2563eb; }
  .form-row { grid-template-columns: 1fr; }
  .form-label { text-align: left; padding-top: 0; }
  .settings-foot { margin-left: 0; }
}
/* 列表页平台 tab 上的数量 */
.pill-count { margin-left: 6px; font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.pill.active .pill-count { opacity: .85; }
.badge-115,.badge-tianyi,.badge-123,.badge-magnet,.badge-pikpak,.badge-other{background:#f3f4f6;color:#374151}

/* ---------- 账号卡片列表 ---------- */
.acct-list{display:flex;flex-direction:column;gap:10px}
.acct-card{background:#fff;border:1px solid var(--border);border-radius:12px;transition:border-color .15s,box-shadow .15s}
.acct-card:hover{border-color:#d7dbe2;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.acct-main{display:flex;align-items:center;gap:16px;padding:16px 18px;flex-wrap:wrap}
.acct-ident{display:flex;align-items:center;gap:10px;min-width:200px;flex:1 1 200px}
.acct-avatar{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;display:grid;place-items:center;font-size:14px;font-weight:700;flex:none}
.acct-ident-text{min-width:0}
.acct-name{font-size:14.5px;font-weight:600;display:flex;align-items:center;gap:6px;letter-spacing:-.1px}
.acct-id{font-size:11px;color:var(--muted);font-weight:500;background:#f3f4f6;padding:1px 6px;border-radius:6px}
.acct-sub{font-size:12px;color:var(--muted);margin-top:2px}
.acct-metrics{display:grid;grid-template-columns:76px 76px minmax(130px,1fr);gap:20px;align-items:center;flex:2 1 320px}
.metric{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.metric-label{font-size:11px;color:var(--muted);line-height:1}
.metric-value{font-size:13px;font-weight:600;line-height:1.2}
.metric-value em{font-style:normal;color:var(--muted);font-weight:500}
.metric-value.small{font-size:12px;font-weight:500}
.metric-wide{min-width:130px;flex:1 1 130px}
.meter{height:6px;border-radius:999px;background:#eef1f5;overflow:hidden;width:100%;min-width:80px;display:block}
.meter i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2563eb,#60a5fa);transition:width .3s}
.meter i.hot{background:linear-gradient(90deg,#f59e0b,#ef4444)}
.acct-actions{display:flex;gap:6px;align-items:center;flex:none;margin-left:auto;padding-left:14px;border-left:1px solid var(--border)}
.chip-btn{border:1px solid var(--border);background:#fff;border-radius:8px;padding:5px 11px;font-size:12.5px;color:#374151;cursor:pointer;transition:.15s;line-height:1.4}
.chip-btn:hover{border-color:var(--brand);color:var(--brand);background:#f8faff}
.chip-btn.danger:hover{border-color:var(--danger);color:var(--danger);background:#fff5f5}
.acct-editor{border-top:1px dashed var(--border);background:#fafbfc;padding:14px 16px;border-radius:0 0 12px 12px}
.acct-form{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.acct-field{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted);flex:0 1 170px}
.acct-field--wide{flex:1 1 320px}
.acct-field .form-input{width:100%}
.acct-form-actions{display:flex;gap:8px;flex:none}
.btn-sm{padding:7px 14px;font-size:12.5px;border-radius:8px}
.acct-empty{padding:28px;text-align:center;color:var(--muted);font-size:13px;background:#fafbfc;border:1px dashed var(--border);border-radius:12px}
.badge-warn{background:#fef3c7;color:#92400e}
.badge-err{background:#fee2e2;color:#b91c1c}
@media (max-width:760px){
  .acct-metrics{gap:14px;flex:1 1 100%}
  .acct-actions{width:100%;margin-left:0;justify-content:flex-start}
  .acct-form-actions{width:100%}
}

/* ---------- 列表工具条 ---------- */
.toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#fafbfc;border:1px solid var(--border);border-radius:10px;padding:10px 12px;margin-bottom:14px}
.toolbar-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.toolbar-sep{width:1px;height:22px;background:var(--border);flex:none}
@media (max-width:760px){.toolbar-sep{display:none}}

/* ============================================================
   视觉焕新（仅前台，不影响后台）
   ============================================================ */
:root{
  --brand:#4f46e5; --brand-600:#4338ca; --brand-soft:#eef2ff;
  --bg:#f7f8fc; --text:#151827; --muted:#6b7280; --border:#e8eaf1;
}
body:not(.admin-body){
  background:
    radial-gradient(900px 420px at 50% -180px, rgba(99,102,241,.13), transparent 70%),
    radial-gradient(760px 320px at 88% -40px, rgba(168,85,247,.09), transparent 70%),
    #f7f8fc;
  background-attachment:fixed;
  color:var(--text);
}
body:not(.admin-body) .topbar{
  background:rgba(255,255,255,.72);
  backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid rgba(17,24,39,.06);
}
body:not(.admin-body) .brand{gap:9px}
body:not(.admin-body) .brand-mark{
  width:30px;height:30px;border-radius:9px;flex:none;
  background:linear-gradient(135deg,#6366f1,#a855f7);
  color:#fff;display:grid;place-items:center;font-size:15px;font-weight:700;
  box-shadow:0 8px 18px -10px rgba(99,102,241,.9);
}
body:not(.admin-body) .brand-name{font-weight:750;font-size:17px;letter-spacing:-.3px}
body:not(.admin-body) .brand-en{
  font-size:10px;letter-spacing:.12em;color:#9ca3af;
  border:1px solid rgba(17,24,39,.1);border-radius:5px;padding:1px 5px;
}

/* 首屏 */
body:not(.admin-body) .hero{padding:64px 0 24px}
body:not(.admin-body) .hero-title{
  font-size:clamp(27px,4.2vw,42px);font-weight:800;letter-spacing:-1.2px;
  margin:0 0 26px;color:#111827;
}
body:not(.admin-body) .searchbox{
  max-width:690px;border-radius:20px;padding:18px 20px 14px;
  border:1px solid rgba(17,24,39,.08);
  box-shadow:0 6px 18px -14px rgba(17,24,39,.22), 0 1px 2px rgba(17,24,39,.04);
  transition:box-shadow .18s,border-color .18s;
}
body:not(.admin-body) .searchbox:focus-within{
  border-color:rgba(79,70,229,.5);
  box-shadow:0 0 0 3px rgba(79,70,229,.14);
}
body:not(.admin-body) .searchbox input[type=search]{font-size:17px;padding:10px 2px 14px}
body:not(.admin-body) .btn-search{
  width:44px;height:44px;
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  box-shadow:0 10px 22px -10px rgba(79,70,229,.85);
}
body:not(.admin-body) .btn-search:hover{background:linear-gradient(135deg,#4338ca,#6d28d9)}
body:not(.admin-body) .pills{background:#f3f4f8;border-radius:10px;padding:3px}
body:not(.admin-body) .pill{border-radius:8px;padding:5px 12px}
body:not(.admin-body) .pill.active{color:var(--brand);box-shadow:0 1px 3px rgba(17,24,39,.1)}

/* 快捷词 */
body:not(.admin-body) .hot-words{margin-top:20px;gap:8px}
body:not(.admin-body) .hot-words-label{color:#9ca3af;font-size:12px}
body:not(.admin-body) .chip{
  border-radius:999px;background:rgba(255,255,255,.86);
  border:1px solid rgba(17,24,39,.08);color:#374151;
  padding:6px 13px;font-size:12.5px;box-shadow:0 1px 2px rgba(17,24,39,.03);
  transition:transform .15s,border-color .15s,color .15s,box-shadow .15s;
}
body:not(.admin-body) .chip:hover{
  border-color:rgba(79,70,229,.45);color:var(--brand);
  transform:translateY(-1px);box-shadow:0 10px 20px -14px rgba(79,70,229,.8);
}

/* 列表页头部 */
body:not(.admin-body) .page-head{margin:36px 0 16px}
body:not(.admin-body) .page-title{font-size:24px;font-weight:800;letter-spacing:-.6px;margin:0 0 6px}
body:not(.admin-body) .page-sub{font-size:13px;color:var(--muted);margin:0}
body:not(.admin-body) .filters{margin:0 0 18px}

/* 区块标题 */
body:not(.admin-body) .section-head{display:flex;align-items:baseline;justify-content:space-between;margin:0 0 14px}
body:not(.admin-body) .section-title{font-size:16px;font-weight:700;margin:0;letter-spacing:-.2px}
body:not(.admin-body) .section-more{font-size:12.5px;color:var(--muted)}
body:not(.admin-body) .section-more:hover{color:var(--brand)}

/* 卡片 */
body:not(.admin-body) .card{
  border-radius:16px;border:1px solid rgba(17,24,39,.07);
  box-shadow:0 1px 2px rgba(17,24,39,.03);
  transition:transform .16s,box-shadow .16s,border-color .16s;
}
body:not(.admin-body) .card-link:hover{
  transform:translateY(-2px);border-color:rgba(79,70,229,.25);
  box-shadow:0 18px 34px -22px rgba(17,24,39,.35);
}
body:not(.admin-body) .card-title{font-size:14.5px;font-weight:600;line-height:1.5}
body:not(.admin-body) .card-meta{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}
.dot-ok{width:6px;height:6px;border-radius:50%;background:#10b981;display:inline-block;flex:none}

/* 结果页 */
body:not(.admin-body) .result-meta{font-size:13px;color:var(--muted)}
body:not(.admin-body) .result-card{border-radius:14px;padding:16px 18px}
body:not(.admin-body) .result-card:hover{border-color:rgba(79,70,229,.22);box-shadow:0 14px 30px -24px rgba(17,24,39,.4)}
body:not(.admin-body) .result-title{font-size:15px;font-weight:600}
body:not(.admin-body) .btn-primary{
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
  box-shadow:0 10px 22px -14px rgba(79,70,229,.9);
}
body:not(.admin-body) .btn-primary:hover{background:linear-gradient(135deg,#4338ca,#6d28d9)}

/* 详情页 / 弹窗 */
body:not(.admin-body) .detail{border-radius:18px;border:1px solid rgba(17,24,39,.07);box-shadow:0 18px 40px -30px rgba(17,24,39,.4)}
body:not(.admin-body) .scan-card{border-radius:20px;box-shadow:0 30px 60px -24px rgba(17,24,39,.45)}

/* 页脚 */
body:not(.admin-body) .footer{border-top:1px solid rgba(17,24,39,.06);background:transparent;margin-top:56px}

/* ============================================================
   H5 适配（手机优先，覆盖前面的桌面规则）
   ============================================================ */
.hot-words-label{font-size:12px;color:var(--muted);flex:none;margin-right:2px}
.hot-words--compact{margin:10px 0 2px;gap:6px}
.hot-words--compact .chip{font-size:12px;padding:4px 10px;margin:0}

@media (max-width: 640px){
  html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
  body{font-size:14px}
  /* 两侧留白：顶栏按钮、卡片都不贴边 */
  .container{padding:0 18px}

  /* 顶栏 */
  .topbar-inner{height:52px}
  .brand{font-size:15px;gap:6px}
  .brand-dot{width:8px;height:8px;border-radius:3px}

  /* 首页 hero */
  .hero{padding:30px 0 14px}
  .hero-title{font-size:22px;line-height:1.3;margin-bottom:6px}
  .hero-sub{font-size:12.5px;margin-bottom:18px}
  .searchbox{padding:10px 12px 8px;border-radius:12px}
  .searchbox input[type=search]{font-size:15px;padding:6px 2px 10px}
  .searchbox-row{gap:8px}
  .searchbox-foot{gap:8px;flex-wrap:nowrap}
  .pills{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:3px}
  .pills::-webkit-scrollbar{display:none}
  .pill{padding:4px 8px;font-size:11.5px;white-space:nowrap}
  .hot-words .chip:nth-of-type(n+11){display:none}
  .btn-search{width:36px;height:36px;flex:none}
  .hot-words{margin-top:10px;gap:6px}
  .hot-words .chip{font-size:12px;padding:4px 10px;margin:0}
  .hero-stats{font-size:12px;margin-top:12px}

  /* 区块与卡片 */
  .section{margin:26px 0}
  .section-title{font-size:14px;margin-bottom:10px}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .card{padding:12px;border-radius:12px}
  .card-title{font-size:13px;-webkit-line-clamp:2}
  .card-meta{font-size:11px;margin-top:6px}
  .badge{font-size:10px;padding:2px 6px}

  /* 结果页 */
  .search-head{margin:16px 0 12px}
  .searchbox-sm{padding:8px 10px;margin-bottom:10px}
  .filters{overflow-x:auto;flex-wrap:nowrap;gap:5px;padding-bottom:2px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .filters::-webkit-scrollbar{display:none}
  .filters .pill{white-space:nowrap;flex:none}
  .result-meta{font-size:12px}
  .result-card{padding:12px;gap:10px}
  .result-title{font-size:14px;line-height:1.5}
  .result-action .btn-primary{width:100%;text-align:center;padding:9px 14px;font-size:13px}
  .pager{gap:8px;margin:20px 0}
  .pager-btn{padding:6px 14px;font-size:12.5px}

  /* 详情页 */
  .detail{padding:16px;border-radius:12px}
  .detail-title{font-size:18px}
  .detail-desc{font-size:13px}
  .detail-actions{flex-direction:column;align-items:stretch;gap:10px}
  .detail-actions .btn-lg{width:100%;text-align:center}
  .notice{font-size:12px;padding:10px 12px}
  .crumbs{font-size:12px;margin:14px 0 10px}

  /* 扫码弹窗 */
  .scan-mask{padding:14px;align-items:flex-start;overflow-y:auto}
  .scan-card{width:100%;max-width:400px;margin:auto;padding:22px 18px;border-radius:16px}
  .scan-title{font-size:16px}
  .scan-tip{font-size:12px}
  .scan-qr{width:170px;height:170px;padding:10px}
  .scan-res-title{font-size:13px}
  .scan-actions{flex-direction:column;gap:8px}
  .scan-actions .btn-primary,.scan-actions .btn-ghost{width:100%;text-align:center;padding:11px 16px}

  .footer{margin-top:34px;padding:18px 0;font-size:11px}
}

@media (max-width: 380px){
  .hero-title{font-size:19px}
  .grid{grid-template-columns:1fr}
  .hero{padding:22px 0 10px}
}

/* ---------- 首页副标题 / 举报页 ---------- */
body:not(.admin-body) .hero-sub{margin:0 0 24px;font-size:13.5px;color:var(--muted)}
body:not(.admin-body) .hero-sub strong{font-size:15px;color:#111827;font-weight:750;font-variant-numeric:tabular-nums}
body:not(.admin-body) .hero-sub .dot{margin:0 7px;color:#d1d5db}

.report-form{max-width:640px;background:#fff;border:1px solid rgba(17,24,39,.07);border-radius:18px;padding:26px;box-shadow:0 12px 34px -26px rgba(17,24,39,.4)}
.report-field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px}
.report-field label{font-size:13px;color:#374151;font-weight:600}
.report-field label em{color:#ef4444;font-style:normal}
.report-field .form-input{width:100%;padding:11px 13px;border:1px solid var(--border);border-radius:10px;font-size:14px;background:#fff}
.report-field .form-input:focus{outline:none;border-color:rgba(79,70,229,.5);box-shadow:0 0 0 3px rgba(79,70,229,.12)}
.report-actions{display:flex;gap:10px;align-items:center;margin-top:8px}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.report-done{text-align:center;padding:72px 0}
.report-ok{width:56px;height:56px;border-radius:50%;background:#ecfdf5;color:#10b981;display:grid;place-items:center;margin:0 auto 18px}
.report-done .page-sub{margin:8px 0 22px}
.footer-note{color:#9ca3af;margin:0 0 6px}

/* 举报页 select 高度对齐 */
.report-field select.form-input{
  height:44px;padding:0 36px 0 13px;line-height:42px;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;
}

/* ---------- 账号 / 收藏 ---------- */
body:not(.admin-body) .top-account{display:flex;align-items:center;gap:14px}
body:not(.admin-body) .top-link{
  font-size:13.5px;color:#4b5563;text-decoration:none;background:none;border:0;cursor:pointer;padding:0;
}
body:not(.admin-body) .top-link:hover{color:var(--brand)}
body:not(.admin-body) .top-link--primary{
  background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;
  padding:6px 14px;border-radius:9px;font-weight:600;
  box-shadow:0 8px 18px -12px rgba(79,70,229,.9);
}
body:not(.admin-body) .top-link--primary:hover{color:#fff;filter:brightness(1.05)}
body:not(.admin-body) .top-link--ghost{color:#9ca3af}

.auth-wrap{display:flex;justify-content:center;padding:56px 0 24px}
.auth-card{width:100%;max-width:420px;background:#fff;border:1px solid rgba(17,24,39,.07);border-radius:20px;padding:30px 28px;box-shadow:0 20px 50px -36px rgba(17,24,39,.5)}
.auth-title{font-size:24px;font-weight:800;letter-spacing:-.5px;margin:0 0 6px}
.auth-sub{font-size:13px;color:var(--muted);margin:0 0 20px}
.auth-form{display:flex;flex-direction:column;gap:14px}
.auth-form .btn-lg{width:100%;margin-top:4px}
.auth-form .report-field{margin-bottom:0}
.auth-foot{font-size:13px;color:var(--muted);text-align:center;margin:18px 0 0}
.auth-foot a{color:var(--brand);font-weight:600}
.auth-code{letter-spacing:8px;font-size:20px;text-align:center;font-variant-numeric:tabular-nums}
.auth-resend{font-size:13px;color:var(--muted);text-align:center;margin-top:14px}

.fav-btn{
  width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:#fff;
  color:#c7cbd4;font-size:16px;cursor:pointer;transition:.15s;line-height:1;
}
.fav-btn:hover{border-color:#f0b100;color:#f0b100;background:#fffbeb}
.fav-btn.on{color:#f0b100;border-color:#fde68a;background:#fffbeb}
.fav-lg{height:44px;font-size:14px;min-width:110px}
.fav-lg.on{color:#b45309;border-color:#fde68a;background:#fffbeb}
.result-action{display:flex;align-items:center;gap:10px}

.me-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:22px}
.me-card{background:#fff;border:1px solid rgba(17,24,39,.07);border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:6px;text-decoration:none}
.me-card:hover{border-color:rgba(79,70,229,.3)}
.me-num{font-size:24px;font-weight:800;letter-spacing:-.5px}
.me-label{font-size:12.5px;color:var(--muted)}
.me-actions{display:flex;gap:10px}
@media (max-width:640px){
  body:not(.admin-body) .top-account{gap:10px}
  .auth-wrap{padding:30px 0 12px}
  .auth-card{padding:22px 18px;border-radius:16px}
  .result-action{gap:8px}
  .fav-btn{width:34px;height:34px}
}

/* ---------- 预热队列宫格 ---------- */
.kw-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(212px,1fr));gap:10px}
.kw-tile{background:#fff;border:1px solid var(--border);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:8px;transition:border-color .15s,box-shadow .15s}
.kw-tile:hover{border-color:#d7dbe2;box-shadow:0 10px 24px -20px rgba(16,24,40,.45)}
.kw-tile-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.kw-word{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kw-tile-meta{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;color:var(--muted)}
.kw-snap{font-size:11.5px}
.kw-snap.ok{color:#15803d;font-weight:500}
.kw-snap.dim{color:#9ca3af}
.kw-tile-actions{display:flex;gap:6px;margin-top:2px}
.kw-tile-actions .chip-btn{font-size:11.5px;padding:4px 9px}
@media (max-width:640px){.kw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- 深度索引 ---------- */
body:not(.admin-body) .deep-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 14px}
body:not(.admin-body) .deep-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
body:not(.admin-body) .deep-btn{border-color:rgba(79,70,229,.35);color:var(--brand);background:#f5f3ff;font-weight:600}
body:not(.admin-body) .deep-btn:hover{background:#ede9fe;border-color:rgba(79,70,229,.55)}
body:not(.admin-body) .deep-btn[disabled]{opacity:.6;cursor:wait}

/* ---------- 头像 / 账户条 ---------- */
body:not(.admin-body) .avatar{
  width:36px;height:36px;border-radius:50%;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#4f46e5,#a855f7);
  color:#fff;font-weight:700;font-size:15px;line-height:1;
  text-decoration:none;
  box-shadow:0 8px 18px -12px rgba(79,70,229,.95);
  transition:transform .15s,box-shadow .15s;
}
body:not(.admin-body) .avatar:hover{transform:translateY(-1px);box-shadow:0 10px 22px -12px rgba(79,70,229,1)}
body:not(.admin-body) .account-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
@media (max-width:640px){
  body:not(.admin-body) .avatar{width:32px;height:32px;font-size:14px}
}

/* ---------- 首页标题打字机 ---------- */
body:not(.admin-body) .hero-title{min-height:1.25em}
body:not(.admin-body) .type-cursor{
  display:inline-block;margin-left:3px;
  color:var(--brand);font-weight:600;
  animation:type-caret 1s step-end infinite;
}
@keyframes type-caret{0%,100%{opacity:1}50%{opacity:0}}
@media (prefers-reduced-motion: reduce){
  body:not(.admin-body) .type-cursor{animation:none}
}

/* 小屏副标题：只保留「已收录 / 覆盖片单」，第三段隐藏避免孤立换行 */
@media (max-width:640px){
  .seg-update{display:none}
  body:not(.admin-body) .hero-sub{font-size:12.5px;line-height:1.6}
}

/* ---------- 详情页收藏图标（右上角） ---------- */
body:not(.admin-body) .detail{position:relative}
body:not(.admin-body) .detail-badges{padding-right:58px}
body:not(.admin-body) .detail-fav{position:absolute;top:14px;right:14px;margin:0;z-index:2}
body:not(.admin-body) .fav-icon{
  width:44px;height:44px;border-radius:50%;
  display:grid;place-items:center;
  background:#fff;border:1px solid rgba(17,24,39,.1);
  color:#c2c7d0;cursor:pointer;
  box-shadow:0 8px 20px -14px rgba(17,24,39,.6);
  transition:color .15s,border-color .15s,background .15s,transform .15s;
}
body:not(.admin-body) .fav-icon:hover{color:#f0b100;border-color:#fde68a;transform:translateY(-1px)}
body:not(.admin-body) .fav-icon:active{transform:scale(.96)}
body:not(.admin-body) .fav-icon.on{color:#f0b100;background:#fffbeb;border-color:#fde68a}
body:not(.admin-body) .fav-icon.on svg{fill:currentColor}
@media (max-width:640px){
  body:not(.admin-body) .detail-fav{top:12px;right:12px}
  body:not(.admin-body) .fav-icon{width:42px;height:42px}
  body:not(.admin-body) .detail-badges{padding-right:54px}
}

/* ---------- 列表卡片：右上收藏 + 链接状态 ---------- */
body:not(.admin-body) .result-card,
body:not(.admin-body) .hot-card{position:relative}
body:not(.admin-body) .card-fav{position:absolute;top:14px;right:14px;z-index:2;margin:0}
body:not(.admin-body) .result-card{align-items:stretch}
body:not(.admin-body) .result-card .result-action{
  display:flex;align-items:flex-end;justify-content:flex-end;
  padding-top:46px;
}
body:not(.admin-body) .result-card .card-top,
body:not(.admin-body) .hot-card .card-top{padding-right:46px}
body:not(.admin-body) .fav-icon--sm{width:36px;height:36px;box-shadow:0 6px 16px -12px rgba(17,24,39,.55)}
body:not(.admin-body) .fav-icon--sm svg{width:17px;height:17px}

body:not(.admin-body) .link-state{
  font-size:11px;line-height:1;padding:4px 7px;border-radius:6px;
  background:#f3f4f6;color:#9aa1ac;font-weight:500;
}
body:not(.admin-body) .link-state--ok{background:#ecfdf5;color:#059669}
body:not(.admin-body) .card-detail-link{
  margin-left:auto;font-size:12px;color:#9aa1ac;text-decoration:none;
}
body:not(.admin-body) .card-detail-link:hover{color:var(--brand)}
body:not(.admin-body) .fav-date{font-size:12px}

/* H5：标题即入口，隐藏整块「获取资源」按钮 */
@media (max-width:640px){
  body:not(.admin-body) .result-card .result-action{display:none}
  body:not(.admin-body) .result-card .card-fav,
  body:not(.admin-body) .hot-card .card-fav{top:12px;right:12px}
}

/* ---------- 扫码弹窗：获取中状态 ---------- */
.scan-status{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin:14px 0 0;font-size:13.5px;color:#6b7280;
}
.scan-status[hidden]{display:none}
.scan-spinner--sm{width:14px;height:14px;border-width:2px}
.scan-actions .is-disabled{
  opacity:.45;pointer-events:none;filter:grayscale(.15);
  box-shadow:none!important;
}
.prep-tip{margin:6px 0 18px;font-size:13px;color:#9aa1ac}

/* ---------- 轻提示 ---------- */
.toast{
  position:fixed;left:50%;bottom:40px;z-index:120;
  transform:translateX(-50%) translateY(8px);
  background:rgba(17,24,39,.92);color:#fff;
  font-size:13.5px;line-height:1;padding:11px 18px;border-radius:10px;
  box-shadow:0 12px 30px -14px rgba(0,0,0,.6);
  opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast[hidden]{display:none}

/* ---------- 搜索中 / 检测状态 / 深度索引提示 ---------- */
.search-loading{
  display:flex;align-items:center;gap:8px;
  padding:10px 2px;font-size:13px;color:#8b919c;
}
.search-loading[hidden]{display:none}
.spinner-sm{
  width:14px;height:14px;border-radius:50%;
  border:2px solid rgba(79,70,229,.25);border-top-color:#4f46e5;
  animation:spin-sm .8s linear infinite;display:inline-block;
}
@keyframes spin-sm{to{transform:rotate(360deg)}}

.link-state.is-checking{background:#fff7ed;color:#c2410c}
.link-state--invalid{background:#fef2f2;color:#dc2626}

.deep-note{font-size:13px;color:#4f46e5;font-weight:500}
.deep-note[hidden]{display:none}

/* 整页搜索中遮罩 */
.page-loading{
  position:fixed; inset:0; z-index:200;
  display:flex;align-items:center;justify-content:center;gap:10px;
  background:rgba(255,255,255,.72);backdrop-filter:blur(2px);
  font-size:14px;color:#4b5563;
}
.page-loading[hidden]{display:none}

/* ---------- 扫码弹窗：信息标签与微信提示 ---------- */
.scan-meta{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:-4px 0 12px}
.scan-chip{
  font-size:11.5px;line-height:1;padding:5px 9px;border-radius:999px;
  background:#f3f4f6;color:#6b7280;
}
.scan-chip--brand{background:#eef2ff;color:#4f46e5;font-weight:600}
.scan-chip--code{background:#fff7ed;color:#c2410c;font-weight:600}

.scan-tip-note{
  margin:12px 0 2px;padding:9px 14px;border-radius:12px;
  background:#f8f9fb;font-size:12.5px;line-height:1.6;color:#6b7280;text-align:center;
}
.scan-tip-note a{color:#4f46e5;text-decoration:none;font-weight:600}
.scan-tip-note a:hover{text-decoration:underline}
.scan-tip-note b{color:#4f46e5;font-weight:600}

/* 弹窗内容变长时允许滚动 */
.scan-card{max-height:92vh;overflow-y:auto}

/* ---------- 群聊与网站地图 ---------- */
.group-card{
  max-width:360px;margin:24px auto;padding:24px;background:#fff;border:1px solid #eef0f3;
  border-radius:18px;text-align:center;box-shadow:0 8px 30px rgba(17,24,39,.06);
}
.group-qr{width:220px;height:220px;object-fit:contain;border-radius:12px;background:#fff}
.group-tip{margin:14px 0 0;font-size:13px;color:#6b7280;line-height:1.6}
.group-empty{color:#9ca3af;font-size:13px;padding:60px 0}

.scan-group-qr{
  display:flex;align-items:center;gap:10px;margin:10px 0 2px;padding:8px 10px;
  border-radius:12px;background:#f8f9fb;text-decoration:none;color:#6b7280;font-size:12px;
}
.scan-group-qr img{width:46px;height:46px;object-fit:contain;border-radius:8px;background:#fff}
.scan-group-qr:hover{background:#f1f3f7}

.sitemap-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}
.sitemap-block{background:#fff;border:1px solid #eef0f3;border-radius:16px;padding:18px 20px}
.sitemap-block--wide{grid-column:1/-1}
.sitemap-block h2{margin:0 0 12px;font-size:15px;font-weight:600;color:#111827}
.sitemap-block ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.sitemap-block li{font-size:13.5px;color:#374151;display:flex;gap:8px;align-items:baseline}
.sitemap-block a{color:#374151;text-decoration:none}
.sitemap-block a:hover{color:#4f46e5;text-decoration:underline}
.sitemap-tags{display:flex;flex-wrap:wrap;gap:8px}
.sitemap-tags a{font-size:12.5px;padding:5px 10px;border-radius:999px;background:#f3f4f6;color:#4b5563;text-decoration:none}
.sitemap-tags a:hover{background:#eef2ff;color:#4f46e5}
.sitemap-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px 18px!important}
.sitemap-list li{justify-content:space-between}
@media (max-width:640px){ .sitemap-grid{grid-template-columns:1fr} }

/* ---------- 桌面端扫码弹窗：紧凑版，一屏不滚动 ---------- */
@media (min-width: 641px){
  .scan-card{padding:22px 24px 16px;max-width:370px}
  .scan-check{width:42px;height:42px;margin-bottom:8px}
  .scan-title{font-size:17px;margin-bottom:4px}
  .scan-tip{font-size:11.5px;margin-bottom:12px}
  .scan-qr{width:176px;height:176px;padding:9px;margin-bottom:10px}
  .scan-res-title{font-size:13px;margin-bottom:9px;-webkit-line-clamp:2}
  .scan-meta{margin:-2px 0 9px;gap:5px}
  .scan-chip{font-size:11px;padding:4px 8px}
  .scan-actions{margin-bottom:10px}
  .scan-actions .btn-primary,.scan-actions .btn-ghost{padding:8px 14px;font-size:12.5px}
  .scan-tip-note{margin:10px 0 2px;padding:8px 12px;font-size:12px}
  .scan-divider{margin:2px 0 10px}
  .scan-warn{font-size:11.5px;margin-bottom:4px}
}

/* ---------- 资源弹层（iframe 叠加，背景列表保持可见） ---------- */
body.embed-body{background:transparent!important}
body.scan-open{overflow:hidden}
.scan-embed{
  position:fixed; inset:0; z-index:9999; background:transparent;
}
.scan-embed iframe{
  display:block; width:100%; height:100%; border:0; background:transparent;
}
