/* 汇誉机构评测 - 全站样式 */
:root {
  --navy: #0d1b3e;
  --navy-2: #14264f;
  --gold: #c8a45c;
  --gold-2: #e3c78e;
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e6eaf2;
  --txt: #1c2333;
  --txt-2: #5b6577;
  --txt-3: #8b93a5;
  --green: #12b76a;
  --orange: #f59e0b;
  --red: #e5484d;
  --blue: #2f6fed;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(13, 27, 62, .07);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--txt); font-size: 15px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶栏 ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: .5px; }
.brand .logo-mark {
  width: 36px; height: 36px; flex: none;
  background: url("img/logo-mark.png") center / contain no-repeat;
}
.brand small { font-size: 11px; font-weight: 400; color: var(--gold-2); display: block; line-height: 1.1; letter-spacing: 2px; }
.site-nav { display: flex; gap: 4px; margin-left: 8px; }
.site-nav a { padding: 8px 14px; border-radius: 8px; color: #c6cede; font-size: 15px; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-nav a.on { color: var(--gold-2); background: rgba(200,164,92,.14); }
.hd-search { margin-left: auto; display: flex; align-items: center; background: rgba(255,255,255,.1); border-radius: 20px; overflow: hidden; }
.hd-search input { background: transparent; border: 0; outline: 0; color: #fff; padding: 8px 14px; width: 190px; }
.hd-search input::placeholder { color: #93a0b8; }
.hd-search button { background: var(--gold); border: 0; color: #fff; padding: 8px 16px; font-size: 14px; white-space: nowrap; flex: none; }

/* ---------- 顶部广告位（6 小格） ---------- */
.ad-strip { padding: 14px 0 0; }
.ad-grid-top { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ad-grid-mid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ad-tile {
  position: relative; display: block; border-radius: 10px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); aspect-ratio: 5 / 2;
}
.ad-tile img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.ad-tile .ad-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 4px;
  align-items: center; justify-content: center; color: #b6bfce; font-size: 12px; background: #fafbfd;
}
.ad-tile .ad-ph b { font-size: 14px; color: #98a2b5; font-weight: 600; }
.ad-tile.mid-tile { aspect-ratio: 5 / 1.35; border-radius: var(--radius); box-shadow: var(--shadow); }
.ad-tile:hover { border-color: var(--gold); }

/* ---------- 两侧「对联」竖幅广告位（1:3，按屏幕宽度自适应尺寸） ---------- */
.rail { display: none; }
.rail .rail-holder { transition: opacity .34s ease; }
.rail .ad-tile.rail-tile {
  width: 100%; aspect-ratio: 1 / 3; border-radius: 10px;
  box-shadow: 0 10px 26px rgba(13, 27, 62, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.rail .ad-tile.rail-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(13, 27, 62, .2); }

/* ---------- Hero 搜索 ---------- */
.hero {
  margin-top: 16px; border-radius: 16px; padding: 44px 32px; color: #fff;
  background: linear-gradient(120deg, #0d1b3e 0%, #17295a 55%, #27407e 100%);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px;
  border-radius: 50%; background: radial-gradient(circle, rgba(200,164,92,.28), transparent 65%);
}
.hero h1 { font-size: 30px; letter-spacing: 1px; }
.hero p { color: #aeb9d2; margin-top: 8px; font-size: 14px; }
.hero-search { margin-top: 22px; display: flex; max-width: 620px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.hero-search input { flex: 1; border: 0; outline: 0; padding: 15px 18px; font-size: 15px; }
.hero-search button { border: 0; background: var(--gold); color: #fff; padding: 0 30px; font-size: 15px; font-weight: 600; }
.hero-tags { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.hero-tags a { font-size: 12px; color: #c7d2e8; border: 1px solid rgba(255,255,255,.25); padding: 3px 12px; border-radius: 999px; }
.hero-tags a:hover { color: #fff; border-color: var(--gold-2); }
.hero-stats { display: flex; gap: 34px; margin-top: 26px; position: relative; }
.hero-stats b { font-size: 26px; color: var(--gold-2); }
.hero-stats span { display: block; font-size: 12px; color: #93a0b8; }

/* ---------- 区块 ---------- */
.sec { margin-top: 30px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.sec-head h2::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--gold); }
.sec-head .more { margin-left: auto; color: var(--blue); font-size: 14px; }
.sec-head .more:hover { text-decoration: underline; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- 排名表 ---------- */
.rank-list { overflow: hidden; }
.rank-row {
  display: grid; grid-template-columns: 50px 78px 1fr 136px 88px 134px; align-items: center;
  gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: #f8fafd; }
.rank-no {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--txt-2); background: #eef1f7; font-size: 15px;
}
.rank-no.g1 { background: linear-gradient(135deg, #ffd76e, #d9a520); color: #fff; }
.rank-no.g2 { background: linear-gradient(135deg, #e3e8ef, #a8b3c4); color: #fff; }
.rank-no.g3 { background: linear-gradient(135deg, #edb88a, #b96f3a); color: #fff; }
.bk-logo {
  width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  object-fit: contain; padding: 5px; flex: none;
}
.bk-letter {
  width: 64px; height: 64px; border-radius: 12px; flex: none; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700; font-size: 26px; letter-spacing: -.5px;
  background: linear-gradient(135deg, #2f6fed, #1c3f9e);
}
.bk-name { font-weight: 600; font-size: 15px; }
.bk-meta { color: var(--txt-3); font-size: 12.5px; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.score-chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 52px;
  padding: 4px 10px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 15px;
}
.score-bar { height: 6px; border-radius: 3px; background: #edf0f6; overflow: hidden; margin-top: 6px; }
.score-bar i { display: block; height: 100%; border-radius: 3px; }
.tag {
  display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 500;
}
.tag.low { color: #0b9155; background: #e3f8ee; }
.tag.medium { color: #b25e02; background: #fdf1dc; }
.tag.high { color: #c53030; background: #fde8e8; }
.tag.type { color: #2f5bd1; background: #e9effc; }
.mini-note { color: var(--txt-3); font-size: 12.5px; }

/* ---------- 首页入口卡 ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.entry-card { padding: 20px 22px; display: flex; gap: 14px; align-items: flex-start; }
.entry-card:hover { outline: 2px solid var(--gold-2); }
.entry-ico { width: 44px; height: 44px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #16295c, #0d1b3e); color: var(--gold-2); font-size: 20px; }
.entry-card b { font-size: 16px; }
.entry-card p { color: var(--txt-2); font-size: 13px; margin-top: 3px; }

/* ---------- 列表页 ---------- */
.page-head { margin: 22px 0 16px; }
.page-head h1 { font-size: 24px; }
.page-head p { color: var(--txt-2); font-size: 13.5px; margin-top: 4px; }
.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 16px; font-size: 13.5px; color: var(--txt-2); }
.chip.on { background: var(--navy); border-color: var(--navy); color: var(--gold-2); }
.filter-bar select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; color: var(--txt-2); }
.filter-bar .cnt { margin-left: auto; color: var(--txt-3); font-size: 13px; }

/* ---------- 详情页 ---------- */
.bk-hero { display: flex; gap: 22px; padding: 26px; align-items: center; flex-wrap: wrap; }
.bk-hero .bk-logo, .bk-hero .bk-letter { width: 92px; height: 92px; border-radius: 18px; font-size: 34px !important; }
.bk-hero-info { flex: 1; min-width: 220px; }
.bk-hero-info h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-hero-info .sub { color: var(--txt-2); font-size: 13.5px; margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.score-box { text-align: center; padding: 0 18px; }
.score-box .score-chip { font-size: 26px; min-width: 84px; padding: 10px 16px; border-radius: 12px; }
.score-box .mini-note { margin-top: 6px; }
.bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { padding: 18px 20px; }
.panel h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel h3::before { content: ""; width: 3px; height: 15px; background: var(--gold); border-radius: 2px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--txt-3); }
.kv dd { color: var(--txt); word-break: break-all; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; color: var(--txt-3); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid #f0f3f8; }
table.tbl tr:last-child td { border-bottom: 0; }
.rich { font-size: 14px; color: #2a3244; }
.rich p { margin: 8px 0; }
.rich img { max-width: 100%; }
.warn-box { background: #fff8f0; border: 1px solid #f5dcb8; border-radius: 10px; padding: 14px 16px; font-size: 13.5px; color: #8a5a16; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--txt-2); font-size: 13.5px; margin-top: 20px; }
.back-link:hover { color: var(--blue); }

/* ---------- 后台 ---------- */
.admin-wrap { max-width: 1080px; margin: 24px auto; padding: 0 16px; }
.login-card { max-width: 380px; margin: 80px auto; padding: 34px; }
.login-card h1 { font-size: 20px; margin-bottom: 18px; text-align: center; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--txt-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; outline: none; background: #fff;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; padding: 9px 18px; font-size: 14px; font-weight: 500; background: var(--navy); color: #fff; }
.btn.gold { background: var(--gold); }
.btn.ghost { background: #eef1f7; color: var(--txt-2); }
.btn.danger { background: #fdeaea; color: #c53030; }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 18px; font-size: 14px; color: var(--txt-2); }
.admin-tabs button.on { background: var(--navy); border-color: var(--navy); color: var(--gold-2); }
.admin-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-bar .who { margin-left: auto; color: var(--txt-3); font-size: 13px; }
.score-input { width: 68px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; text-align: center; }
.score-input:focus { border-color: var(--gold); outline: 0; }
.admin-row-grid { grid-template-columns: 44px 52px 1.4fr 110px 90px 92px 150px; }
.admin-top-row { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-top-row .grow { flex: 1; min-width: 140px; }
.banner-slot { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.banner-slot:last-child { border-bottom: 0; }
.banner-slot .slot-no { min-width: 26px; height: 26px; padding: 0 5px; border-radius: 6px; background: #eef1f7; color: var(--txt-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; white-space: nowrap; }
.banner-slot .prev { width: 110px; height: 46px; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; background: #fafbfd; flex: none; }
.banner-slot .prev.tall { width: 44px; height: 132px; object-fit: contain; background: #f3f5fa; }
.banner-slot .grow { flex: 1; min-width: 160px; display: grid; gap: 6px; }
.banner-slot input[type=text] { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 13px; }

/* 广告位：点图 / 拖拽直接上传，支持删除与更换 */
.banner-slot .pick { position: relative; flex: none; line-height: 0; cursor: pointer; border-radius: 6px; }
.banner-slot .pick .pick-tip {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; background: rgba(13, 27, 62, .58); color: #fff;
  font-size: 12px; line-height: 1.2; opacity: 0; transition: opacity .16s;
  pointer-events: none; text-align: center; padding: 0 4px;
}
.banner-slot .pick:hover .pick-tip { opacity: 1; }
.banner-slot .pick.drag .pick-tip { opacity: 1; background: rgba(200, 164, 92, .92); }
.banner-slot .pick.drag .prev { border-color: var(--gold); }
.banner-slot .file-line { display: block; font-size: 12px; line-height: 18px; color: var(--txt-3); min-height: 18px; word-break: break-all; }
.banner-slot .file-line.has { color: var(--green); }
.banner-slot .btn.danger { color: #b42318; border-color: #f0c9c4; }
.banner-slot .btn.danger:hover { background: #fdf2f1; }
.banner-slot .btn.danger:disabled { opacity: .4; cursor: not-allowed; background: transparent; }
.banner-slot .btn:disabled { opacity: .55; cursor: not-allowed; }

/* 广告轮换设置 / 动态增删广告位 */
.sec-head .sec-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ad-settings { padding: 16px 18px; }
.ad-set-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-set-row label { font-size: 14px; font-weight: 600; }
.ad-set-row input[type=number] { width: 92px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 14px; }
.ad-set-row #ad-rotate-tip { color: var(--green); }
.switch { position: relative; width: 38px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #d4dae6; transition: .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(17px); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(10,16,32,.5); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 14px; width: 640px; max-width: 100%; padding: 24px 26px; }
.modal h3 { font-size: 17px; margin-bottom: 16px; }
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(13,27,62,.92); color: #fff; padding: 10px 22px; border-radius: 999px; font-size: 14px; z-index: 200; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 48px; background: var(--navy); color: #8f9bb5; padding: 30px 0 36px; font-size: 13px; }
.site-footer .cols { display: flex; gap: 40px; flex-wrap: wrap; }
.site-footer b { color: #fff; font-size: 14px; display: block; margin-bottom: 8px; }
.site-footer a { display: block; padding: 2px 0; }
.site-footer a:hover { color: var(--gold-2); }
.foot-line { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); color: #6d7890; font-size: 12px; }

.empty { text-align: center; color: var(--txt-3); padding: 50px 0; }

/* ---------- 语言切换 ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 2px; flex: none; }
.lang-switch button { border: 0; background: transparent; color: #c6cede; font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 999px; }
.lang-switch button:hover { color: #fff; }
.lang-switch button.on { background: var(--gold); color: #fff; font-weight: 600; }

/* ---------- 排行榜（四个榜单页签） ---------- */
.rk-tabs { display: flex; gap: 6px; margin: 16px 0 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rk-tabs button { border: 0; background: transparent; font-size: 15px; color: var(--txt-2); padding: 10px 20px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.rk-tabs button:hover { color: var(--navy); }
.rk-tabs button.on { color: var(--navy); font-weight: 700; border-bottom-color: var(--gold); }
.rk-note { background: #fdf6e7; border: 1px solid #f2e3c2; color: #8a6d2f; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.rk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; }
.rk-lbl { font-size: 13px; color: var(--txt-3); }
.rk-types { display: flex; gap: 6px; flex-wrap: wrap; }
.rk-toolbar .cnt { margin-left: auto; color: var(--txt-3); font-size: 13px; }
.rk-list { overflow: hidden; }
.rk-row { display: grid; grid-template-columns: 74px 1fr 118px 46px; gap: 14px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.rk-row:last-child { border-bottom: 0; }
.rk-row:hover { background: #f8fafd; }
.rk-row.top1 { background: linear-gradient(90deg, #fffaf0, #fff); }
.rk-row.top2 { background: linear-gradient(90deg, #fafcff, #fff); }
.rk-row.top3 { background: linear-gradient(90deg, #fff9f4, #fff); }
.rk-logo { position: relative; width: 68px; height: 68px; }
.rk-logo .bk-logo, .rk-logo .bk-letter { width: 64px; height: 64px; }
.rk-tags .rk-live { background: #e7f7ef; color: #0e9f5d; border: 1px solid #cdeede; font-weight: 500; }
.rk-info { min-width: 0; }
.rk-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rk-name .tag { flex: none; white-space: nowrap; }
.rk-info { overflow: hidden; }
.rk-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rk-tags span { font-size: 12px; color: var(--txt-2); background: #f2f5fa; border-radius: 6px; padding: 1px 8px; }
.rk-value { text-align: right; }
.rk-value b { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.rk-value i { display: block; font-style: normal; font-size: 11.5px; color: var(--txt-3); margin-top: -2px; }
.rk-pos { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: #eef1f7; color: var(--txt-2); }
.rk-pos.g1 { background: linear-gradient(135deg, #ffd76e, #d9a520); color: #fff; }
.rk-pos.g2 { background: linear-gradient(135deg, #e3e8ef, #a8b3c4); color: #fff; }
.rk-pos.g3 { background: linear-gradient(135deg, #edb88a, #b96f3a); color: #fff; }
.rk-legend { margin-top: 16px; }
.rk-legend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.rk-legend-grid div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rk-legend-grid b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.rk-legend-grid span { font-size: 12px; color: var(--txt-3); line-height: 1.5; }

/* 首页榜单入口 */
.board-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.board-card { padding: 18px 20px; display: block; border-top: 3px solid var(--gold); }
.board-card:hover { outline: 2px solid var(--gold-2); }
.board-card b { font-size: 16px; display: block; }
.board-card span { color: var(--txt-3); font-size: 12.5px; display: block; margin-top: 4px; }
.board-card em { font-style: normal; color: var(--blue); font-size: 12.5px; margin-top: 8px; display: block; }

/* ---------- 响应式 ---------- */
.brand span, .brand small { white-space: nowrap; }
.m-score { display: none; }
@media (max-width: 900px) {
  .ad-grid-top { grid-template-columns: repeat(3, 1fr); }
  .ad-grid-mid { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 34px 56px 1fr; gap: 10px; padding: 12px 14px; }
  .rank-row .col-hide { display: none !important; }
  .m-score { display: inline; margin-left: 2px; }
  .bk-logo, .bk-letter { width: 52px; height: 52px; border-radius: 11px; }
  .bk-grid { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .site-header .bar { flex-wrap: wrap; height: auto; padding: 8px 0; gap: 8px; }
  .brand { font-size: 16px; }
  .brand .logo-mark { width: 30px; height: 30px; }
  .brand small { letter-spacing: 1px; }
  .site-nav { display: flex; order: 3; width: 100%; margin: 0; overflow-x: auto; gap: 2px;
    scrollbar-width: none; -ms-overflow-style: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  .hd-search { margin-left: auto; flex: 1; max-width: 210px; }
  .hd-search input { width: 100%; padding: 7px 12px; }
  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 13px; }
  .hero-search input { padding: 12px 14px; }
  .hero-search button { padding: 0 18px; }
  .hero-stats { gap: 18px; }
  .hero-stats b { font-size: 21px; }
  .page-head h1 { font-size: 20px; }
  .admin-row-grid { grid-template-columns: 40px 1fr 100px; }
  .admin-row-grid .col-hide { display: none !important; }
  .banner-slot .prev { width: 84px; height: 38px; }
  .rk-tabs { gap: 2px; margin: 12px 0 10px; }
  .rk-tabs button { padding: 9px 12px; font-size: 14px; }
  .rk-row { grid-template-columns: 58px 1fr 76px 32px; gap: 10px; padding: 12px; }
  .rk-logo { width: 54px; height: 54px; }
  .rk-logo .bk-logo, .rk-logo .bk-letter { width: 52px; height: 52px; }
  .rk-name { font-size: 14.5px; gap: 6px; }
  .rk-value b { font-size: 19px; }
  .rk-value i { font-size: 10.5px; }
  .rk-pos { width: 30px; height: 30px; font-size: 13px; }
  .rk-tags span:nth-child(n+3) { display: none; }
  .rk-legend-grid { grid-template-columns: 1fr 1fr; }
  .board-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 对联广告位：按可视宽度分档（1366 起就能显示） ---------- */
:root { --rail-w: 160px; --rail-gap: 14px; }
@media (min-width: 1366px) and (max-width: 1499px) { :root { --rail-w: 100px; } }
@media (min-width: 1500px) and (max-width: 1639px) { :root { --rail-w: 116px; } }
@media (min-width: 1640px) and (max-width: 1829px) { :root { --rail-w: 132px; } }
@media (min-width: 1366px) and (min-height: 600px) {
  :root { --cw: min(1440px, calc(100vw - 2 * (var(--rail-w) + var(--rail-gap) + 12px))); }
  .wrap { max-width: var(--cw); }
  .rail { display: block; position: fixed; top: 84px; width: var(--rail-w); z-index: 45; }
  .rail-l { left: calc(50% - var(--cw) / 2 - var(--rail-w) - var(--rail-gap)); }
  .rail-r { right: calc(50% - var(--cw) / 2 - var(--rail-w) - var(--rail-gap)); }
}
