/* ============================================================
   HourDiff — Interactive World Time Zone Map (/timezone-map)
   Professional GIS & Master World Clock Console
   ============================================================ */

.tzm [hidden] { display: none !important; }

/* 页面容器：在时区地图页放宽到现代宽屏工作室比例 (1400px) */
body.page-map .site-main .wrap {
  max-width: 1400px;
}

/* ---------- 地图主工作台卡片 (Console Frame) ---------- */
.tzm {
  position: relative;
  margin: 16px 0 28px;
  border: 1px solid #cad8e5;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 24px -2px rgba(15, 30, 52, 0.08), 0 1px 4px rgba(15, 30, 52, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ---------- 1. 顶部控制栏 (Header Toolbar) ---------- */
.tzm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

/* 左侧：全局时间基准与状态 */
.tzm-tool-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.tzm-chip-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tzm-chip-clock b {
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace, sans-serif;
  letter-spacing: 0.3px;
}
.tzm-chip-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* UTC 主时钟 */
.tzm-clock-utc {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
}
.tzm-clock-utc .tzm-chip-label {
  color: #475569;
}
.tzm-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex: none;
}

/* 访客本地时钟 */
.tzm-clock-local {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.tzm-clock-local .tzm-chip-label {
  color: #047857;
}
.tzm-local-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  flex: none;
}
.tzm-chip-tz {
  font-size: 10px;
  color: #047857;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
}

/* 城市总数指标胶囊 */
.tzm-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}
.tzm-meta-icon { font-size: 11px; }
.tzm-count b {
  color: #334155;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 中间：城市搜索框 */
.tzm-search {
  position: relative;
  flex: 1 1 240px;
  max-width: 320px;
  min-width: 180px;
}
.tzm-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.15s ease;
}
.tzm-search input {
  width: 100%;
  height: 30px;
  padding: 0 12px 0 30px;
  border: 1px solid #cbd5e1;
  border-radius: 15px;
  background: #ffffff;
  font: 12px/1.3 inherit;
  font-family: inherit;
  color: #1e293b;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.tzm-search input:focus {
  border-color: #1a6fb5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.15);
}
.tzm-search input:focus + .tzm-search-icon {
  color: #1a6fb5;
}

/* 搜索联想下拉框 */
.tzm-suggest {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 270px;
  max-height: 280px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.18), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  display: none;
}
.tzm-suggest.open { display: block; }
.tzm-suggest button {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  background: none;
  text-align: left;
  font: 12px/1.3 inherit;
  font-family: inherit;
  color: #334155;
  cursor: pointer;
  transition: background-color 0.1s ease;
}
.tzm-suggest button:hover,
.tzm-suggest button.sel {
  background: #f0f7fe;
}
.tzm-suggest .ts-name { font-weight: 600; color: #0f172a; }
.tzm-suggest .ts-country {
  color: #64748b;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tzm-suggest .ts-time {
  margin-left: auto;
  font-size: 11px;
  color: #1a6fb5;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.tzm-suggest .ts-empty {
  padding: 10px 8px;
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
}

/* 右侧：时间制式与全屏 */
.tzm-tool-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.tzm-seg {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  padding: 2px;
}
.tzm-seg button {
  padding: 3px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: 11px/1.3 inherit;
  font-family: inherit;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.12s ease;
}
.tzm-seg button.is-on {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tzm-btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font: 11px/1.3 inherit;
  font-family: inherit;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tzm-btn-tool:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.tzm-btn-tool svg { flex: none; }
.tzm-btn-full.is-on {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* ---------- 2. UTC 偏移刻度尺 (Meridian Axis Ruler) ---------- */
.tzm-rail-outer {
  background: linear-gradient(180deg, #f8fafc 0%, #eaf2f8 100%);
  border-bottom: 1px solid #cbdde9;
  overflow-x: auto;
  scrollbar-width: none;
}
.tzm-rail-outer::-webkit-scrollbar { display: none; }

.tzm-rail {
  display: flex;
  gap: 3px;
  padding: 4px 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  width: var(--tzm-mapw, 100%);
  margin-inline: auto;
}
.tzm-rail::-webkit-scrollbar { display: none; }

.tzm-chip {
  flex: none;
  padding: 2px 6px;
  border: 1px solid #d1e1ee;
  border-radius: 4px;
  background: #ffffff;
  font: 10px/1.4 inherit;
  font-family: inherit;
  color: #3b5368;
  letter-spacing: 0.1px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: all 0.12s ease;
}
.tzm-chip:hover {
  background: #e1effa;
  border-color: #a4cae8;
  color: #104c75;
}
.tzm-chip.is-on {
  background: #1a6fb5 !important;
  border-color: #1a6fb5 !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(26, 111, 181, 0.35);
}

/* 经线对齐的轴模式 (>= 1000px) */
@media (min-width: 1000px) {
  .tzm-rail.is-axis {
    position: relative;
    display: block;
    height: 42px;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #eaf3fa 100%);
    border-bottom: 0;
  }
  .tzm-rail.is-axis::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7px;
    pointer-events: none;
    background-image: linear-gradient(to right, #bcd3e6 1px, transparent 1px);
    background-size: calc(100% / 24) 100%;
    background-repeat: repeat-x;
  }
  .tzm-rail.is-axis .tzm-chip {
    position: absolute;
    top: 7px;
    left: 0;
    transform: translateX(-50%);
    padding: 1px 3px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    font-size: 8.5px;
    font-weight: 400;
    line-height: 1.25;
    color: #627b92;
    white-space: nowrap;
    z-index: 1;
  }
  /* 整点刻度 (主线) */
  .tzm-rail.is-axis .tzm-chip.low {
    top: 22px;
    font-size: 9.5px;
    font-weight: 600;
    color: #1e3a58;
  }
  /* 180° 之外 */
  .tzm-rail.is-axis .tzm-chip.far {
    top: 1px;
    font-size: 7.5px;
    color: #94a3b8;
  }
  .tzm-rail.is-axis .tzm-chip-pfx {
    font-size: 7px;
    letter-spacing: 0.2px;
    opacity: 0.55;
    margin-right: 1px;
  }
  .tzm-rail.is-axis .tzm-chip.low .tzm-chip-pfx {
    font-size: 7.5px;
    opacity: 0.65;
  }
  .tzm-rail.is-axis .tzm-chip:hover {
    z-index: 4;
    background: rgba(26, 111, 181, 0.12);
    color: #0f4066;
  }
  .tzm-rail.is-axis .tzm-chip.is-on {
    z-index: 5;
    background: #1a6fb5 !important;
    color: #ffffff !important;
  }
  .tzm-rail.is-axis .tzm-chip.is-on .tzm-chip-pfx { opacity: 0.85; }
  .tzm-rail.is-axis .tzm-chip.is-nudged::after {
    content: '';
    position: absolute;
    left: calc(50% + var(--d, 0px));
    bottom: -5px;
    width: 1px;
    height: 5px;
    background: #9dbbd4;
  }
}

/* 本地时区 UTC chip 专属醒目标识 */
.tzm-chip.is-local {
  border-color: #22c55e !important;
  color: #15803d !important;
  font-weight: 700 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 1px #86efac;
}
.tzm-rail.is-axis .tzm-chip.is-local {
  color: #166534 !important;
  font-weight: 700 !important;
  text-decoration: underline;
  text-decoration-color: #22c55e;
  text-underline-offset: 3px;
}

/* ---------- 2.5 激活时区过滤条 (Active Zone Filter Bar) ---------- */
.tzm-zonebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #fed7aa;
  background: linear-gradient(90deg, #fffbeb 0%, #fff7ed 100%);
  font-size: 11.5px;
  animation: tzmSlideDown 0.2s ease-out;
}
@keyframes tzmSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tzm-zonebar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.tzm-zonebar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d97706;
}
.tzm-zonebar b {
  color: #92400e;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.tzm-zonebar-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 0;
}
.tzm-zonebar-list::-webkit-scrollbar { display: none; }
.tzm-zonebar-list a {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  background: #ffffff;
  color: #78350f;
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.tzm-zonebar-list a:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}
.tzm-zonebar-list a em {
  font-style: normal;
  color: #b45309;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tzm-zonebar-x {
  flex: none;
  margin-left: auto;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #fde68a;
  color: #92400e;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tzm-zonebar-x:hover {
  background: #fcd34d;
  transform: scale(1.1);
}

/* ---------- 3. 地图画布主区域 (Canvas & Viewport) ---------- */
.tzm-canvas-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #edf6fd 0%, #cfe1f1 100%);
}

/* 浮动 HUD 统一基础 */
.tzm-hud {
  position: absolute;
  z-index: 15;
  pointer-events: none;
}
.tzm-hud > * {
  pointer-events: auto;
}
.tzm-hud-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.05);
}

/* HUD 左上角：洲际快速跳转 */
.tzm-hud-top-left {
  top: 12px;
  left: 14px;
}
.tzm-hud-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding: 0 4px 0 6px;
}
.tzm-regions {
  display: flex;
  align-items: center;
  gap: 3px;
}
.tzm-reg {
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  font: 11px/1.3 inherit;
  font-family: inherit;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tzm-reg:hover {
  background: rgba(26, 111, 181, 0.08);
  color: #1a6fb5;
}
.tzm-reg.is-active {
  background: #1a6fb5;
  border-color: #1a6fb5;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(26, 111, 181, 0.32);
}

/* HUD 右上角：图层开关 */
.tzm-hud-top-right {
  top: 12px;
  right: 14px;
}
.tzm-layers-card {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
}
.tzm-tgl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  font: 11px/1.3 inherit;
  font-family: inherit;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tzm-tgl svg { flex: none; opacity: 0.75; }
.tzm-tgl:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.tzm-tgl.is-on {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  font-weight: 600;
}
.tzm-tgl.is-on svg { opacity: 1; }

/* HUD 右下角：地图导航控制器 (Zoom Dock) */
.tzm-hud-bottom-right {
  bottom: 14px;
  right: 14px;
}
.tzm-nav-dock {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14), 0 1px 3px rgba(15, 23, 42, 0.05);
}
.tzm-nav-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font: 15px/1 inherit;
  font-family: inherit;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}
.tzm-nav-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.tzm-nav-zoomlabel {
  width: auto;
  min-width: 34px;
  height: 26px;
  padding: 0 6px;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 700;
  color: #1a6fb5;
  background: #f0f7fe;
  border: 1px solid #bae6fd;
}
.tzm-nav-zoomlabel:hover {
  background: #e0f2fe;
}

/* 地图视口与舞台 */
.tzm-viewport {
  position: relative;
  overflow: auto;
  width: 100%;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a8c4dc transparent;
}
.tzm-viewport::-webkit-scrollbar { height: 9px; width: 9px; }
.tzm-viewport::-webkit-scrollbar-thumb {
  background: #a8c4dc;
  border-radius: 5px;
}
.tzm-stage {
  position: relative;
  width: var(--tzm-mapw, 100%);
  margin-inline: auto;
  aspect-ratio: 1440 / 568;
  touch-action: pan-x pan-y;
}
.tzm-stage.is-panning { cursor: grabbing; }
.tzm-base {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
.tzm-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tzm-night { transition: opacity 0.25s ease; }
.tzm.is-no-night .tzm-night { opacity: 0; }
.tzm.is-no-zones .tzm-zone-lines,
.tzm.is-no-zones .tzm-idl { opacity: 0; }
.tzm-zone-lines line { stroke: #e39b34; stroke-width: 1; stroke-opacity: 0.45; vector-effect: non-scaling-stroke; }
.tzm-idl polyline {
  fill: none;
  stroke: #dc2626;
  stroke-width: 1.3;
  stroke-dasharray: 4 3;
  stroke-opacity: 0.88;
  vector-effect: non-scaling-stroke;
}

/* ---------- 城市点与标签 (Pins & Labels) ---------- */
.tzm-pins { position: absolute; inset: 0; }
.tzm.is-no-cities .tzm-pins { display: none; }

.tzm-pin {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tzm-pin.hide { display: none; }
.tzm-pin i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f766e;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.4);
  transition: transform 0.12s ease, background 0.12s ease;
}
.tzm-pin.s2 i { width: 8px; height: 8px; }
.tzm-pin.s3 i { width: 9px; height: 9px; }
.tzm-pin.is-added i {
  background: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.3), 0 1px 3px rgba(15, 23, 42, 0.5);
}
.tzm-pin.has-lb { z-index: 2; }
.tzm-pin:hover,
.tzm-pin:focus-visible { z-index: 8; outline: none; }
.tzm-pin:hover i,
.tzm-pin:focus-visible i { transform: scale(1.75); background: #042f2e; }
.tzm-pin.is-added:hover i { background: #9a3412; }
.tzm-pin.is-active { z-index: 9; }
.tzm-pin.is-active i {
  transform: scale(2);
  background: #1a6fb5;
  border-color: #ffffff;
}

/* 城市名与时间 */
.tzm-lb,
.tzm-tm {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 4px rgba(255, 255, 255, 0.9);
}
.tzm-lb {
  bottom: 15px;
  font-size: 10px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.1px;
}
.tzm-tm {
  top: 15px;
  font-size: 9.5px;
  font-weight: 600;
  color: #0d9488;
  letter-spacing: 0.1px;
}
.tzm-pin.s1 .tzm-lb { font-size: 9.5px; }
.tzm-pin.lb-off .tzm-lb,
.tzm-pin.lb-off .tzm-tm { display: none; }
.tzm-pin.lb-left .tzm-lb,
.tzm-pin.lb-left .tzm-tm {
  left: auto;
  right: 12px;
  transform: none;
  text-align: right;
}
.tzm-pin.lb-right .tzm-lb,
.tzm-pin.lb-right .tzm-tm {
  left: 12px;
  transform: none;
  text-align: left;
}
.tzm-pin.lb-down .tzm-lb { bottom: auto; top: 16px; }
.tzm-pin.lb-down .tzm-tm { top: 29px; }

/* 偏移带过滤状态 */
.tzm-pins.is-zoned .tzm-pin:not(.in-zone) { opacity: 0.28; }
.tzm-pins.is-zoned .tzm-pin.in-zone i { background: #d97706; }

/* 太阳直射点 */
.tzm-sunmark {
  position: absolute;
  z-index: 7;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
              rgba(251, 191, 36, 0.5) 0%,
              rgba(251, 191, 36, 0.2) 42%,
              rgba(251, 191, 36, 0) 72%);
}
.tzm-sunmark i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #f59e0b;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.5), 0 1px 4px rgba(146, 64, 14, 0.4);
}

/* ---------- 悬停气泡 (Tooltip) ---------- */
.tzm-tip {
  position: absolute;
  z-index: 25;
  width: 220px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px -4px rgba(15, 23, 42, 0.22), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 0.12s ease;
}
.tzm-tip.show { opacity: 1; visibility: visible; pointer-events: auto; }
.tzm-tip.below { transform: translate(-50%, 14px); }
.tzm-tip::after {
  content: "";
  position: absolute;
  left: var(--ax, 50%);
  bottom: -5px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: #ffffff;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  transform: rotate(45deg);
}
.tzm-tip.below::after {
  top: -5px;
  bottom: auto;
  border: 0;
  border-left: 1px solid #cbd5e1;
  border-top: 1px solid #cbd5e1;
}
.tzm-tip-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tzm-tip-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.tzm-tip-phase {
  flex: none;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  line-height: 14px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.tzm-tip-phase.is-daylight { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.tzm-tip-phase.is-twilight { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.tzm-tip-phase.is-night { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.tzm-tip-country { font-size: 11px; color: #64748b; margin-top: 1px; }
.tzm-tip-time {
  margin-top: 5px;
  font-size: 23px;
  line-height: 1.05;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
  white-space: nowrap;
  font-weight: 700;
}
.tzm-tip-sec { font-size: 13px; color: #94a3b8; font-weight: 500; }
.tzm-tip-abbr {
  font-size: 10px;
  color: #64748b;
  margin-left: 5px;
  vertical-align: 3px;
  letter-spacing: 0.3px;
  font-weight: 600;
}
.tzm-tip-date { font-size: 11px; color: #475569; margin-top: 2px; }
.tzm-tip-rows {
  margin: 6px 0 0;
  padding: 5px 0 0;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
}
.tzm-tip-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.6;
}
.tzm-tip-rows dt { color: #64748b; margin: 0; }
.tzm-tip-rows dd { margin: 0; color: #1e293b; font-weight: 500; text-align: right; }
.tzm-tip-acts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
}
.tzm-tip-acts a { color: #1a6fb5; font-weight: 500; text-decoration: none; }
.tzm-tip-acts a:hover { text-decoration: underline; }
.tzm-tip-compare {
  margin-left: auto;
  color: #1a6fb5;
  font-weight: 600;
}
.tzm-tip-acts button {
  border: 0;
  background: none;
  padding: 0;
  font: 11px/1 inherit;
  font-family: inherit;
  color: #ea580c;
  cursor: pointer;
}
.tzm-tip-acts button:hover { text-decoration: underline; }

/* ---------- 4. 昼夜模拟控制台 (Time Travel Control Deck) ---------- */
.tzm-timebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.tzm-sim-ctrls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.tzm-play {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  background: #f0f9ff;
  font: 11px/1.3 inherit;
  font-family: inherit;
  font-weight: 600;
  color: #0369a1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tzm-play:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0284c7;
}
.tzm-play.is-playing {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.tzm-now {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font: 11px/1.3 inherit;
  font-family: inherit;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tzm-now:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.tzm-now-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}
.tzm-now.is-off {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
  font-weight: 600;
}
.tzm-now.is-off .tzm-now-dot {
  background: #d97706;
  animation: tzmPulseOrange 1.5s infinite;
}
@keyframes tzmPulseOrange {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}
.tzm-step-group {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}
.tzm-step {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  font: 11px/1.3 inherit;
  font-family: inherit;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}
.tzm-step + .tzm-step { border-left: 1px solid #e2e8f0; }
.tzm-step:hover { background: #f1f5f9; color: #0f172a; }

/* 时间滑块与刻度 */
.tzm-slider-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 150px;
}
.tzm-slider-wrap input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 0;
  accent-color: #1a6fb5;
  cursor: pointer;
  border-radius: 3px;
}
.tzm-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}
.tzm-ticks button {
  border: 0;
  background: none;
  padding: 0;
  font: 9.5px/1.2 inherit;
  font-family: inherit;
  color: #94a3b8;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: color 0.12s ease;
}
.tzm-ticks button:hover {
  color: #1a6fb5;
  text-decoration: underline;
}
.tzm-ticks button.is-center {
  font-weight: 700;
  color: #475569;
}

/* 时间轴读数徽章 */
.tzm-timebar-label {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tzm-scrub-badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.tzm-scrub-badge.is-off {
  background: #fed7aa;
  color: #9a3412;
}
.tzm-scrub-clock {
  font-weight: 600;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace, sans-serif;
}

/* ---------- 5. 底部图例与快捷键 (Foot) ---------- */
.tzm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 16px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}
.tzm-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #64748b;
}
.tzm-legend .lg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tzm-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
}
.tzm-legend .lg-day { background: #eef0da; border: 1px solid #d8dcc0; }
.tzm-legend .lg-night { background: #566d88; }
.tzm-legend .lg-zone { background: none; border-left: 2px solid #e39b34; border-radius: 0; width: 2px; height: 11px; }
.tzm-legend .lg-idl { background: none; width: 12px; height: 11px; border-top: 2px dashed #dc2626; border-radius: 0; }
.tzm-legend .lg-you { background: #ea580c; border-radius: 50%; width: 8px; height: 8px; }

/* 已固定城市列表 */
.tzm-added {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}
.tzm-added-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}
.tzm-added-list {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 0;
}
.tzm-added-list::-webkit-scrollbar { display: none; }
.tzm-added-list button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  font: 11px/1.4 inherit;
  font-family: inherit;
  color: #9a3412;
  cursor: pointer;
  transition: all 0.12s ease;
}
.tzm-added-list button:hover {
  background: #ffedd5;
  border-color: #fdba74;
}
.tzm-added-list button b { font-weight: 600; }
.tzm-added-list button em { font-style: normal; color: #c2410c; font-variant-numeric: tabular-nums; }
.tzm-added-list button span { font-size: 12px; opacity: 0.6; }
.tzm-added-list button:hover span { opacity: 1; }
.tzm-clear {
  flex: none;
  border: 0;
  background: none;
  padding: 0;
  font: 10.5px/1 inherit;
  font-family: inherit;
  color: #94a3b8;
  cursor: pointer;
}
.tzm-clear:hover { color: #dc2626; text-decoration: underline; }

/* 快捷键提示 */
.tzm-kbd-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
}
.tzm-kbd-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tzm-kbd {
  display: inline-block;
  padding: 0 4px;
  font-size: 9.5px;
  line-height: 15px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  color: #475569;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* ---------- 6. 全屏模式 (Fullscreen Mode) ---------- */
.tzm.is-full {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  width: 100vw !important;
  height: 100vh !important;
}
.tzm.is-full .tzm-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.tzm.is-full .tzm-viewport {
  height: 100% !important;
  flex: 1 1 auto;
  min-height: 0;
}
.tzm.is-full .tzm-stage {
  height: 100%;
  aspect-ratio: auto;
}
body.tzm-locked { overflow: hidden !important; }

/* ---------- 7. 城市数据表格联动 (Major Cities Table) ---------- */
.map-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}
.map-table-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.map-table-title-wrap .sec-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
}
.map-table-count {
  font-size: 11.5px;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.map-table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.map-table-search-wrap {
  position: relative;
  width: 260px;
}
.map-table-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.map-table-search-wrap input {
  width: 100%;
  height: 30px;
  padding: 0 12px 0 30px;
  border: 1px solid #cbd5e1;
  border-radius: 15px;
  background: #ffffff;
  font: 12px/1.3 inherit;
  font-family: inherit;
  color: #1e293b;
  outline: none;
  transition: all 0.15s ease;
}
.map-table-search-wrap input:focus {
  border-color: #1a6fb5;
  box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.12);
}
.map-table-hint {
  font-size: 11.5px;
  color: #64748b;
}
.map-table-panel {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.map-table {
  width: 100%;
  border-collapse: collapse;
}
.map-table th.is-sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease;
}
.map-table th.is-sortable:hover {
  color: #1a6fb5;
  background: #f0f7fe;
}
.map-table .sort-icon {
  display: inline-block;
  font-size: 11px;
  margin-left: 3px;
  opacity: 0.4;
}
.map-table th.is-sortable.sorted-asc .sort-icon,
.map-table th.is-sortable.sorted-desc .sort-icon {
  opacity: 1;
  color: #1a6fb5;
}
.map-table tbody tr {
  transition: background-color 0.12s ease;
  cursor: pointer;
}
.map-table tbody tr:hover,
.map-table tbody tr.is-highlighted {
  background: #f0f7fe !important;
}
.city-name-link {
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}
.city-name-link:hover {
  color: #1a6fb5;
  text-decoration: underline;
}
.btn-locate-map {
  border: 0;
  background: none;
  padding: 0 4px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.12s ease, transform 0.12s ease;
  vertical-align: -1px;
}
.btn-locate-map:hover,
.map-table tbody tr:hover .btn-locate-map {
  opacity: 1;
  transform: scale(1.2);
}
.daylight-badge {
  display: inline-block;
  margin-left: 5px;
  font-size: 11px;
  vertical-align: -1px;
}
.offset-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  border: 1px solid #e2e8f0;
}
.link-diff {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #1a6fb5;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  text-decoration: none;
  transition: all 0.12s ease;
}
.link-diff:hover {
  background: #1a6fb5;
  border-color: #1a6fb5;
  color: #ffffff;
  text-decoration: none;
}
.map-table-empty {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

/* 说明文字 (How to read this map) */
.map-howto {
  margin: 22px 0 10px;
  border-bottom: 1px solid #e2e8f0;
}
.map-howto > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1a6fb5;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.map-howto > summary::-webkit-details-marker { display: none; }
.map-howto > summary::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 4px solid currentColor;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}
.map-howto[open] > summary::before { transform: rotate(0deg); }
.map-howto > summary:hover { color: #12507f; }
.map-howto[open] > summary { padding-bottom: 10px; }
.map-howto .prose.map-prose { margin-top: 0; padding-bottom: 8px; }

/* ---------- 8. 响应式布局优化 (Responsive) ---------- */
@media (max-width: 1024px) {
  .tzm-hud-badge { display: none; }
  .tzm-hud-top-left { top: 8px; left: 8px; }
  .tzm-hud-top-right { top: 8px; right: 8px; }
  .tzm-hud-bottom-right { bottom: 8px; right: 8px; }
  .tzm-reg { padding: 2px 7px; font-size: 10.5px; }
  .tzm-tgl { padding: 3px 7px; font-size: 10.5px; }
}

@media (max-width: 768px) {
  .tzm { margin: 10px 0 20px; border-radius: 8px; }
  .tzm-toolbar { padding: 8px 10px; gap: 8px; }
  .tzm-search { order: 3; flex: 1 1 100%; max-width: none; }
  .tzm-tool-right { order: 2; margin-left: auto; }
  .tzm-btn-full .tzm-btn-label { display: none; }
  
  /* 移动端 HUD 调整 */
  .tzm-hud-top-left {
    position: static;
    padding: 6px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
  }
  .tzm-hud-top-left .tzm-hud-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
  }
  .tzm-regions {
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
    padding-bottom: 2px;
  }
  .tzm-regions::-webkit-scrollbar { display: none; }
  
  .tzm-hud-top-right { top: 8px; right: 8px; }
  .tzm-tgl span { display: none; }
  .tzm-tgl { padding: 4px 6px; }

  .tzm-timebar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .tzm-sim-ctrls { order: 1; }
  .tzm-timebar-label { order: 2; margin-left: auto; }
  .tzm-slider-wrap { order: 3; flex: 1 1 100%; }

  .tzm-foot { padding: 8px 10px; }
  .tzm-kbd-help { display: none; }
  .tzm-added { margin-left: 0; flex: 1 1 100%; }
  
  .map-table-search-wrap { width: 100%; }
}

@media (max-width: 480px) {
  .tzm-meta-pill { display: none; }
  .tzm-chip-clock { padding: 3px 6px; font-size: 10px; }
  .tzm-chip-clock b { font-size: 11px; }
  .tzm-chip-tz { display: none; }
  .tzm-lb, .tzm-tm { display: none; }
  .tzm-pin i { width: 6px; height: 6px; }
  .tzm-tip { width: 196px; }
}
