:root {
  --bg: #f5f7fa;
  --bg-soft: #f1f4f9;
  --card: #ffffff;
  --ink: #1a2233;
  --ink-2: #5a6478;
  --ink-3: #8b94a7;
  --line: #e4e8f0;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #eef4ff;
  --ok: #16a34a;
  --ok-soft: #e8f8ee;
  --warn: #d97706;
  --warn-soft: #fdf3e3;
  --bad: #dc2626;
  --bad-soft: #fdeaea;
  --info: #0891b2;
  --info-soft: #e6f6fa;
  --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;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ── 顶栏 ── */
.topbar {
  background: linear-gradient(120deg, #16305c 0%, #1d4ed8 55%, #2563eb 100%);
  color: #fff; padding: 22px 0 78px;
}
.topbar .wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.logo small { display: block; font-size: 12px; font-weight: 400; opacity: .75; margin-top: 3px; letter-spacing: 0; }
.nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: rgba(255,255,255,.85); font-size: 14px; padding: 7px 14px;
  border-radius: 999px; transition: .15s;
}
.nav a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.nav a.on { background: #fff; color: var(--brand-2); font-weight: 600; }
.langsel {
  height: 32px; padding: 0 8px; border-radius: 999px; border: none;
  background: rgba(255,255,255,.16); color: #fff; font-size: 13px; outline: none;
  cursor: pointer; margin-left: 6px; flex: 0 0 auto;
}
.langsel option { color: var(--ink); background: #fff; }
/* 语言切换器独立于导航菜单容器，菜单重建时不会被影响，确保任何语言下都可见 */
.lang-box { flex: 0 0 auto; align-self: center; margin-left: 6px; }

/* ── 搜索区 ── */
.hero { margin-top: -52px; }
.search-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 26px 20px;
}
.search-title { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; }
.search-row { display: flex; gap: 10px; }
.search-row input {
  flex: 1; height: 50px; padding: 0 16px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 10px; outline: none; transition: .15s;
}
.search-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.btn {
  height: 50px; padding: 0 26px; border: none; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand-2); }
.btn.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; font-weight: 500; }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #b91c1c; }

.examples { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.examples b { color: var(--ink-2); font-weight: 600; }
.chip {
  display: inline-block; margin: 4px 6px 0 0; padding: 4px 10px;
  background: var(--brand-soft); color: var(--brand-2); border-radius: 999px;
  cursor: pointer; font-size: 12.5px;
}
.chip:hover { background: #dfeaff; }

/* ── 结果 ── */
.result { margin-top: 18px; }
.verdict-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px; border-left: 5px solid var(--ink-3);
}
.verdict-card.ok { border-left-color: var(--ok); }
.verdict-card.warn { border-left-color: var(--warn); }
.verdict-card.bad { border-left-color: var(--bad); }
.verdict-card.info { border-left-color: var(--info); }
.verdict-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.gray { background: #f1f3f7; color: var(--ink-2); }
.verdict-domain { font-size: 15px; font-weight: 600; word-break: break-all; }
.verdict-desc { color: var(--ink-2); font-size: 14px; margin-top: 8px; }

.school-card {
  margin-top: 16px; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px;
}
.school-name { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.school-sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 22px; }
.kv-item { border-bottom: 1px dashed var(--line); padding-bottom: 9px; }
.kv-k { font-size: 12.5px; color: var(--ink-3); margin-bottom: 3px; }
.kv-v { font-size: 14.5px; color: var(--ink); word-break: break-all; }
.kv-v a { font-weight: 500; }

/* ── 区块 ── */
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 17px; margin: 0; }
.section-head .hint { font-size: 13px; color: var(--ink-3); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; background: #fafbfd; }
tbody tr:hover { background: #fafbfd; }
td .sub { color: var(--ink-3); font-size: 12.5px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input {
  height: 36px; padding: 0 12px; border: 1.5px solid var(--line);
  border-radius: 8px; background: #fff; font-size: 14px; outline: none; color: var(--ink);
}
.filters select:focus, .filters input:focus { border-color: var(--brand); }
.filters .grow { flex: 1; min-width: 180px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: 13.5px; color: var(--ink-2); }

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.country-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; cursor: pointer; transition: .15s;
}
.country-item:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.country-item .cn { font-weight: 600; font-size: 14.5px; }
.country-item .en { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
/* 联网增强：国家本国语言名（仅联网时填充，离线留空） */
.native-name { display: block; font-size: 12px; line-height: 1.6; color: var(--ink-3); margin-top: 3px; min-height: 1em; }
.native-name.on { color: var(--ink-2); }
.native-name .nb, .online-box .nb {
  display: inline-block; font-size: 10px; line-height: 1; padding: 2px 5px; margin-right: 5px;
  border: 1px solid var(--line); border-radius: 4px; color: var(--brand-2); background: var(--brand-soft);
  vertical-align: 1px; font-weight: 500;
}
/* 联网增强：中文检索在线匹配面板 */
.online-box {
  margin-top: 10px; padding: 10px 14px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--bg-soft); font-size: 13px;
}
.online-box.off { opacity: .6; }
.online-box .ob-title { font-weight: 600; color: var(--ink); }
.online-box .ob-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 5px; color: var(--ink-2); }
.online-box .ob-meta .ob-snip { flex-basis: 100%; color: var(--ink-3); font-size: 12px; }
.online-box .ob-acts { margin-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; }
.online-box .ob-others { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.online-box .ob-others a { color: var(--brand-2); text-decoration: none; font-size: 12.5px; }
.online-box .ob-others a:hover { text-decoration: underline; }
.online-box .ob-others.mini { margin-top: 7px; padding-top: 7px; }
.online-box .ob-others.mini a { font-size: 12px; color: var(--ink-2); }
.loading.sm { padding: 8px 0; font-size: 12px; }
.country-item .nums { margin-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; }
.mini {
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: #f1f3f7; color: var(--ink-2);
}
.mini.h { background: var(--brand-soft); color: var(--brand-2); }
.mini.v { background: var(--warn-soft); color: var(--warn); }
.mini.t { background: var(--info-soft); color: var(--info); }
.mini.a { background: var(--ok-soft); color: var(--ok); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-box .n { font-size: 24px; font-weight: 700; color: var(--brand-2); }
.stat-box .l { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.empty { text-align: center; color: var(--ink-3); padding: 34px 0; font-size: 14px; }
.loading { text-align: center; color: var(--ink-3); padding: 24px 0; font-size: 14px; }

textarea {
  width: 100%; min-height: 130px; padding: 12px 14px; font-size: 14px;
  border: 1.5px solid var(--line); border-radius: 10px; outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical;
}
textarea:focus { border-color: var(--brand); }

/* ── 后台 ── */
.admin-body { background: #f5f7fa; min-height: 100vh; }
.admin-top {
  background: #12233f; color: #fff; padding: 14px 0;
}
.admin-top .wrap { display: flex; align-items: center; gap: 16px; }
.admin-top .logo { font-size: 17px; }
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 18px 0 40px; }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }
.side { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; height: fit-content; }
.side a {
  display: block; padding: 10px 14px; border-radius: 9px; font-size: 14px; color: var(--ink-2);
}
.side a:hover { background: #f4f6fa; text-decoration: none; }
.side a.on { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.panel { display: none; }
.panel.on { display: block; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(16,24,40,.45); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-mask.on { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 620px;
  max-height: 88vh; overflow: auto; padding: 22px 24px;
}
.modal h3 { margin: 0 0 16px; font-size: 17px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1.5px solid var(--line);
  border-radius: 8px; font-size: 14px; outline: none; color: var(--ink); background: #fff;
}
.field textarea { height: auto; min-height: 70px; padding: 10px 12px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.type-select { padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line); font-size: 13px; background: #fff; }

.footer { color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 34px 0 26px; line-height: 1.8; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 40px;
  background: #12233f; color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 14px; z-index: 99; opacity: 0; pointer-events: none; transition: .2s;
}
.toast.on { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   响应式适配 · 多语言字符长度适配
   ────────────────────────────────────────────────────────────
   1) 断点：1440 / 1200 / 992 / 768 / 576 / 400
   2) 多语言：俄文/法文单词普遍比中文长 40-60%，用 clamp() 流式字号
      + 允许长词断行 + 表格横向滚动，避免撑破布局
   3) 导航：宽屏横排，窄屏横向滚动条（不换行不折叠）
   ══════════════════════════════════════════════════════════════ */

/* ── 全局：长词/长 URL 不得撑破容器 ── */
html, body { overflow-x: hidden; }
* { word-break: break-word; overflow-wrap: anywhere; }
a, code, .kv-v { overflow-wrap: anywhere; word-break: break-word; }

/* 流式字号：视口越窄字越小，俄文/法文也能容纳 */
.site-title, .logo { font-size: clamp(15px, 2.4vw, 21px); }
.verdict-domain { font-size: clamp(13px, 1.8vw, 17px); }
.school-name { font-size: clamp(15px, 2.2vw, 21px); }
h2 { font-size: clamp(14px, 1.9vw, 18px); }
.stat-box .n { font-size: clamp(17px, 2.6vw, 26px); }

/* ── 顶部导航：窄屏改为横向滚动，永不换行 ── */
.topbar .wrap { flex-wrap: wrap; gap: 10px; }
.nav {
  display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  gap: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding-bottom: 2px;
}
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 0 0 auto; white-space: nowrap; }
.nav .langsel { flex: 0 0 auto; }

/* ── 表格：窄屏横向滚动 ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 560px; }

/* ── 统计格 ── */
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* ── kv 两列 → 单列 ── */
.kv { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ═══════════ 断点 ═══════════ */

/* 大屏：搜索框放宽 */
@media (min-width: 1440px) {
  .wrap { max-width: 1280px; }
}

/* 笔记本 */
@media (max-width: 1200px) {
  .wrap { max-width: 100%; padding: 0 18px; }
  .hero { padding: 26px 0 40px; }
}

/* 平板横屏 */
@media (max-width: 992px) {
  .search-row { flex-direction: column; }
  .search-row input { width: 100%; }
  .search-row .btn { width: 100%; height: 44px; }
  .filters { flex-wrap: wrap; }
  .filters > * { flex: 1 1 160px; min-width: 140px; }
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-layout .side { display: flex; overflow-x: auto; gap: 6px; }
  .admin-layout .side a { flex: 0 0 auto; white-space: nowrap; }
}

/* 平板竖屏 / 大手机 */
@media (max-width: 768px) {
  .logo small { display: none; }
  .hero { padding: 18px 0 32px; }
  .card { padding: 16px; }
  .search-card { padding: 18px; }
  .kv { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .country-grid { grid-template-columns: repeat(2, 1fr); }
  .verdict-head { flex-wrap: wrap; gap: 6px; }
  .verdict-head .btn { margin-left: 0 !important; width: 100%; }
  .modal { width: 94%; max-height: 88vh; overflow-y: auto; }
  .pager { flex-wrap: wrap; }
  .examples { font-size: 12px; }
  .examples .chip { margin-bottom: 4px; }
}

/* 手机 */
@media (max-width: 576px) {
  .wrap { padding: 0 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-box { padding: 10px 8px; }
  .country-grid { grid-template-columns: 1fr; }
  .btn { padding: 0 14px; font-size: 14px; }
  .btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
  .filters > * { flex: 1 1 100%; }
  .school-card { padding: 14px; }
  .verdict-card { padding: 14px; }
  textarea { min-height: 110px; }
  .toast { left: 12px; right: 12px; transform: none; text-align: center; }
  .toast.on { transform: translateY(0); }
}

/* 超窄屏（320-400） */
@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .logo { font-size: 15px; }
}

/* ── 横屏矮屏：压缩纵向间距 ── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 12px 0 24px; }
  .search-card { padding: 14px; }
}

/* ═══════════ 多语言专项 ═══════════ */

/* 拉丁/西里尔语系（俄文、法文）字符更宽，放宽关键容器并缩小字号 */
html[lang="ru"] .nav a,
html[lang="fr"] .nav a { padding: 7px 9px; font-size: 13px; }
html[lang="ru"] .btn,
html[lang="fr"] .btn { padding: 0 12px; font-size: 13.5px; }
html[lang="ru"] .stat-box .n,
html[lang="fr"] .stat-box .n { font-size: clamp(15px, 2.2vw, 22px); }
html[lang="ru"] .badge,
html[lang="fr"] .badge { padding: 2px 7px; font-size: 11.5px; white-space: nowrap; }
html[lang="ru"] .mini,
html[lang="fr"] .mini { font-size: 11.5px; }

/* 韩文/日文：行高略增，避免字形裁切 */
html[lang="ko"] body, html[lang="ja"] body { line-height: 1.7; }
html[lang="ko"] .nav a, html[lang="ja"] .nav a { font-size: 13.5px; }

/* 所有语言：按钮与标签强制不换行，允许内部断行 */
.btn, .badge, .chip { white-space: nowrap; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; }

/* ═══════════ 网友查询动态 ═══════════ */
.activity-box {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); padding: 12px 16px;
}
.activity-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 13px; color: var(--ink-2);
}
.activity-head .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.activity-list { height: 68px; overflow: hidden; position: relative; }
.activity-list.scroll { height: 116px; }
.activity-item {
  display: flex; align-items: center; gap: 7px; padding: 7px 0;
  font-size: 13px; color: var(--ink); border-bottom: 1px dashed var(--line);
  animation: slideUp .45s ease;
}
.activity-item:last-child { border-bottom: none; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.activity-item .who { font-weight: 600; color: var(--brand-2); white-space: nowrap; }
.activity-item .school {
  color: var(--ink-2); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.activity-item .ago { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
@media (max-width: 576px) {
  .activity-item { font-size: 12px; gap: 5px; flex-wrap: wrap; }
  .activity-item .school { flex: 1 1 100%; white-space: normal; }
}


/* ═══════════════════════════════════════════════════════════
   主题外观模板（6 套）+ 隐私政策 + 底部信息
   全部走 CSS 变量，切换零重排、即时生效
   ═══════════════════════════════════════════════════════════ */

/* ── 1. 默认蓝（经典）── */
:root, [data-theme="blue"] {
  --bg:#f5f7fa; --card:#fff; --ink:#1a2233; --ink-2:#5a6478; --ink-3:#8b94a7;
  --line:#e4e8f0; --brand:#2563eb; --brand-2:#1d4ed8; --brand-soft:#eef4ff;
  --ok:#16a34a; --ok-soft:#e8f8ee; --warn:#d97706; --warn-soft:#fdf3e3;
  --bad:#dc2626; --bad-soft:#fdeaea; --info:#0891b2; --info-soft:#e6f6fa;
  --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.06);
}

/* ── 2. 深夜护眼 ── */
[data-theme="dark"] {
  --bg:#0f1419; --card:#1a2028; --ink:#e8ecf2; --ink-2:#a8b3c4; --ink-3:#7a8595;
  --line:#2a3340; --brand:#3b82f6; --brand-2:#60a5fa; --brand-soft:#1e2a3d;
  --ok:#22c55e; --ok-soft:#14291c; --warn:#f59e0b; --warn-soft:#2d2314;
  --bad:#ef4444; --bad-soft:#2d1819; --info:#06b6d4; --info-soft:#122a30;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35);
}
[data-theme="dark"] .search-card,
[data-theme="dark"] .card,
[data-theme="dark"] .search-row input { background:var(--card); }
[data-theme="dark"] .mini { opacity:.85; }
[data-theme="dark"] table th { background:#202834; }
[data-theme="dark"] .stat-box { background:#202834; }
[data-theme="dark"] .chip { background:#202834; border-color:var(--line); }
[data-theme="dark"] #report-modal > div { background:var(--card); color:var(--ink); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background:#202834; color:var(--ink); border-color:var(--line);
}

/* ── 3. 墨绿学术 ── */
[data-theme="green"] {
  --bg:#f2f7f4; --card:#fff; --ink:#16241c; --ink-2:#54655a; --ink-3:#86998d;
  --line:#dde8e1; --brand:#0f766e; --brand-2:#115e59; --brand-soft:#e6f4f1;
  --ok:#15803d; --ok-soft:#e8f8ee; --warn:#b45309; --warn-soft:#fdf3e3;
  --bad:#b91c1c; --bad-soft:#fdeaea; --info:#0369a1; --info-soft:#e6f2fa;
}

/* ── 4. 暖橙活力 ── */
[data-theme="orange"] {
  --bg:#fdf8f3; --card:#fff; --ink:#2b1d12; --ink-2:#6b5546; --ink-3:#9a8577;
  --line:#f0e2d4; --brand:#ea580c; --brand-2:#c2410c; --brand-soft:#fff1e6;
  --ok:#16a34a; --ok-soft:#e8f8ee; --warn:#ca8a04; --warn-soft:#fdf6e3;
  --bad:#dc2626; --bad-soft:#fdeaea; --info:#0e7490; --info-soft:#e6f6fa;
}

/* ── 5. 紫罗兰 ── */
[data-theme="purple"] {
  --bg:#f8f6fc; --card:#fff; --ink:#1e1b2e; --ink-2:#5d5673; --ink-3:#8b84a1;
  --line:#e8e3f2; --brand:#7c3aed; --brand-2:#6d28d9; --brand-soft:#f3edff;
  --ok:#16a34a; --ok-soft:#e8f8ee; --warn:#d97706; --warn-soft:#fdf3e3;
  --bad:#dc2626; --bad-soft:#fdeaea; --info:#0891b2; --info-soft:#e6f6fa;
}

/* ── 6. 极简黑白 ── */
[data-theme="mono"] {
  --bg:#fafafa; --card:#fff; --ink:#111; --ink-2:#555; --ink-3:#888;
  --line:#e0e0e0; --brand:#000; --brand-2:#333; --brand-soft:#f2f2f2;
  --ok:#1a7f37; --ok-soft:#eaf5ee; --warn:#9a6700; --warn-soft:#fdf6e3;
  --bad:#c00; --bad-soft:#fdeaea; --info:#0366d6; --info-soft:#eaf1fb;
  --radius:8px; --shadow:0 1px 3px rgba(0,0,0,.08);
}

/* ══════════════ 主题切换按钮 ══════════════ */
.theme-switcher {
  position:relative; display:inline-flex; align-items:center; gap:6px;
}
.theme-btn {
  display:inline-flex; align-items:center; gap:6px; padding:6px 10px;
  border:1px solid var(--line); border-radius:8px; background:var(--card);
  color:var(--ink-2); font-size:13px; cursor:pointer; white-space:nowrap;
  transition:all .15s;
}
.theme-btn:hover { border-color:var(--brand); color:var(--brand); }
.theme-panel {
  position:absolute; top:calc(100% + 8px); right:0; z-index:900;
  background:var(--card); border:1px solid var(--line); border-radius:12px;
  box-shadow:var(--shadow); padding:10px; display:none; min-width:196px;
}
.theme-panel.on { display:block; }
.theme-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.theme-swatch {
  display:flex; flex-direction:column; align-items:center; gap:5px;
  padding:8px 4px; border:1px solid var(--line); border-radius:9px;
  cursor:pointer; font-size:11px; color:var(--ink-2);
  background:var(--card); transition:all .15s;
}
.theme-swatch:hover { border-color:var(--brand); }
.theme-swatch.active { border-color:var(--brand); border-width:2px; color:var(--brand); font-weight:600; }
.theme-dot {
  width:34px; height:22px; border-radius:6px; border:1px solid rgba(0,0,0,.12);
  overflow:hidden; display:flex;
}
.theme-dot i { flex:1; height:100%; }
.theme-dot i:first-child { flex:2; }

/* ══════════════ 官网缺失标记 ══════════════ */
.tag-missing {
  display:inline-flex; align-items:center; gap:4px;
  padding:2px 8px; border-radius:6px; font-size:12px;
  background:var(--warn-soft); color:var(--warn); border:1px solid currentColor;
}
.tag-k12 {
  display:inline-flex; align-items:center; gap:4px;
  padding:2px 8px; border-radius:6px; font-size:12px;
  background:var(--bad-soft); color:var(--bad);
}

/* ══════════════ 网站底部 ══════════════ */
.site-footer {
  margin-top:38px; padding:22px 0 14px; border-top:1px solid var(--line);
  font-size:13px; color:var(--ink-3);
}
.site-footer .flinks {
  display:flex; flex-wrap:wrap; gap:14px; justify-content:center; margin-bottom:10px;
}
.site-footer .flinks a { color:var(--ink-2); text-decoration:none; }
.site-footer .flinks a:hover { color:var(--brand); text-decoration:underline; }
.site-footer .ftext { text-align:center; line-height:1.9; }

/* ══════════════ 隐私政策 / 条款弹层 ══════════════ */
.legal-modal {
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:10000;
  display:none; align-items:center; justify-content:center; padding:20px;
}
.legal-modal.on { display:flex; }
.legal-box {
  background:var(--card); color:var(--ink); border-radius:14px;
  max-width:720px; width:100%; max-height:84vh; overflow-y:auto; padding:26px 28px;
}
.legal-box h3 { margin:0 0 4px; font-size:19px; }
.legal-box h4 { margin:20px 0 7px; font-size:15px; color:var(--brand); }
.legal-box p, .legal-box li { font-size:14px; line-height:1.85; color:var(--ink-2); }
.legal-box ul { padding-left:20px; margin:6px 0; }
.legal-close {
  margin-top:20px; width:100%; padding:10px; border:none; border-radius:9px;
  background:var(--brand); color:#fff; font-size:14px; cursor:pointer;
}
.legal-meta { font-size:12px; color:var(--ink-3); margin-bottom:14px; }

/* ══════════════ 人性化增强 ══════════════ */
/* 回到顶部 */
.to-top {
  position:fixed; right:20px; bottom:26px; z-index:800;
  width:42px; height:42px; border-radius:50%; border:1px solid var(--line);
  background:var(--card); color:var(--ink-2); font-size:17px; cursor:pointer;
  box-shadow:var(--shadow); display:none; align-items:center; justify-content:center;
}
.to-top.on { display:flex; }
.to-top:hover { color:var(--brand); border-color:var(--brand); }

/* 快捷键提示 / 复制成功浮层 */
.toast-box {
  position:fixed; left:50%; bottom:34px; transform:translateX(-50%);
  background:var(--ink); color:#fff; padding:9px 18px; border-radius:9px;
  font-size:13px; z-index:11000; opacity:0; transition:opacity .22s; pointer-events:none;
}
.toast-box.on { opacity:1; }

/* 复制按钮 */
.copy-btn {
  border:1px solid var(--line); background:transparent; color:var(--ink-3);
  border-radius:6px; padding:2px 7px; font-size:11px; cursor:pointer; margin-left:6px;
}
.copy-btn:hover { color:var(--brand); border-color:var(--brand); }

/* 结果区骨架屏 */
.skeleton { background:linear-gradient(90deg,var(--line) 25%,var(--card) 50%,var(--line) 75%);
  background-size:200% 100%; animation:sk 1.2s infinite; border-radius:8px; height:16px; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* 键盘可达性 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline:2px solid var(--brand); outline-offset:2px;
}

/* 尊重"减少动效"偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

@media (max-width:576px) {
  .site-footer .flinks { gap:10px; font-size:12px; }
  .legal-box { padding:18px 16px; max-height:88vh; }
  .theme-panel { right:auto; left:0; }
  .to-top { right:12px; bottom:16px; }
}


/* ══════════════ 院校目录 · 网格地图 ══════════════ */
.dir-summary { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.dir-chips { display:flex; gap:10px; flex-wrap:wrap; margin:12px 0; }
.dir-chips .stat-box { min-width:88px; }
.dir-continent { margin-top:16px; }
.dir-continent h4 { font-size:14px; margin:0 0 8px; color:var(--ink-2); font-weight:600; }
.dir-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(64px, 1fr)); gap:6px;
}
.dir-cell {
  position:relative; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:2px; padding:8px 4px; border-radius:8px;
  border:1px solid var(--line); cursor:pointer; overflow:hidden;
  background:var(--brand-soft); transition:transform .12s, border-color .12s;
}
/* 用 --t（0~1）控制品牌色浓度表示院校数量 */
.dir-cell::before {
  content:""; position:absolute; inset:0; background:var(--brand);
  opacity:calc(.10 + var(--t) * .72); z-index:0;
}
.dir-cell > * { position:relative; z-index:1; }
.dir-cell:hover { transform:translateY(-2px); border-color:var(--brand); }
.dir-cell .cc { font-size:12px; font-weight:700; letter-spacing:.4px;
  color:var(--ink); mix-blend-mode:normal; }
.dir-cell .n { font-size:11px; color:var(--ink-2); }
[data-theme="dark"] .dir-cell .cc { color:#0f1419; }
.dir-cell[data-cc="ZZ"] { opacity:.55; }

.dir-head { display:flex; align-items:center; gap:12px; margin-bottom:6px; }
.dir-head h3 { margin:0; font-size:17px; }
.dir-src { margin:0; padding-left:20px; }
.dir-src li { font-size:13px; margin:5px 0; word-break:break-word; }
.dir-src a { color:var(--brand); text-decoration:none; }
.dir-src a:hover { text-decoration:underline; }

.dir-tools { display:flex; gap:8px; margin:14px 0 10px; flex-wrap:wrap; }
.dir-tools .inp { padding:8px 10px; border:1px solid var(--line);
  border-radius:8px; background:var(--card); color:var(--ink); font-size:13px; }
.dir-tools #dir-q { flex:1; min-width:160px; }

.dir-table { width:100%; border-collapse:collapse; font-size:13px; }
.dir-table th { text-align:left; padding:8px 10px; background:var(--bg);
  border-bottom:1px solid var(--line); font-size:12px; color:var(--ink-2); }
.dir-table td { padding:8px 10px; border-bottom:1px solid var(--line);
  vertical-align:top; word-break:break-word; }
.dir-table a { color:var(--brand); text-decoration:none; }
.dir-table a:hover { text-decoration:underline; }
.dir-pager { display:flex; gap:8px; justify-content:center; margin-top:14px; }

@media (max-width:576px) {
  .dir-grid { grid-template-columns:repeat(auto-fill, minmax(52px, 1fr)); gap:5px; }
  .dir-cell { padding:6px 2px; }
  .dir-cell .cc { font-size:11px; }
  .dir-cell .n { font-size:10px; }
  .dir-table { font-size:12px; }
  .dir-table th:nth-child(5), .dir-table td:nth-child(5) { display:none; }
}

/* 国家码徽章（查询结果强制显示）*/
.cc-badge {
  display:inline-flex; align-items:center; padding:2px 8px; border-radius:6px;
  font-size:12px; font-weight:700; letter-spacing:.5px;
  background:var(--brand); color:#fff; white-space:nowrap;
}
[data-theme="mono"] .cc-badge { background:#000; }

/* ══════════ 查询配额 / 分享链接 ══════════ */
.quota-bar {
  display:flex; align-items:center; gap:7px; margin:0 0 10px;
  font-size:13px; color:var(--ink-2); flex-wrap:wrap;
}
.quota-bar .qb-l { color:var(--ink-3); }
.quota-bar b { font-size:15px; color:var(--ink); }
.quota-bar b.ok { color:var(--ok); }
.quota-bar b.bad { color:var(--bad); }
.quota-bar .qb-t { color:var(--ink-3); font-size:12px; }

.quota-card { padding:18px 20px; }
.quota-card .qc-head h3 { margin:0 0 5px; font-size:16px; color:var(--warn); }
.quota-card .qc-head p { margin:0 0 12px; font-size:13px; line-height:1.7; }
.qc-link { display:flex; gap:8px; flex-wrap:wrap; }
.qc-link .inp {
  flex:1; min-width:200px; padding:9px 11px; border:1px solid var(--line);
  border-radius:8px; background:var(--bg); color:var(--ink); font-size:13px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
.qc-meta {
  display:flex; gap:16px; flex-wrap:wrap; margin-top:12px;
  font-size:12px; color:var(--ink-3);
}
.qc-meta b { color:var(--ink); font-size:13px; }
@media (max-width:576px) {
  .qc-link .inp { min-width:100%; }
  .qc-meta { gap:12px; }
}

/* ══════════ 收录数据总览（全站常驻展示区）══════════ */
.coverage-band {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px 16px; margin-bottom: 14px;
}
.cov-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cov-head b { font-size: 14px; color: var(--ink); }
.cov-updated { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.cov-list { display: flex; flex-wrap: wrap; }
.cov-item {
  flex: 1 1 120px; min-width: 108px; padding: 2px 14px;
  border-left: 1px solid var(--line);
}
.cov-item:first-child { border-left: none; padding-left: 0; }
.cov-item .n { font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; color: var(--brand-2); line-height: 1.2; }
.cov-item .l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.cov-item.h .n { color: var(--brand); }
.cov-item.v .n { color: var(--info); }
.cov-item.t .n { color: var(--warn); }
.cov-item.a .n { color: var(--ok); }
.cov-bar {
  display: flex; height: 8px; border-radius: 999px; overflow: hidden;
  margin-top: 12px; background: var(--line);
}
.cov-bar i { display: block; height: 100%; }
.cov-bar i.h { background: var(--brand); }
.cov-bar i.v { background: var(--info); }
.cov-bar i.t { background: var(--warn); }
.cov-bar i.a { background: var(--ok); }
.cov-bar i.o { background: var(--ink-3); }
.cov-legend {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px;
  font-size: 12px; color: var(--ink-2);
}
.cov-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.cov-legend i.h { background: var(--brand); }
.cov-legend i.v { background: var(--info); }
.cov-legend i.t { background: var(--warn); }
.cov-legend i.a { background: var(--ok); }
.cov-legend i.o { background: var(--ink-3); }
/* 看板内的分组标题与 Top 国家 */
.cov-group { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 8px; }
.cov-group:first-child { margin-top: 0; }
.cov-top { display: flex; flex-wrap: wrap; gap: 6px; }
.cov-top .tp {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-2);
}
.cov-top .tp b { font-weight: 700; }
@media (max-width: 768px) {
  .coverage-band { padding: 12px 14px 14px; }
  .cov-item { flex: 1 1 50%; min-width: 0; padding: 6px 10px; border-left: none; }
  .cov-updated { margin-left: 0; flex-basis: 100%; }
}
[data-theme="dark"] .coverage-band { background: var(--card); }
[data-theme="dark"] .cov-top .tp { background: rgba(37,99,235,.16); color: #93b4f8; }

/* ══════════ 谷歌翻译语言选择 ══════════ */
.gtr-wrap { display:inline-flex; align-items:center; margin-left:8px; }
.gtr-select {
  padding:6px 10px; border:1px solid var(--line); border-radius:8px;
  background:var(--card); color:var(--ink); font-size:13px; cursor:pointer;
  max-width:130px;
}
.gtr-select:focus { outline:none; border-color:var(--brand); }
/* 隐藏谷歌自带横幅（我们用自己的下拉） */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
#goog-gt-tt { display:none !important; }
body { top:0 !important; }
.goog-tooltip { display:none !important; }

/* ══════ 查询结果横幅：命中=恭喜 / 未命中=明确提示 + 收录引导 ══════ */
.result-banner {
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px;
  border: 1px solid transparent;
}
.result-banner.ok {
  background: var(--ok-soft); border-color: rgba(22, 163, 74, .25);
}
.result-banner.ok .rb-title { color: var(--ok); }
.result-banner.bad {
  background: var(--bad-soft); border-color: rgba(220, 38, 38, .22);
}
.result-banner.bad .rb-title { color: var(--bad); }
.result-banner .rb-title {
  font-size: 15.5px; font-weight: 700; line-height: 1.45;
}
.result-banner .rb-hint {
  margin-top: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.65;
}
/* 学校信息展示：无值统一「暂无」占位，避免空白 / — / undefined */
.kv-empty { color: var(--ink-3); }

/* ══════════ 前台公告（富文本 + 文字滚动）══════════ */
.announcement {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px;
  box-shadow: var(--shadow); font-size: 14px;
}
.announcement.info    { border-left-color: var(--info); }
.announcement.warn    { border-left-color: var(--warn); background: var(--warn-soft); }
.announcement.success { border-left-color: var(--ok);   background: var(--ok-soft); }
.announcement.danger  { border-left-color: var(--bad);  background: var(--bad-soft); }

.ann-row  { display: flex; gap: 10px; align-items: flex-start; }
.ann-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.ann-title { flex: none; font-weight: 700; }
.ann-html  { flex: 1; min-width: 0; line-height: 1.6; }
.ann-html p { margin: 0 0 4px; }
.ann-html p:last-child { margin-bottom: 0; }
.ann-html ul, .ann-html ol { margin: 2px 0; padding-left: 20px; }
.ann-html a { color: var(--brand); text-decoration: underline; }

.ann-close {
  flex: none; background: none; border: 0; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink-3); padding: 0 2px;
}
.ann-close:hover { color: var(--ink); }

/* 文字滚动（跑马灯）：仅当文字溢出容器才启用，复制一份实现无缝循环 */
.ann-scroll {
  flex: 1; min-width: 0; display: block; overflow: hidden;
  white-space: nowrap; position: relative;
}
.ann-scroll-txt, .ann-scroll-copy {
  display: inline-block; white-space: nowrap; padding-right: 3rem;
}
.ann-scroll.on .ann-scroll-txt,
.ann-scroll.on .ann-scroll-copy {
  animation: ann-marquee var(--ann-dur, 12s) linear infinite;
  will-change: transform;
}
/* 鼠标悬停暂停，方便阅读与点击链接 */
.ann-scroll.on:hover .ann-scroll-txt,
.ann-scroll.on:hover .ann-scroll-copy { animation-play-state: paused; }
@keyframes ann-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .ann-scroll.on .ann-scroll-txt,
  .ann-scroll.on .ann-scroll-copy { animation: none; }
}

/* ══════════ 后台：公告富文本编辑器 ══════════ */
.rte {
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--card);
}
.rte-bar {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.rte-btn {
  min-width: 30px; height: 28px; padding: 0 8px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; background: var(--card);
  color: var(--ink); font-size: 13px; line-height: 1;
}
.rte-btn:hover { border-color: var(--brand); color: var(--brand); }
.rte-sel {
  height: 28px; padding: 0 6px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--ink);
}
.rte-area {
  min-height: 140px; max-height: 340px; overflow-y: auto;
  padding: 10px 12px; font-size: 14px; line-height: 1.7;
  color: var(--ink); outline: none; background: var(--card);
}
.rte-area:empty::before { content: attr(data-ph); color: var(--ink-3); }
.rte-area p { margin: 0 0 6px; }
.rte-area ul, .rte-area ol { margin: 4px 0; padding-left: 22px; }
.rte-area a { color: var(--brand); text-decoration: underline; }

/* ══════════ 右侧一键分享（国外社交媒体）═════════ */
.share-rail {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 700;                       /* 低于弹窗(10000)与右下角悬浮(800)，不遮挡 */
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.share-lead {
  font-size: 10px; line-height: 1.3; color: var(--ink-3);
  text-align: center; max-width: 42px; margin-bottom: 2px; user-select: none;
}
.share-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; line-height: 1; color: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.share-btn:hover  { transform: scale(1.12); box-shadow: 0 4px 14px rgba(16, 24, 40, .28); }
.share-btn:active { transform: scale(.96); }
.share-btn.copy {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  font-size: 17px; font-weight: 400;
}
/* 窄屏逐级缩小，避免遮挡正文 */
@media (max-width: 1100px) {
  .share-rail { right: 8px; gap: 6px; }
  .share-btn  { width: 32px; height: 32px; font-size: 12px; }
  .share-lead { display: none; }
}
@media (max-width: 640px) {
  .share-rail { right: 6px; gap: 5px; }
  .share-btn  { width: 28px; height: 28px; font-size: 11px; }
  .share-btn.copy { font-size: 14px; }
}
