/* ============================================================================
   integration.css — 整合层补丁（n14）
   ----------------------------------------------------------------------------
   页面壳（index.html / main.css）归 n13，四模块归 n10-n12。这里只放**接线需要的**
   三样东西，避免改动别人的设计系统：
     1. A14 首屏加载 overlay（poster + 扫描经线 + 纹理进度）
     2. A09 长按地球时的按压态（cursor / 轻提示）
     3. A13 列表高亮：n13 的静态行是 li[data-city]，不是 clocklist 自己的 .wc-cl__row，
        所以 hydrate 后需要用页面级选择器补一条同样的视觉反馈
   ========================================================================== */

/* ── 1. A14 首屏加载 ─────────────────────────────────────────────────────── */
.stage__poster {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  background: #000;
  opacity: 1;
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stage__poster[data-poster-state="done"] {
  opacity: 0;
  pointer-events: none;
}

.stage__poster[hidden] { display: none; }

.stage__poster__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.92;
}

/* 扫描经线：0.8° 宽 ≈ 2 px（1100 ms 走完全程；纹理先到则由 main 提前淡出） */
.stage__poster__scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12%;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, #ff8a4c 18%, #ffe2c4 50%, #ff8a4c 82%, transparent 100%);
  box-shadow: 0 0 18px 6px rgba(255, 138, 76, 0.32);
  animation: wc-poster-scan 1100ms cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

@keyframes wc-poster-scan {
  to { left: 112%; }
}

.stage__poster__meter {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(4, 7, 14, 0.62);
  border: 1px solid rgba(233, 240, 250, 0.08);
  color: #9fb0c6;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
}

.stage__poster__label { white-space: nowrap; }

.stage__poster__track {
  flex: 1;
  min-width: 40px;
  height: 3px;
  border-radius: 2px;
  background: #1d2735;
  overflow: hidden;
}

.stage__poster__bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff8a4c, #ffd7a8);
  transition: width 200ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .stage__poster__scan { display: none; }
  .stage__poster { transition-duration: 300ms; }
}

/* ── 2. A09 长按地球 = 时间快进 ─────────────────────────────────────────── */
.stage__canvas.globe--holding canvas {
  cursor: grabbing;
}

.stage__canvas.globe--holding::after {
  content: "▶ running time";
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(43, 29, 18, 0.86);
  border: 1px solid #4a3122;
  color: #ffb27a;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ── 3. A13 地球 hover → 静态列表行高亮（hydrate 后的 li[data-city]） ───── */
#city-list > li[data-city] {
  position: relative;
  transition: background-color 120ms ease-out;
}

#city-list > li[data-city][data-highlight="true"] {
  background: #0a121f;
}

#city-list > li[data-city][data-highlight="true"]::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: #ff8a4c;
}

@media (prefers-reduced-motion: reduce) {
  #city-list > li[data-city] { transition: none; }
}

/* ── 4. DST 徽标的 [hidden] 必须真的隐藏 ──────────────────────────────────
   clocklist 的 `.wc-cl__badge{display:inline-block}` 会盖掉 UA 的 `[hidden]{display:none}`，
   结果 12 个城市全挂 DST 徽标（东京/新加坡也带）。这条是整合时实测出来的：
   badge.hidden=true 但 getComputedStyle(badge).display==='block'。 */
.wc-cl__badge[hidden] { display: none !important; }
