/* ============================================================
   三档断点
   手机   < 768px
   Pad    768 – 1079px
   电脑   ≥ 1080px
   ============================================================ */

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --line: #e6e8eb;
  --brand: #7c5ce5;
  --brand-soft: #f3efff;
  --brand-line: #ddd2ff;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 12px;

  --wrap: 720px;
  --pad: 14px;
  --gap: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }

/* ---------- 容器 ---------- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.wrap.wrap-admin { max-width: 720px; }

.layout { display: block; }
.main { min-width: 0; }
.side { display: none; }

/* ---------- 顶部胶囊 ---------- */

.pagehead { padding: 10px 0 0; }

.pagehead-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.ph-cap {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, #8f74f2 0%, #6d48d9 100%);
  box-shadow: 0 10px 24px rgba(109, 72, 217, 0.22);
}

.ph-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.ph-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }

.ph-name {
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.ph-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  flex: 0 0 4px;
}

.ph-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-promo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.ph-promo .qqtxt { overflow: hidden; text-overflow: ellipsis; }
.ph-promo img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 18px;
}

.ph-stats {
  flex: 0 0 auto;
  width: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.ph-mini {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 6px;
  text-align: center;
  line-height: 1.2;
}
.ph-mini b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.ph-mini span { font-size: 10px; color: rgba(255, 255, 255, 0.8); }

/* ---------- 求资料页的极简顶栏 ---------- */

.slimnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 4px;
}
.slimnav-home { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.slimnav-back { font-size: 13px; color: var(--muted); }

/* ---------- 品牌字（后台还在用） ---------- */

.brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.brand img { width: 26px; height: 26px; display: block; }

/* ---------- 浮动入口 ---------- */

.fab {
  position: fixed;
  right: 14px;
  bottom: 20px;
  z-index: 70;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(124, 92, 229, 0.35);
}
.fab:active { opacity: .85; }

/* ---------- 搜索与筛选 ---------- */

.searchbar { margin: 14px 0 10px; display: flex; gap: 8px; }

.searchbar input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.searchbar input:focus { border-color: var(--brand); }
.searchbar button {
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.cats a.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 资料卡片 ---------- */

.list { display: flex; flex-direction: column; gap: var(--gap); padding-bottom: 24px; }

/* 局部刷新时的过渡，避免白屏 */
#result { transition: opacity .15s ease; }
#result.loading { opacity: .45; pointer-events: none; }

.item {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.item:active { background: #fafbfc; }

.item h3 {
  margin: 0 0 4px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
}

.item .sum {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11.5px;
  color: var(--muted);
  background: #f2f3f5;
  border-radius: 5px;
  padding: 2px 7px;
}

.pan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  padding: 2px 7px;
}
.pan-baidu { color: #1a56db; background: #e8f0fe; }
.pan-quark { color: #7c3aed; background: #f1eaff; }
.pan-other { color: #374151; background: #eef0f2; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 14px;
}

/* ---------- 区块标题 ---------- */

.sechead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0 10px;
}
.sechead h2 { margin: 0; font-size: 15px; font-weight: 700; }
.sechead span { font-size: 12.5px; color: var(--muted); }

/* ---------- 资料网格 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 24px;
}
.grid .empty { grid-column: 1 / -1; }

.card-item {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  color: inherit;
  min-height: 118px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card-item:active { background: #fafbfc; }

.ci-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.ci-top .pan {
  font-size: 10.5px;
  padding: 2px 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.ci-cat {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted);
  background: #f2f3f5;
  border-radius: 5px;
  padding: 2px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ci-title { display: flex; gap: 7px; align-items: flex-start; flex: 1; }
.ci-ico { width: 18px; height: 18px; flex: 0 0 18px; color: var(--brand); margin-top: 2px; }
.ci-title h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ci-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ci-size { font-size: 11px; color: #9ca3af; }
.ci-go {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

/* ---------- 侧栏（仅电脑端） ---------- */

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.side-card h4 {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.qqnum {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  user-select: all;
  word-break: break-all;
}

.side-qq { display: block; color: inherit; }
.side-qq-go { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--brand); }

.hotlist { margin: 0; padding-left: 18px; }
.hotlist li { margin-bottom: 8px; font-size: 13.5px; line-height: 1.45; }
.hotlist li:last-child { margin-bottom: 0; }
.hotlist a { color: var(--text); }
.hotlist a:hover { color: var(--brand); }

.side-cta {
  display: block;
  text-align: center;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 13.5px;
  font-weight: 600;
}

.promo-side {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  text-align: center;
}
.promo-side img { width: 100%; display: block; }
.promo-side .t { padding: 10px 12px; font-size: 13px; color: var(--brand); font-weight: 600; line-height: 1.45; }

/* ---------- 分页 ---------- */

.pager { display: flex; gap: 10px; justify-content: center; padding: 6px 0 30px; }
.pager a, .pager span {
  padding: 7px 16px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}
.pager span { color: var(--text); border-color: transparent; background: transparent; }

/* ---------- 详情页 ---------- */

.detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 0;
}

.detail h1 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 700;
}

.detail .desc {
  color: #374151;
  font-size: 14.5px;
  white-space: pre-wrap;
  margin: 0 0 14px;
}

.kv { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv .k { color: var(--muted); flex: 0 0 62px; }
.kv .v { color: var(--text); }

.getbox { max-width: 100%; }

.btn-get {
  display: block;
  width: 100%;
  height: 48px;
  line-height: 48px;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-top: 16px;
  cursor: pointer;
  font-family: inherit;
}
.btn-get:active { opacity: .85; }
.btn-get.ghost { background: #f2f3f5; color: var(--muted); }

.gethint { text-align: center; font-size: 12px; color: #9ca3af; margin-top: 8px; }

.linkbox {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 14px;
  background: #fafbfc;
}
.linkbox h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; }

.panrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}
.panrow:first-of-type { border-top: none; padding-top: 0; }
.panrow .name { font-size: 13.5px; font-weight: 600; flex: 0 0 auto; }
.panrow .code { font-size: 13px; color: var(--muted); }
.panrow .go {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 24, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.modal.show { display: flex; }

.modal-in {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  padding: 22px 20px 20px;
  text-align: center;
}

.modal-in h3 { margin: 0 0 8px; font-size: 17px; }
.modal-in p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.qqbox {
  background: #f4f5f7;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}
.qqbox .lab { font-size: 12px; color: var(--muted); }
.qqbox .num { font-size: 20px; font-weight: 700; letter-spacing: 1px; margin-top: 2px; user-select: all; }
.qqbox .copy { font-size: 12px; color: var(--brand); margin-top: 6px; cursor: pointer; }

.codeform { display: flex; gap: 8px; }
.codeform input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  text-align: center;
  letter-spacing: 1px;
}
.codeform button {
  height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.modal-close { margin-top: 14px; font-size: 13px; color: var(--muted); cursor: pointer; }
.msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.msg.ok { color: var(--ok); }
.msg.bad { color: #dc2626; }

/* ---------- 求资源 ---------- */

.req {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.req.done { opacity: .62; }
.req .who { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.req .txt { margin: 8px 0 10px; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.req .foot { display: flex; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.req .foot a, .req .foot button {
  border: none; background: none; padding: 0; font-size: 12.5px; color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.req .foot .liked { color: var(--brand); font-weight: 600; }

.badge-done { font-size: 11px; background: #e7f7ee; color: var(--ok); padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.badge-open { font-size: 11px; background: var(--brand-soft); color: var(--brand); padding: 2px 7px; border-radius: 5px; font-weight: 600; }

.formbox {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}
.formbox textarea {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.formbox textarea:focus { border-color: var(--brand); }
.formbox .row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.formbox .row .hint { font-size: 12px; color: var(--muted); }
.formbox .row button {
  margin-left: auto;
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.reply {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.reply .who { font-size: 12px; color: var(--muted); }
.reply .txt { margin: 5px 0 0; font-size: 14px; white-space: pre-wrap; }

.alert {
  background: #fff4f4;
  border: 1px solid #fbd5d5;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-bottom: 12px;
}
.alert.ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }

/* ---------- 引流位 ---------- */

.promo-top {
  display: block;
  margin: 12px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--brand-soft);
  text-align: center;
}
.promo-top img { width: 100%; display: block; }
.promo-top .t { padding: 10px 14px; font-size: 13.5px; color: var(--brand); font-weight: 600; }

.promo-float {
  position: fixed;
  right: 14px;
  bottom: 74px;
  z-index: 60;
  width: 96px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(20, 24, 30, .1);
  overflow: hidden;
  text-align: center;
}
.promo-float img { width: 100%; display: block; }
.promo-float .t { font-size: 11px; padding: 6px 4px; color: var(--muted); line-height: 1.35; }

.promo-detail {
  display: block;
  margin-top: 16px;
  border: 1px dashed var(--brand-line);
  background: #f8faff;
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.promo-detail img { max-width: 100%; border-radius: 8px; }
.promo-detail .t { font-size: 13.5px; color: var(--brand); font-weight: 600; }

/* 页脚文字已去掉，留出底部空白 */
body { padding-bottom: 56px; }

/* ---------- 后台 ---------- */

.admin-top {
  background: #111827;
  color: #fff;
  padding: 10px 0;
}
.admin-top .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-top .brand { color: #fff; font-size: 15px; }
.admin-top nav { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.admin-top nav a { color: #c7cdd6; font-size: 13.5px; }
.admin-top nav a.on { color: #fff; font-weight: 600; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }

.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.stat .n { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
td .sub { color: var(--muted); font-size: 12px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input[type=text], .field input[type=password], .field input[type=number],
.field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field textarea { min-height: 80px; resize: vertical; }
.field .tip { font-size: 12px; color: #9ca3af; margin-top: 4px; }

.btn {
  display: inline-block;
  height: 38px;
  line-height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn.ghost { background: #f2f3f5; color: var(--text); }
.btn.danger { background: #fef2f2; color: #b91c1c; }
.btn.sm { height: 30px; line-height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }

.rowflex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.linkrow { display: grid; grid-template-columns: 110px 1fr 100px; gap: 8px; margin-bottom: 8px; }

.codebig {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--brand);
  user-select: all;
}

/* ============================================================
   Pad  768 – 1079px
   ============================================================ */

@media (min-width: 768px) {
  :root {
    --wrap: 780px;
    --pad: 24px;
    --gap: 12px;
  }

  .wrap.wrap-admin { max-width: 780px; }

  .brand { font-size: 17px; }
  .brand img { width: 28px; height: 28px; }

  .pagehead { padding: 16px 0 0; }
  .ph-cap { padding: 15px 18px; border-radius: 24px; }
  .ph-name { font-size: 21px; }
  .ph-tagline { font-size: 13px; }
  .ph-promo { font-size: 12.5px; padding: 6px 14px; }
  .ph-stats { width: 96px; gap: 7px; }
  .ph-mini { padding: 5px 8px; }
  .ph-mini b { font-size: 14.5px; }
  .ph-mini span { font-size: 10.5px; }

  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .card-item { padding: 13px; min-height: 126px; }
  .ci-title h3 { font-size: 14px; }

  .searchbar { margin: 20px 0 12px; }
  .searchbar input { height: 46px; font-size: 15.5px; }
  .searchbar button { height: 46px; padding: 0 24px; }

  .cats { flex-wrap: wrap; overflow: visible; padding-bottom: 16px; }
  .cats a { padding: 7px 16px; font-size: 13.5px; }

  .item { padding: 16px 18px; }
  .item h3 { font-size: 16px; }
  .item .sum { font-size: 14px; }

  .detail { padding: 22px 24px; }
  .detail h1 { font-size: 21px; }
  .detail .desc { font-size: 15px; }

  .card { padding: 20px; }
  .statgrid { grid-template-columns: repeat(4, 1fr); }

  .req { padding: 16px 18px; }
  .req .txt { font-size: 15px; }

  body { padding-bottom: 64px; }
}

/* ============================================================
   电脑  ≥ 1080px
   ============================================================ */

@media (min-width: 1080px) {
  :root {
    --wrap: 1120px;
    --pad: 24px;
    --gap: 12px;
  }

  .wrap.wrap-admin { max-width: 1040px; }

  .pagehead-in { padding: 0 var(--pad); }
  .ph-cap { padding: 18px 22px; border-radius: 26px; }
  .ph-name { font-size: 23px; }
  .ph-tagline { font-size: 13.5px; }
  .ph-stats { width: 108px; gap: 8px; }
  .ph-mini { padding: 5px 8px; }
  .ph-mini b { font-size: 15px; }
  .ph-mini span { font-size: 11px; }

  /* 两栏：正文 + 侧栏 */
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
  }

  .side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 78px;
    padding-top: 20px;
  }

  /* 引流：浮动块换成侧栏卡片 */
  .promo-float { display: none; }
  .promo-side { display: block; }

  /* 鼠标悬停 */
  .item:hover {
    border-color: var(--brand-line);
    box-shadow: 0 4px 16px rgba(124, 92, 229, .12);
  }
  .card-item:hover {
    border-color: var(--brand-line);
    box-shadow: 0 4px 16px rgba(124, 92, 229, .12);
  }
  .cats a:hover { border-color: var(--brand-line); color: var(--brand); }
  .cats a.on:hover { color: #fff; }
  .pager a:hover { border-color: var(--brand); color: var(--brand); }
  .hotlist a { transition: color .12s ease; }

  /* 详情页按钮不再满宽 */
  .getbox { max-width: 420px; }
  .detail { margin: 20px 0; }

  .promo-top { margin-top: 20px; }

  body { padding-bottom: 72px; }
}

/* ============================================================
   小屏手机
   ============================================================ */

@media (max-width: 480px) {
  .linkrow { grid-template-columns: 1fr; }
  .promo-float { width: 78px; bottom: 70px; }
  .brand { font-size: 15px; }
  .ph-name { font-size: 18px; }
  .ph-stats { width: 78px; }
  .detail { padding: 16px; }
  .card { padding: 14px; }
  th, td { padding: 8px 6px; }
}
