/* ============================================================
   跨境导航 · 前台样式（支持白天 / 夜间模式）
   主题通过 html[data-theme="light|dark"] 切换
   ============================================================ */

:root,
html[data-theme="light"] {
  --bg: #f5f7fb;
  --card: #ffffff;
  --surface: #fbfcfe;
  --soft: #f4f7fd;
  --hover: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #6b7a90;
  --line: #e7ecf4;
  --line-soft: #f1f5fa;
  --line-strong: #d8e3f7;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eef3ff;
  --brand-border: #b9caf7;
  --accent: #ff7a45;
  --accent-soft: #fff1e8;
  --ok: #22c55e;
  --topbar-bg: rgba(255, 255, 255, .88);
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .03);
  --shadow-md: 0 12px 28px -14px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .04);
  --hero-bg:
    radial-gradient(900px 340px at 12% -10%, #e3ecff 0%, rgba(227, 236, 255, 0) 62%),
    radial-gradient(700px 320px at 92% 0%, #ffeade 0%, rgba(255, 234, 222, 0) 60%),
    linear-gradient(180deg, #f8fafe 0%, var(--bg) 100%);
  --hero-line: rgba(231, 236, 244, .7);
  --divider: #dbe3ef;
  --flag-bg: linear-gradient(160deg, #f4f7ff, #e8efff);
  --flag-border: #e3eaf8;
  --flag-ink: #1e3a8a;
  --cat-ico-bg: linear-gradient(150deg, #eef4ff, #e6eeff);
  --cat-ico-border: #e6edfa;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --card: #111a2c;
  --surface: #0e1626;
  --soft: #1a2438;
  --hover: #18223a;
  --ink: #e7edf8;
  --ink-2: #c3cde0;
  --muted: #8291a9;
  --line: #22304a;
  --line-soft: #1a2338;
  --line-strong: #2e405f;
  --brand: #5b93ff;
  --brand-dark: #8db1ff;
  --brand-soft: #17233c;
  --brand-border: #2f4a7a;
  --accent: #ff8a5c;
  --accent-soft: #2b1f18;
  --ok: #34d27b;
  --topbar-bg: rgba(13, 20, 34, .88);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 14px 30px -14px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  --hero-bg:
    radial-gradient(900px 340px at 12% -10%, #16233f 0%, rgba(22, 35, 63, 0) 62%),
    radial-gradient(700px 320px at 92% 0%, #2a2032 0%, rgba(42, 32, 50, 0) 60%),
    linear-gradient(180deg, #0e1729 0%, var(--bg) 100%);
  --hero-line: rgba(34, 48, 74, .7);
  --divider: #22304a;
  --flag-bg: linear-gradient(160deg, #17233c, #131e33);
  --flag-border: #24344f;
  --flag-ink: #9db8ee;
  --cat-ico-bg: linear-gradient(150deg, #17233c, #141f36);
  --cat-ico-border: #24344f;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.2px; }
p { margin: 0; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #6d28d9);
  box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .8);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }.brand-text strong { font-size: 15px; letter-spacing: .2px; }
.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.site-switch {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.site-switch::-webkit-scrollbar { display: none; }

.switch-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.switch-item:hover { background: var(--hover); }
.switch-item.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.switch-flag { font-size: 15px; line-height: 1; }
.switch-flag.is-long { font-size: 13px; letter-spacing: 0; }

/* 移动端搜索图标按钮（桌面隐藏） */
.search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.search-toggle:hover { border-color: var(--brand-border); color: var(--brand); }

.search-mini {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  flex-shrink: 0;
  width: 210px;
  transition: border-color .18s, box-shadow .18s;
}
.search-mini:focus-within { border-color: var(--brand-border); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.search-mini input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  color: var(--ink);
  font-size: 13px;
}

/* 主题切换按钮 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.theme-toggle:hover { border-color: var(--brand-border); color: var(--brand); }
html[data-theme="light"] .theme-toggle .ico-moon { display: none; }
html[data-theme="dark"]  .theme-toggle .ico-sun  { display: none; }

/* 顶部页面导航（首页 / 关于我们） */
.page-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 0 24px;
  background: var(--hero-bg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 33px;
  line-height: 1.22;
  letter-spacing: -1px;
}
.hero h1 span {
  background: linear-gradient(100deg, #2563eb, #7c3aed 60%, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 主要市场实时时间 */
.clock-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 0;
  margin-top: 14px;
  padding: 0;
}
.clock-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 18px;
  border-left: 1px solid var(--divider);
}
.clock-item:first-child { padding-left: 0; border-left: 0; }
.clock-item i {
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.clock-flag {
  width: 19px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
  display: inline-block;
  border: 1px solid rgba(15, 23, 42, .1);
}
.clock-item b {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* 分站页时钟条：节日条上方的卡片式实时时间（整体左右居中，放不下时平分折行） */
.clock-bar--card {
  justify-content: center;
  margin: 8px 0 12px;
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.clock-bar--card .clock-item { padding: 0 14px; border-left: 0; flex: 0 0 auto; }
.clock-bar--card .clock-item b { font-size: 13.5px; white-space: nowrap; }
.clock-row { display: flex; justify-content: center; flex-wrap: nowrap; width: 100%; }

/* 实时汇率条：复用时钟条的折行与居中逻辑 */
.rate-bar .clock-item b { font-variant-numeric: tabular-nums; }
.rate-bar .clock-item i { font-style: normal; }
.rate-code { display: none; }
.rate-label { color: var(--muted); }
.rate-label i { font-weight: 600; }
.rate-label i b { font-weight: 400; color: var(--muted-2, var(--muted)); }
.clock-bar--card.rate-bar { margin: 8px 0 10px; padding: 9px 18px; }
.clock-bar--card.rate-bar .clock-item { padding: 0 12px; }
.clock-bar--card.rate-bar .clock-item b { font-size: 12.5px; }
.clock-bar--card.rate-bar .clock-flag { width: 19px; height: 14px; }
/* 首页 hero 里的透明汇率条 */
.rate-bar:not(.clock-bar--card) { margin-top: 10px; gap: 6px 0; }
.rate-bar:not(.clock-bar--card) .clock-item { padding: 0 10px; }
.rate-bar:not(.clock-bar--card) .clock-item i { font-size: 11.5px; }
.rate-bar:not(.clock-bar--card) .clock-item b { font-size: 12px; font-weight: 600; }
.rate-bar:not(.clock-bar--card) .clock-flag { width: 16px; height: 12px; }

/* ---------------- 区块 ---------------- */
.section { padding: 40px 0; }
.section + .section { padding-top: 0; }
.section, .cat-block { scroll-margin-top: 84px; }

/* 首页「选择站点」区块：距离上下更近 */
#sec-sites { padding: 8px 0 10px; }

/* 首页布局：左侧模块菜单 + 内容 */
.home-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.home-nav { top: 84px; }
.home-main { min-width: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-head h2 .cat-ico { margin-top: -2px; }
.section-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.section-head .more { font-size: 13px; color: var(--brand); white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; }

.count-chip {
  font-size: 12px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 3px 11px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ---------------- 站点卡片 ---------------- */
/* 首页站点入口：最大宽度下一行 6 个 */
.site-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.site-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.site-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.site-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-flag {
  width: 40px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--flag-ink);
  background: var(--flag-bg);
  border: 1px solid var(--flag-border);
  flex-shrink: 0;
  overflow: hidden;
}
.site-flag img { width: 100%; height: 100%; object-fit: cover; }
.site-card-text { min-width: 0; }
.site-card h3 { font-size: 14.5px; line-height: 1.3; }
.site-card h3:hover { color: var(--brand); }
.site-region { font-size: 11.5px; color: var(--muted); display: block; margin-top: 1px; }
.site-desc {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------- 网站卡片（紧凑，首页与分站统一：宽屏一行最多 6 个） ---------------- */
.card-grid {
  display: grid;
  gap: 8px 9px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.wcard {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 1px;
  align-items: start;
  padding: 9px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.wcard:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

/* 图标跨「标题 + 按钮」两行，高度正好等于这两行 */
.wcard-head { display: contents; }
.logo-box { grid-column: 1; grid-row: 1 / span 2; }
.wcard-title { grid-column: 2; grid-row: 1; }
.wcard-actions { grid-column: 2; grid-row: 2; }

.logo-box {
  width: 40px; height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.avatar-letter {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.5px;
}

.wcard-title { min-width: 0; }
.wcard-title h3 {
  font-size: 13.5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.wcard-title h3 a:hover { color: var(--brand); }
.wcard-title h3 .ad-tag { -webkit-box-ordinal-group: 0; }

/* 广告标识（网站名称前）——参考装机导航的浅橙徽章 */
.ad-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 6px;
  margin-right: 5px;
  border-radius: 5px;
  color: #e65100;
  background: #fff3e0;
  border: 1px solid #ffcf9e;
  vertical-align: 1px;
}
html[data-theme="dark"] .ad-tag {
  color: #ffb174;
  background: rgba(230, 81, 0, .16);
  border-color: rgba(255, 152, 0, .35);
}
.wcard.is-ad { border-color: #ffcf9e; }
html[data-theme="dark"] .wcard.is-ad { border-color: #5c3a28; }

/* 官网 / 详情（纯文字着色，无背景按钮） */
.wcard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 标签（排在图标下方） */
.wcard-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.mini-tag {
  font-style: normal;
  font-size: 10.5px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.wcard-summary {
  grid-column: 1 / -1;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片较窄时按钮间距收紧 */
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.btn-visit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--brand);
  transition: color .18s;
}
.btn-visit svg { flex-shrink: 0; }
.btn-visit:hover { color: var(--brand-dark); text-decoration: underline; }
.btn-detail {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  transition: color .18s;
}
.btn-detail:hover { color: var(--brand); text-decoration: underline; }
.btn-detail svg { flex-shrink: 0; margin-top: -1px; }

/* ---------------- 面包屑 ---------------- */
.crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 20px 0 4px;
  font-size: 12.5px;
  color: var(--muted);
}
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: var(--muted); opacity: .7; }
.crumb .current { color: var(--ink-2); }

/* ---------------- 节日日历条 ---------------- */
.holiday-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.holiday-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  padding-right: 12px;
  border-right: 1px dashed var(--line);
}
.holiday-label svg { color: var(--brand); }
.holiday-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9px;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .18s, transform .18s;
}
.holiday-chip:hover { border-color: var(--brand-border); transform: translateY(-1px); }
.holiday-chip b { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.holiday-chip i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.holiday-chip em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-dark);
  white-space: nowrap;
}
.holiday-chip.is-urgent {
  background: var(--accent-soft);
  border-color: transparent;
}
.holiday-chip.is-urgent em { color: var(--accent); }
.holiday-more {
  margin-left: auto;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--brand);
  cursor: pointer;
  white-space: nowrap;
}
.holiday-more:hover { text-decoration: underline; }

/* ---------------- 弹窗（节日日历等） ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 14, 26, .55);
  backdrop-filter: blur(4px);
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  width: 100%;
  max-width: 520px;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: modal-in .18s ease;
}
.modal-box.modal-holiday { max-width: 760px; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15.5px; }
.modal-close {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.modal-close:hover { border-color: var(--brand-border); color: var(--brand); }
.modal-body { padding: 14px 20px 20px; overflow-y: auto; }
.modal-tip { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.modal-tip .tip-country { color: var(--ink-2); font-weight: 600; }

/* 日历弹窗固定在窗口上方，不随内容高度上下跳动 */
.modal-overlay.align-top { align-items: flex-start; padding-top: 56px; }

/* 移动端搜索弹窗 */
.modal-search { max-width: 420px; }
.search-modal-form { display: flex; gap: 10px; }
.search-modal-form input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  outline: none;
}
.search-modal-form input:focus { border-color: var(--brand-border); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.search-modal-form .btn-primary { height: 42px; padding: 0 18px; }

/* 节日列表弹窗（分站：未来一年全部节日，按月分组） */
.holiday-month {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-soft);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  margin: 12px 0 4px;
}
.holiday-month:first-of-type { margin-top: 2px; }
.holiday-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.holiday-row:last-child { border-bottom: 0; }
.holiday-row .h-name { flex: 1; min-width: 0; }
.holiday-row .h-name b { font-weight: 600; color: var(--ink); }
.holiday-row .h-name span { font-size: 11px; color: var(--muted); margin-left: 7px; }
/* 节日归属国家标签 */
.h-country {
  display: inline-block;
  font-style: normal;
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  margin-left: 6px;
  border-radius: 4px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  vertical-align: 1px;
  white-space: nowrap;
}
.h-country.is-all { color: var(--muted); background: var(--soft); }
html[data-theme="dark"] .h-country { background: rgba(91, 147, 255, .14); }
html[data-theme="dark"] .h-country.is-all { background: var(--soft); }
.holiday-row .h-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.holiday-row .h-count { font-size: 12px; font-weight: 600; color: var(--brand-dark); white-space: nowrap; min-width: 72px; text-align: right; }
.holiday-row.is-today { background: var(--brand-soft); border-radius: 8px; padding-left: 8px; padding-right: 8px; border-bottom-color: transparent; }

/* 节日弹窗：国家筛选 */
.h-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.hf-chip {
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.hf-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.hf-chip.is-on {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 600;
}
/* 筛选隐藏行/月份（display:flex 会覆盖 [hidden] 默认值，需显式声明） */
.holiday-row[hidden], .holiday-month[hidden] { display: none; }

/* ---------------- 站点页 ---------------- */
.site-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 0 8px;
}
.site-hero .site-flag { width: 50px; height: 50px; font-size: 28px; border-radius: 13px; }
.site-hero > div:nth-child(2) { flex: 1 1 260px; min-width: 0; }
.site-hero h1 { font-size: 21px; line-height: 1.25; letter-spacing: -.4px; }
.site-hero p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.site-hero-meta { display: flex; gap: 8px; margin-left: auto; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.chip b { color: var(--brand); }

.site-layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 56px;
}

.side-nav {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.side-nav h4 {
  font-size: 11.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 8px 10px;
  font-weight: 600;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: background .16s, color .16s;
}
.side-nav a:hover { background: var(--hover); color: var(--brand); }
.side-nav a.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.side-nav a .ico { font-size: 14px; }
.side-nav a .num {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--soft);
  padding: 1px 5px;
  border-radius: 20px;
}
.side-nav a.is-active .num { background: var(--card); color: var(--brand); }

/* 分类区块 */
.cat-block { margin-bottom: 38px; scroll-margin-top: 84px; }
.cat-block:last-child { margin-bottom: 0; }

.cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cat-ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--cat-ico-bg);
  font-size: 15px;
  border: 1px solid var(--cat-ico-border);
  flex-shrink: 0;
}
.cat-head h2 { font-size: 16.5px; }
.cat-head .count-chip { margin-left: auto; }
.cat-desc { font-size: 12.5px; color: var(--muted); margin: -8px 0 14px 40px; }

/* ---------------- 详情页 ---------------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  padding: 8px 0 56px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.panel + .panel { margin-top: 18px; }
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 16px;
}
.panel-title::before {
  content: "";
  width: 3px; height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2563eb, #7c3aed);
}

.detail-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.detail-head .logo-box { width: 68px; height: 68px; border-radius: 16px; font-size: 28px; }
.detail-head .avatar-letter { font-size: 28px; }
.detail-name { flex: 1; min-width: 220px; }
.detail-name h1 { font-size: 24px; letter-spacing: -.5px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.detail-inline-meta {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}
.detail-name .tag-row { margin-top: 8px; }
.detail-summary { font-size: 14px; color: var(--ink-2); margin-top: 14px; max-width: 760px; }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 10px 20px -12px rgba(37, 99, 235, .9);
  transition: filter .18s, transform .18s;
  border: 0;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--card);
  transition: border-color .18s, color .18s;
}
.btn-ghost:hover { border-color: var(--brand-border); color: var(--brand); }

.prose { font-size: 14.5px; line-height: 1.95; color: var(--ink-2); }
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }

.info-list { display: grid; gap: 0; margin: 0; }
.info-list div {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.info-list div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); width: 68px; flex-shrink: 0; margin: 0; }
.info-list dd {
  margin: 0;
  color: var(--ink-2);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}
.info-list dd a { color: var(--brand); }

.placement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
}
.placement-site {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.placement-site:last-child { border-bottom: 0; padding-bottom: 0; }
.placement-site-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.placement-site-head a:hover { color: var(--brand); }
.placement-cats { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 2px; }
.placement-cats a {
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.placement-cats a:hover { background: var(--brand-soft); border-color: var(--brand-border); color: var(--brand-dark); }

.related { display: grid; gap: 2px; }
.related-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.related-item:last-child { border-bottom: 0; }
.related-item .logo-box { width: 32px; height: 32px; border-radius: 8px; }
.related-item .avatar-letter { font-size: 14px; }
.related-item .t { min-width: 0; flex: 1; }
.related-item .t strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-item .t span { font-size: 11.5px; color: var(--muted); }
.related-item:hover .t strong { color: var(--brand); }

/* ---------------- 关于我们 ---------------- */
.about-page { padding-bottom: 56px; }
.about-wrap { max-width: 860px; margin: 0 auto; }
.about-hero { padding: 30px 24px 18px; }
.about-hero h1 { font-size: 26px; letter-spacing: -.6px; }
.about-hero-sub { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.about-panel { margin-top: 16px; padding: 22px 24px; }
.about-text { font-size: 13.8px; color: var(--ink-2); line-height: 1.95; word-break: break-word; }
.about-text p { margin: 0 0 10px; }
.about-text p:last-child { margin-bottom: 0; }
.about-list { margin: 0 0 10px; padding-left: 20px; }
.about-list li { margin-bottom: 7px; }
.about-list li:last-child { margin-bottom: 0; }
.about-contact-btn { margin-top: 16px; }
.contact-box { max-width: 380px; }
.contact-qr {
  width: 200px; height: 200px;
  margin: 6px auto 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.contact-qr img { width: 100%; height: 100%; object-fit: contain; }
.contact-qr.is-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  text-align: center;
}
.contact-qr.is-empty span { font-size: 12.5px; }
.contact-qr.is-empty em { font-style: normal; font-size: 11px; opacity: .75; }
.contact-note { text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.detail-safety { display: flex; gap: 7px; align-items: flex-start; margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.detail-safety svg { flex: none; margin-top: 2px; color: var(--brand); }
.about-markets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.about-market {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .18s, transform .18s;
}
.about-market:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.about-market .site-flag { width: 40px; height: 40px; font-size: 21px; border-radius: 11px; }
/* 三个字母的标识（DNY）收一点字号，保证与其他图标在方块内留白一致 */
.site-flag.is-long {
  font-size: 13px;
  letter-spacing: 0;
}
.site-card .site-flag.is-long { font-size: 12px; }
.about-market .site-flag.is-long { font-size: 13px; }
.site-hero .site-flag.is-long { font-size: 18px; }
/* 详情页「所属导航位置」里的小号站点徽标 */
.placement-site-head .site-flag { width: 26px; height: 23px; border-radius: 7px; font-size: 12px; letter-spacing: 0; }
.placement-site-head .site-flag.is-long { font-size: 8.5px; }
.about-market .m { flex: 1; min-width: 0; }
.about-market .m b { display: block; font-size: 13.5px; }
.about-market .m i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.about-market .n { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.about-market .n b { color: var(--brand); }

/* ---------------- 分页 / 空状态 ---------------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pager-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.pager-btn:hover { border-color: var(--brand-border); color: var(--brand); }
.pager-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.pager-btn.is-disabled { opacity: .45; pointer-events: none; }

.empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--divider);
  border-radius: 14px;
  font-size: 13.5px;
}
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 6px; }

/* ---------------- 搜索结果 ---------------- */
.search-head { padding: 26px 0 6px; }
.search-head h1 { font-size: 22px; }
.search-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.search-head b { color: var(--brand); }

/* ---------------- 页脚（深色多栏） ---------------- */
.site-footer {
  margin-top: 44px;
  background: #080e19;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: #93a4c0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: 26px;
}
.footer-brand { max-width: 460px; min-width: 260px; }
.footer-logo { display: inline-flex; align-items: center; gap: 9px; }
.footer-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2563eb, #6d28d9);
  color: #fff; font-size: 14px; font-weight: 700;
}
.footer-name { color: #fff; font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.footer-desc { margin-top: 12px; font-size: 12.8px; line-height: 1.8; color: #8798b5; }
.footer-meta { margin-top: 10px; font-size: 12px; line-height: 1.9; color: #64748b; }
.footer-copy { margin: 10px 0 0; font-size: 12.3px; color: #5d6d88; }
.footer-copy a { color: #5d6d88; }
.footer-copy a:hover { color: #9db8ee; }

.footer-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #dbe4f3; }
.footer-col a {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.6px; line-height: 2.1; color: #8798b5;
  transition: color .16s;
}
.footer-col a:hover { color: #fff; }
.footer-col a span { font-size: 10.5px; color: #55637c; }

@media (max-width: 720px) {
  .footer-inner { flex-direction: column; gap: 22px; padding-top: 26px; padding-bottom: 22px; }
  .footer-brand { max-width: none; }
  .footer-cols { gap: 28px; }
  .footer-col h4 { margin-bottom: 6px; }
  .about-hero h1 { font-size: 22px; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1280px) {
  .home-layout { grid-template-columns: 172px minmax(0, 1fr); gap: 22px; }
  .card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .site-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .site-layout, .home-layout { grid-template-columns: 1fr; gap: 20px; }
  .side-nav {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px;
  }
  .side-nav h4 { display: none; }
  .side-nav a { white-space: nowrap; padding: 7px 12px; }
  .side-nav a .num { margin-left: 2px; }
  .detail-layout { grid-template-columns: 1fr; }
  .search-mini { width: 170px; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { overflow-x: hidden; }
  .container { padding: 0 16px; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px 10px; }
  .site-switch { order: 3; flex: 1 1 100%; width: 100%; min-width: 0; }
  /* 手机端：搜索框隐藏，改为图标按钮 + 弹窗搜索 */
  .search-mini { display: none; }
  .search-toggle { display: inline-flex; order: 2; margin-left: auto; }
  .theme-toggle { order: 2; margin-left: 0; }
  .brand-text em { display: none; }
  /* 手机端：列表卡片不显示标签与按钮，点名称直达官网 */
  .wcard-actions, .wcard-tags { display: none; }
  .wcard-summary { -webkit-line-clamp: 2; }
  /* 手机端无需跨行，图标只与标题同行，简介紧接其下 */
  .wcard { grid-template-columns: 32px minmax(0, 1fr); row-gap: 3px; padding: 8px 10px; }
  .logo-box { grid-row: 1; width: 32px; height: 32px; border-radius: 8px; }
  .logo-box .avatar-letter { font-size: 15px; letter-spacing: -.2px; }
  .wcard-title { align-self: center; }
  .hero { padding: 20px 0 18px; }
  .hero h1 { font-size: 26px; letter-spacing: -.6px; }
  .clock-item { padding: 0 12px; }
  .clock-item b { font-size: 12.5px; }
  /* 手机端时钟条：收紧内边距与字号，让每行能并排放两个城市 */
  .clock-bar--card { padding: 8px 10px; margin: 8px 0 10px; row-gap: 6px; }
  .clock-bar--card .clock-item { padding: 0 9px; gap: 5px; }
  .clock-bar--card .clock-item i { font-size: 11px; gap: 4px; }
  .clock-bar--card .clock-item b { font-size: 12px; }
  .clock-bar--card .clock-flag { width: 17px; height: 12px; }
  /* 手机端汇率条：货币名换成代码（BRL/MXN…），一行能放 3 个 */
  .rate-name { display: none; }
  .rate-code { display: inline; font-size: 10.5px; letter-spacing: .2px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 手机端：分站页隐藏分类/网站统计，标题下方直接接实时时钟 */
  .site-hero-meta--site { display: none; }
  .site-hero { padding: 16px 0 4px; gap: 14px; }
  .site-hero .site-flag { width: 42px; height: 42px; font-size: 18px; border-radius: 11px; }
  .site-hero h1 { font-size: 19px; }
  .detail-head .logo-box { width: 56px; height: 56px; }
  .holiday-bar { padding: 10px 12px; }
  .holiday-label { width: 100%; border-right: 0; padding-right: 0; padding-bottom: 2px; }
  .holiday-more { margin-left: 0; }
  .modal-overlay { padding: 12px; }
}

@media (max-width: 430px) {
  .card-grid { grid-template-columns: 1fr; }
  .site-grid { grid-template-columns: 1fr; }
  /* 窄屏时钟：单列排列，压缩字号与行距，避免整块过高 */
  .clock-bar--card { row-gap: 4px; padding: 8px; }
  .clock-bar--card .clock-item { padding: 0 6px; gap: 4px; }
  .clock-item { padding: 0 10px; }
  .clock-item i { font-size: 11px; gap: 4px; }
  .clock-bar--card .clock-item b { font-size: 11.5px; }
  .clock-bar--card .clock-flag { width: 15px; height: 11px; }
}

/* 跳转提示页（jump.php） */
.jump-panel { max-width: 560px; margin: 48px auto; padding: 36px 32px; text-align: center; }
.jump-panel .jump-icon { display: flex; justify-content: center; }
.jump-panel .logo-box { width: 64px; height: 64px; border-radius: 16px; }
.jump-title { font-size: 20px; margin-top: 14px; letter-spacing: -.4px; }
.jump-host { font-size: 13px; color: var(--muted); margin-top: 4px; }
.jump-tip { font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.jump-tip b { color: var(--brand); }
.jump-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 16px auto 0; max-width: 320px; }
.jump-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; }
.jump-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.jump-note { font-size: 11.5px; color: var(--muted); margin-top: 16px; line-height: 1.7; }

/* ---------------- 网站地图（HTML） ---------------- */
.sitemap-page { padding-bottom: 56px; }
.sitemap-hero { padding: 30px 2px 10px; }
.sitemap-hero h1 { font-size: 24px; letter-spacing: -.5px; }
.sitemap-hero p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.sitemap-hero b { color: var(--brand); }
.sitemap-site { margin-top: 22px; }
.sitemap-site-head { display: flex; align-items: center; gap: 9px; font-size: 16px; margin-bottom: 12px; }
.sitemap-site-head a { color: var(--ink); }
.sitemap-site-head a:hover { color: var(--brand); }
.sitemap-site-region { font-size: 12px; color: var(--muted); font-weight: 400; }
.sitemap-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.sitemap-cat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.sitemap-cat-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.sitemap-cat-name i { font-style: normal; font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 1px 7px; border-radius: 20px; }
.sitemap-links { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12.5px; }
.sitemap-links a { color: var(--ink-2); }
.sitemap-links a:hover { color: var(--brand); }
.sitemap-foot { margin-top: 24px; font-size: 12.5px; color: var(--muted); }
.sitemap-foot a { color: var(--brand); }
