/* 时区地图 —— 全站样式 */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-elev: #ffffff;
  --border: #e3e6eb;
  --text: #1a2233;
  --text-muted: #5b6472;
  --accent: #2563eb;
  --accent-soft: #eaf1fe;
  --brand: #2563eb;
  --gold: #e8890c;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(26, 34, 51, 0.06);
  --shadow: 0 4px 16px rgba(26, 34, 51, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 头部 ---------- */

.site-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 58px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.4; }
.brand-sun { fill: var(--gold); stroke: none; }

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 14px; color: var(--text-muted);
}
.site-nav a:hover { background: #eceef2; text-decoration: none; color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--accent); color: #fff; }

/* ---------- 图标（全站自托管内联 SVG） ---------- */

.ico {
  width: 1em; height: 1em; flex: none;
  vertical-align: -0.12em;
}
.nav-ico { width: 15px; height: 15px; opacity: .8; }
.site-nav a[aria-current="page"] .nav-ico { opacity: 1; }

/* 页面主标题 */
.page-title-ico { display: flex; align-items: center; gap: 10px; }
.page-title-ico .title-ico {
  width: 30px; height: 30px; color: var(--accent);
  padding: 5px; border-radius: 9px;
  background: var(--accent-soft);
}

/* 汉堡菜单按钮（桌面端隐藏） */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 38px; padding: 0 9px;
  background: transparent; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block; height: 2px; width: 100%; border-radius: 2px;
  background: var(--text); transition: transform .2s ease, opacity .2s ease;
}
/* 展开时三条线变成叉号 */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 国旗 ---------- */

.flag {
  display: inline-block; width: 20px; height: 14px;
  /* 各国旗帜宽高比不统一（3:2、19:10、28:11 等），用 contain 避免裁切 */
  border-radius: 2px; object-fit: contain; flex: none;
  background: rgba(26, 34, 51, .04);
  box-shadow: 0 0 0 1px rgba(26, 34, 51, .12);
  vertical-align: -2px;
}
.flag-lg { width: 30px; height: 21px; border-radius: 3px; vertical-align: -4px; }
.country-cell { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- 通用 ---------- */

main { padding: 26px 0 44px; }

.page-title { font-size: 26px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.page-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 22px; max-width: 68ch; }

.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 6px; color: #b6bcc7; }

.panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; min-height: 34px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-soft); color: var(--text-muted);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: #eceef2; color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.is-active, .btn[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4fd8; color: #fff; }
.btn-icon { min-width: 34px; padding: 6px 10px; }
.btn-sm { min-height: 28px; padding: 4px 10px; font-size: 13px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar-label { font-size: 13px; color: var(--text-muted); margin-right: 2px; }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

.input {
  padding: 7px 12px; min-height: 34px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 14px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
select.input { padding-right: 28px; }

.home-filter { margin-bottom: 10px; }
.home-filter .input[type="search"] { min-width: 190px; }

/* 首页常用工具快捷行 */
.home-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.home-tools-label { font-size: 13px; color: var(--text-muted); margin-right: 2px; }
.home-tool {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-soft); color: var(--text); font-size: 13px; text-decoration: none;
}
.home-tool:hover { border-color: var(--accent); color: var(--accent); }
.home-tool .nav-ico { width: 13px; height: 13px; }

/* ---------- 时钟卡 ---------- */

.clock-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.clock-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.clock-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); z-index: 0;
}
.clock-card.is-golden::before { background: var(--gold); }
.clock-card.is-blue::before { background: #5b7fd4; }
.clock-card.is-night::before { background: #3b4658; }
.clock-card:hover { box-shadow: var(--shadow); }

/* 卡片内含独立链接时的结构：整卡由覆盖层跳转，卡内的链接浮于其上 */
.clock-card-split { position: relative; }
.clock-card-cover {
  position: absolute; inset: 0; z-index: 1; border-radius: inherit;
}
.clock-card-split .clock-city,
.clock-card-split .clock-time,
.clock-card-split .clock-meta { position: relative; z-index: 2; pointer-events: none; }
.clock-card-split .clock-country { position: relative; z-index: 3; }
.clock-card-split .clock-country a { color: inherit; }
.clock-card-split .clock-country a:hover { color: var(--accent); }

/* 首页时钟卡：城市名、国家名、UTC 偏移各自可点 */
.clock-card-links .clock-city a,
.clock-card-links .clock-meta a {
  color: inherit;
  pointer-events: auto;
  position: relative;
  z-index: 3;
}
.clock-card-links .clock-city a:hover,
.clock-card-links .clock-meta a:hover { color: var(--accent); }
.clock-card-links .clock-country a {
  display: inline-flex; align-items: center; gap: 5px;
}
.clock-city { font-weight: 600; font-size: 15px; }
.clock-country {
  font-size: 12px; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 5px;
}
.clock-country .flag { width: 16px; height: 11px; }
.clock-time {
  font-family: var(--mono); font-size: 25px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.25;
}
.clock-time .sec { font-size: 16px; color: var(--text-muted); }
.clock-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.clock-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.clock-tag.golden { background: #fdf1dc; color: #a8630a; }
.clock-tag.blue { background: #e8eefc; color: #3a5eb5; }
.clock-tag.night { background: #eceef2; color: var(--text-muted); }
.clock-tag .tag-ico { width: 12px; height: 12px; }

/* ---------- 表格 ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.tz-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--bg); }
.tz-table th, .tz-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tz-table th { background: var(--bg-soft); font-size: 13px; color: var(--text-muted); font-weight: 600; position: sticky; top: 0; }
.tz-table tbody tr:last-child td { border-bottom: none; }
.tz-table tbody tr:hover { background: var(--bg-soft); }
.tz-table .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tz-table .offset { color: var(--text-muted); font-size: 13px; }

/* 筛选提示（如按 UTC 偏移过滤时） */
.filter-note {
  margin: 0 0 14px; padding: 9px 13px; font-size: 13.5px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; color: #1f2937;
}

/* ---------- 说明文 ---------- */

.prose { max-width: 78ch; }
.prose h2 { font-size: 19px; margin: 34px 0 10px; }
.prose h3 { font-size: 16px; margin: 26px 0 8px; }
.prose p { margin: 0 0 12px; color: #333c4d; }
.prose ul { margin: 0 0 14px; padding-left: 20px; color: #333c4d; }
.prose li { margin-bottom: 6px; }

/* ---------- 城市详情页 ---------- */

.city-hero { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 20px; }
.city-hero-time { font-family: var(--mono); font-size: 46px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.city-hero-time .sec {
  font-size: 26px; font-weight: 500; color: var(--text-muted);
  margin-left: 2px;
}
.city-hero-date { color: var(--text-muted); font-size: 14px; }
.city-facts {
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin: 18px 0 26px;
}
.fact {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.fact-k { font-size: 12px; color: var(--text-muted); }
.fact-v { font-size: 18px; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.sun-bar {
  height: 10px; border-radius: 999px; position: relative; overflow: hidden;
  background: linear-gradient(90deg, #1b2540 0%, #1b2540 12%, #e9b96b 22%, #7fb2ea 40%,
              #cfe4f8 50%, #7fb2ea 60%, #e9b96b 78%, #1b2540 88%, #1b2540 100%);
  margin: 14px 0 6px;
}
.sun-bar-mark {
  position: absolute; top: -3px; width: 3px; height: 16px; background: var(--text);
  border-radius: 2px; transform: translateX(-50%);
}

@media (max-width: 640px) {
  .city-hero-time { font-size: 36px; }
  .city-hero-time .sec { font-size: 21px; }
}

/* ---------- 日月走向图 ---------- */

.sky-wrap { margin: 26px 0 6px; }
.sky-wrap > h2 { font-size: 17px; margin: 0 0 4px; }
.sky-wrap > .page-sub { margin: 0 0 14px; font-size: 13px; }

.sky-card {
  position: relative;
  background:
    radial-gradient(120% 140% at 15% 0%, #1b2f56 0%, rgba(27, 47, 86, 0) 55%),
    radial-gradient(90% 120% at 85% 10%, #14264a 0%, rgba(20, 38, 74, 0) 60%),
    linear-gradient(180deg, #0b1a33 0%, #0a1628 100%);
  border-radius: var(--radius-lg);
  padding: 18px 20px 10px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
/* 星空点缀 */
.sky-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 28% 12%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 45% 30%, rgba(255,255,255,.75), transparent),
    radial-gradient(1px 1px at 63% 16%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 78% 28%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 90% 12%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 8% 44%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 36% 48%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 55% 8%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 70% 46%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 88% 38%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.4px 1.4px at 20% 34%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.4px 1.4px at 50% 22%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.4px 1.4px at 84% 20%, rgba(255,255,255,.55), transparent);
  pointer-events: none;
}

.sky-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.sky-head-moon { align-items: center; }
.sky-phase { flex: none; line-height: 0; }
.sky-moon-disc { display: block; }

.sky-kicker { font-size: 13px; color: rgba(255, 255, 255, .62); }
.sky-big {
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.sky-big-text { font-family: var(--font); font-size: 28px; letter-spacing: 0; }
.sky-sub {
  position: relative;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
  margin-top: 2px;
}
.sky-sub b { color: #fff; font-weight: 600; font-family: var(--mono); }
.sky-foot { margin: 2px 0 6px; }

.sky-plot {
  position: relative;
  margin-top: 6px;
  /* 窄屏时图形保持最小宽度，横向滑动查看完整 24 小时轨迹 */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.sky-svg { display: block; width: 100%; min-width: 560px; height: auto; overflow: visible; }

.sky-grid { stroke: rgba(255, 255, 255, .10); stroke-width: 1; }
.sky-grid-v { stroke: rgba(255, 255, 255, .05); }
.sky-axis { fill: rgba(255, 255, 255, .42); font-size: 12px; font-family: var(--mono); }
.sky-horizon {
  stroke: rgba(255, 255, 255, .38);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
}
.sky-horizon-label { fill: rgba(255, 255, 255, .45); font-size: 12px; }
.sky-now-line { stroke: rgba(255, 255, 255, .5); stroke-width: 1; stroke-dasharray: 3 4; }
.sky-now-dot { fill: #fff; stroke: rgba(10, 22, 40, .6); stroke-width: 1.5; }

/* 「现在」点的呼吸光晕 */
.sky-now-halo {
  fill: rgba(255, 255, 255, .14);
  stroke: rgba(255, 255, 255, .6);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  animation: sky-halo 2.6s ease-out infinite;
  animation-delay: -0.9s;
}
@keyframes sky-halo {
  0%   { transform: scale(.75); opacity: .85; }
  70%  { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sky-now-halo { animation: none; opacity: .3; }
}
.sky-now-label { fill: rgba(255, 255, 255, .8); font-size: 12px; }
.sky-marker { stroke: rgba(255, 255, 255, .9); stroke-width: 1.6; }
.sky-marker-label {
  fill: #fff;
  font-size: 15px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(10, 22, 40, .55);
  stroke-width: 3px;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .sky-card { padding: 14px 14px 6px; }
  .sky-big { font-size: 34px; }
  .sky-big-text { font-size: 22px; }
  /* 图形按 700px 最小宽度渲染并横向滑动，
     故把 SVG 内字号同步放大（约 1/0.7 倍）以保证可读 */
  .sky-svg { min-width: 700px; }
  .sky-axis { font-size: 17px; }
  .sky-horizon-label { font-size: 17px; }
  .sky-now-label { font-size: 17px; }
  .sky-marker-label { font-size: 21px; }
}

/* ---------- 国家时区页 ---------- */

.tz-country-list { display: flex; flex-direction: column; gap: 12px; }

.tz-country-block {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.tz-country-head {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.tz-country-head > div:first-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tz-country-tz { font-size: 14px; font-weight: 600; }
.tz-country-clock { display: flex; gap: 10px; align-items: baseline; }
.tz-country-time {
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tz-country-time .sec { font-size: 14px; color: var(--text-muted); }
.tz-country-off { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.tz-country-aliases { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.tz-country-block.is-local { border-style: dashed; background: var(--bg-soft); }

.tz-policy-note { margin-top: 20px; }
.tz-local-note { font-size: 11px; color: var(--text-muted); }
.tz-policy-note h2 { margin-bottom: 6px; }
.tz-policy-note p { color: #333c4d; }

/* ---------- 国家时区地图 ---------- */

.cmap-panel { margin-top: 24px; }
.cmap-head {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cmap-head h2 { font-size: 17px; margin: 0; }
.cmap-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.cmap-views {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
}
.cmap-box {
  position: relative; margin: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #f7f9fc; padding: 10px 0; overflow: hidden;
}
.cmap-box-main { flex: 1 1 100%; }
.cmap-box:not(.cmap-box-main) { flex: 0 1 auto; }
.cmap-canvas { display: block; margin: 0 auto; }
.cmap-view-title {
  position: absolute; top: 8px; left: 10px; z-index: 4;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.cmap-tip {
  position: absolute; display: none; pointer-events: none; z-index: 5;
  padding: 6px 9px; border-radius: 8px;
  background: rgba(17, 24, 39, .92); color: #fff;
  font-size: 12px; line-height: 1.45; font-family: var(--mono);
  white-space: nowrap;
}
.cmap-note { font-size: 12px; color: var(--text-muted); margin: 8px 0 0; }
.cmap-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cmap-chip {
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 6px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-elev); font-size: 12px;
}
.cmap-chip i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cmap-chip b { font-weight: 600; }
.cmap-chip em { font-style: normal; color: var(--text-muted); font-family: var(--mono); font-size: 11px; }
.cmap-chip s { text-decoration: none; color: var(--text-muted); font-family: var(--mono); font-size: 11px; }

/* ---------- 城市页位置地图 ---------- */

.about-wrap {
  display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap;
}
.about-wrap > .prose { flex: 1 1 420px; min-width: 0; }
.about-map { flex: 0 0 360px; max-width: 100%; }

.cmap { margin: 0; }
.cmap-svg {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #eef4fb;
}
.cmap-sea { fill: #eef4fb; }
.cmap-nb { fill: #e2e8f0; }
.cmap-nb-border { fill: none; stroke: #c3ccd9; stroke-width: .6; stroke-linejoin: round; }
.cmap-own { fill: #f4f1ea; }
.cmap-border { fill: none; stroke: #a9b2c0; stroke-width: .9; stroke-linejoin: round; }
.cmap-prov { fill: none; stroke: #d3d9e2; stroke-width: .6; stroke-linejoin: round; }
.cmap-prov-hi { fill: #fdeccd; }
.cmap-pin-halo { fill: rgba(37, 99, 235, .18); }
.cmap-pin-dot { fill: var(--accent); stroke: #fff; stroke-width: 1.4; }
.cmap-label {
  font-size: 11px; font-weight: 600; fill: var(--text);
  paint-order: stroke; stroke: #fff; stroke-width: 2.6; stroke-linejoin: round;
}
.cmap-inset-bg { fill: rgba(255, 255, 255, .92); stroke: var(--border); }
.cmap-inset-land { fill: #e2e8f0; stroke: none; }
.cmap-inset-line { stroke: #c3ccd9; stroke-width: .4; stroke-linejoin: round; }
.cmap-inset-hl { fill: #f0b429; stroke: none; }
.cmap-inset-hl-line { stroke: #a97a0b; stroke-width: .5; stroke-linejoin: round; }
.cmap-inset-hl-dot { fill: none; stroke: #d99a12; stroke-width: 1.4; }
.cmap-inset-loc { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .45; }
.cmap-inset-pin { fill: var(--accent); stroke: #fff; stroke-width: 1; }
.cmap-inset-title {
  font-size: 8px; font-weight: 600; fill: var(--text-muted);
  paint-order: stroke; stroke: rgba(255, 255, 255, .9); stroke-width: 2; stroke-linejoin: round;
}
.cmap-cap {
  margin-top: 7px; font-size: 12px; color: var(--text-muted); text-align: center;
}

@media (max-width: 860px) {
  .about-map { flex: 1 1 100%; }
}


.tz-country-cities {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; gap: 6px 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  border-top: 1px solid var(--border); padding-top: 11px;
}
.tz-country-cities li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.tz-country-cities a { font-weight: 600; }
.tz-city-en { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-city-off { margin-left: auto; color: var(--text-muted); font-size: 11px; font-family: var(--mono); }
.tz-country-empty { margin: 10px 0 0; font-size: 13px; color: var(--text-muted); }

.tz-table td .sec { font-size: 12px; color: var(--text-muted); }

/* ---------- 国家页气候概要 ---------- */

.cc-panel {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
.cc-lead { margin: 0 0 14px; font-size: 13.5px; color: var(--text-muted); line-height: 1.7; }
.cc-lead b { color: var(--text); font-weight: 600; }

.cc-kpis {
  display: grid; gap: 10px; margin-bottom: 14px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.cc-kpi {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 9px 12px;
}
.cc-kpi-k {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-muted);
}
.cc-kpi-v {
  margin-top: 3px; font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cc-list { list-style: none; margin: 0; padding: 0; }
.cc-item {
  display: grid; gap: 2px 14px; align-items: baseline;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  grid-template-areas: "k city v" "hint hint hint";
  padding: 9px 0; border-top: 1px solid var(--border);
}
.cc-item:first-child { border-top: 0; }
.cc-item-k {
  grid-area: k; display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.cc-item-city { grid-area: city; font-size: 14px; min-width: 0; }
.cc-item-city a { font-weight: 600; }
.cc-item-v {
  grid-area: v; font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cc-item-hint { grid-area: hint; font-size: 12px; color: var(--text-muted); }

.cc-note {
  margin: 12px 0 0; padding-top: 11px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted); line-height: 1.7;
}
.cc-note b { color: var(--text); font-weight: 600; }

.cc-kpi .kpi-ico {
  width: 14px; height: 14px; flex: 0 0 auto;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.cc-item .item-ico {
  width: 15px; height: 15px; flex: 0 0 auto;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  color: var(--brand, var(--accent, #2563eb));
}

@media (max-width: 640px) {
  .cc-panel { padding: 14px; }
  .cc-item {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas: "k city" "v v" "hint hint";
  }
  .cc-item-v { font-size: 13px; }
}

/* ---------- 时区详情页小地图 ---------- */

.tzmap-panel { margin-top: 24px; }
.tzmap-wrap {
  position: relative;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #f2f6fb; padding: 8px; overflow: hidden;
}
.tzmap-canvas { display: block; margin: 0 auto; cursor: pointer; }
.tzmap-tip {
  position: absolute; display: none; pointer-events: none; z-index: 5;
  padding: 6px 9px; border-radius: 8px;
  background: rgba(17, 24, 39, .92); color: #fff;
  font-size: 12px; line-height: 1.45;
}
.tzmap-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 10px; font-size: 12px; color: var(--text-muted);
}
.tzmap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tzmap-sw { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.tzmap-sw-zone { background: #f2994a; }
.tzmap-sw-land { background: #dfe5ee; border: 1px solid #cdd6e3; }
.tzmap-sw-sea { background: #f2f6fb; border: 1px solid #dde5ef; }
.tzmap-note { font-size: 12px; color: var(--text-muted); margin: 8px 0 0; }

/* ---------- 历史气候 ---------- */

.wx-panel { margin-top: 26px; }
.wx-title { font-size: 17px; margin: 0 0 4px; }
.wx-note { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.wx-note-src {
  margin: -8px 0 14px; padding: 8px 12px;
  background: #fff7ed; border-left: 3px solid #f59e0b;
  border-radius: 0 8px 8px 0; color: #92400e;
}

.wx-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.wx-tab {
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 20px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; background: #eef1f5; color: var(--text-muted);
  transition: background .15s, color .15s;
}
.wx-tab:hover { background: #e3e8ef; color: var(--text); }
.wx-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wx-tab.is-active { background: #e8f0fc; color: #1d4ed8; }

.wx-summary {
  display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between;
  margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid var(--border);
}
.wx-lead-month { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.wx-lead-val {
  font-family: var(--mono); font-size: 42px; font-weight: 700; line-height: 1.15;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.wx-lead-unit { font-size: 18px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.wx-lead-sub { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

.wx-stats { margin: 0; display: grid; gap: 8px 26px; }
.wx-stat { display: flex; align-items: baseline; gap: 14px; justify-content: space-between; }
.wx-stat dt { font-size: 14px; color: var(--text-muted); }
.wx-stat dd {
  margin: 0; font-family: var(--mono); font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.wx-chart { margin-top: 6px; }
.wx-chart.is-hidden { display: none; }
.wx-svg { display: block; width: 100%; height: auto; overflow: visible; }

.wx-grid line { stroke: #e6e9ef; stroke-width: 1; }
.wx-yl {
  fill: var(--text-muted); font-size: 12px; text-anchor: end;
  dominant-baseline: middle; font-family: var(--mono);
}
.wx-band { fill: #f6ece4; }
.wx-bar { fill: #c2410c; transition: opacity .15s; }
.wx-bar:hover { opacity: .78; }
.wx-xl {
  fill: var(--text-muted); font-size: 13px; text-anchor: middle;
  font-family: var(--mono);
}
.wx-xl-now { fill: #b45309; font-weight: 700; }

.wx-chart[data-mode="rain"] .wx-bar { fill: #2563eb; }
.wx-chart[data-mode="rain"] .wx-band { fill: #e6edfd; }
.wx-chart[data-mode="rain"] .wx-xl-now { fill: #1d4ed8; }
.wx-chart[data-mode="snow"] .wx-bar { fill: #0e7490; }
.wx-chart[data-mode="snow"] .wx-band { fill: #e0f2f6; }
.wx-chart[data-mode="snow"] .wx-xl-now { fill: #0b5c73; }

@media (max-width: 640px) {
  .wx-lead-val { font-size: 32px; }
  .wx-lead-month { font-size: 19px; }
  .wx-summary { flex-direction: column; gap: 14px; }
  .wx-stats { gap: 6px 14px; width: 100%; }
  .wx-stat { gap: 10px; }
  .wx-stat dd { font-size: 14px; }
  .wx-stat dt { font-size: 13px; }
  /* 图表保持可读尺寸，窄屏下横向滚动查看 12 个月 */
  .wx-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .wx-svg { min-width: 760px; }
}

/* ---------- 页脚 ---------- */

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); margin-top: 30px; }
.footer-inner {
  display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start;
  padding: 26px 0; font-size: 13px; color: var(--text-muted);
}
.footer-col { display: flex; flex-direction: column; gap: 5px; }
.footer-brand { font-weight: 700; color: var(--text); margin: 0; font-size: 15px; }
.footer-desc { margin: 0; max-width: 34ch; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent); }
/* 页脚导航：图标与文字同一基线居中。
   注意页脚的 nav 自身就带 .footer-col，样式要写在 .footer-inner 下，
   否则 .footer-col nav a 匹配不到任何元素，图标会只靠 vertical-align 悬在基线上。 */
.footer-inner nav a {
  display: flex; align-items: center; gap: 6px;
}
.footer-inner nav .nav-ico { width: 14px; height: 14px; }
.footer-meta { margin-left: auto; text-align: right; }
.footer-copy { margin: 0; }
/* 页脚版权里的域名外链：品牌蓝 + 驼峰写法增强辨识度 */
.footer-copy a { color: inherit; }
.footer-copy a:hover { color: var(--accent); }
.footer-copy .footer-domain { color: var(--accent); font-weight: 600; }
.footer-legal { margin: 3px 0 0; font-size: 12px; color: var(--text-muted); }
.footer-legal a { color: inherit; }
.footer-legal a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .wrap { width: min(1180px, 100% - 20px); }
  .footer-meta { margin-left: 0; text-align: left; }
  .page-title { font-size: 22px; }
}

/* ---------- 移动端汉堡菜单 ---------- */

@media (max-width: 720px) {
  .header-inner { position: relative; flex-wrap: nowrap; }
  .nav-toggle { display: flex; }

  /* 导航默认折叠，点击汉堡按钮后从右侧滑出 */
  .site-nav {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
    flex-direction: column; align-items: stretch; gap: 2px;
    min-width: 168px; padding: 8px;
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .site-nav a { padding: 10px 12px; border-radius: 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 首页其余城市折叠块 */
.home-more { margin-top: 14px; }
.home-more > summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-soft); color: var(--text-muted); font-size: 14px;
  font-weight: 600; cursor: pointer; user-select: none; list-style: none;
}
.home-more > summary::-webkit-details-marker { display: none; }
.home-more > summary::after { content: ''; border: 5px solid transparent; border-top-color: var(--text-muted); margin-top: 3px; }
.home-more[open] > summary::after { transform: rotate(180deg); margin-top: -3px; }
.home-more > summary:hover { border-color: var(--accent); color: var(--accent); }
.home-more > .clock-grid { margin-top: 14px; }
