/* =========================================================
 * PIXEL CITY — style.css
 * 现代像素风 UI：Sweetie-16 调色板 · 阶梯像素边框 · 按压式按钮
 * ========================================================= */
:root {
  --ink: #1a1c2c;
  --ink2: #12131f;
  --ink3: #0b0c14;
  --plum: #5d275d;
  --red: #b13e53;
  --orange: #ef7d57;
  --yellow: #ffcd75;
  --lime: #a7f070;
  --green: #38b764;
  --teal: #257179;
  --navy: #29366f;
  --blue: #3b5dc9;
  --sky: #41a6f6;
  --cyan: #73eff7;
  --white: #f4f4f4;
  --silver: #94b0c2;
  --slate: #566c86;
  --gun: #333c57;
  --panel: #1f2238;
  --panel2: #272b47;
  --accent: var(--yellow);
  --b: 3px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --top: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--ink2); }
body {
  font-family: var(--font);
  color: var(--white);
  background-color: var(--ink2);
  background-image: var(--dots, none);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  cursor: var(--cur-arrow, auto);
  overflow-x: hidden;
  min-height: 100vh;
}
a, button, [role="button"], .pin, input[type="range"] { cursor: var(--cur-hand, pointer); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
img.pxi, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
img.pxi { display: inline-block; vertical-align: middle; flex: none; }
::selection { background: var(--plum); color: var(--yellow); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- px-text ---------- */
px-text { display: inline-block; line-height: 0; vertical-align: middle; }
px-text canvas {
  width: calc(var(--w) * var(--s, 2) * 1px);
  height: calc(var(--h) * var(--s, 2) * 1px);
  display: block;
}

/* ---------- 像素边框 ---------- */
.px-box {
  position: relative;
  background: var(--panel);
  box-shadow:
    0 calc(-1 * var(--b)) 0 0 var(--ink3),
    0 var(--b) 0 0 var(--ink3),
    calc(-1 * var(--b)) 0 0 0 var(--ink3),
    var(--b) 0 0 0 var(--ink3),
    inset 0 var(--b) 0 0 rgba(255, 255, 255, 0.07),
    inset 0 calc(-1 * var(--b)) 0 0 rgba(0, 0, 0, 0.28);
}

/* ---------- 按钮 ---------- */
.pbtn {
  --bg: var(--panel2);
  --fg: var(--white);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  user-select: none;
  box-shadow:
    0 -3px 0 0 var(--ink3),
    0 3px 0 0 var(--ink3),
    -3px 0 0 0 var(--ink3),
    3px 0 0 0 var(--ink3),
    inset 0 3px 0 0 rgba(255, 255, 255, 0.16),
    inset 0 -4px 0 0 rgba(0, 0, 0, 0.32);
  transition: transform 0.06s steps(1), filter 0.1s;
}
.pbtn:hover { filter: brightness(1.18); }
.pbtn:active, .pbtn.pressed {
  transform: translateY(2px);
  box-shadow:
    0 -3px 0 0 var(--ink3),
    0 3px 0 0 var(--ink3),
    -3px 0 0 0 var(--ink3),
    3px 0 0 0 var(--ink3),
    inset 0 4px 0 0 rgba(0, 0, 0, 0.3),
    inset 0 -2px 0 0 rgba(255, 255, 255, 0.06);
}
.pbtn.on { --bg: var(--accent); --fg: var(--ink); }
.pbtn.on .pxi { filter: brightness(0.2); }
.pbtn.icon { width: 40px; min-height: 40px; padding: 0; }
.pbtn.big { min-height: 52px; padding: 10px 26px; font-size: 17px; }
.pbtn.primary { --bg: var(--accent); --fg: var(--ink); }
.pbtn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px dashed var(--yellow);
  outline-offset: 5px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--top);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: linear-gradient(to bottom, rgba(11, 12, 20, 0.92), rgba(11, 12, 20, 0.72));
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--ink3);
}
.topbar .logo { display: flex; align-items: center; gap: 10px; flex: none; }
.topbar .logo > canvas { width: 30px; height: 30px; }
.citynav { display: flex; gap: 4px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.citynav::-webkit-scrollbar { display: none; }
.citynav a {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--silver);
  font-size: 14px;
  position: relative;
  white-space: nowrap;
}
.citynav a .dot { width: 6px; height: 6px; background: var(--c, var(--yellow)); flex: none; }
.citynav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.05); }
.citynav a.active { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.citynav a.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -2px;
  height: 3px;
  background: var(--c, var(--yellow));
}
.topbar .spacer { flex: 1; }
.topbar .clock-utc { font-family: var(--mono); color: var(--slate); font-size: 12px; }

/* ---------- 主视图 ---------- */
#view { min-height: 100vh; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--top) + 28px) 24px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  max-width: 1320px;
  margin: 0 auto;
}
.hero-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.hero-title px-text { --s: 9 !important; }
.hero-sub { margin: 14px 0 0; color: var(--silver); font-size: 17px; }
.hero-sub b { color: var(--yellow); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.map-wrap { padding: 10px; }
.map-inner { position: relative; }
.map-inner canvas { width: 100%; display: block; }
.map-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 6px 2px;
  font-size: 13px;
  color: var(--silver);
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 10px; height: 10px; display: inline-block; }
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  z-index: 2;
}
.pin .core {
  width: 10px;
  height: 10px;
  background: var(--c);
  box-shadow: 0 0 0 3px var(--ink3);
  animation: pinpulse 1.2s steps(2) infinite;
}
.pin::before {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--c);
  opacity: 0;
  animation: pinring 2s steps(6) infinite;
}
.pin .lbl {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--ink3);
  border-left: 3px solid var(--c);
  font-size: 12px;
  white-space: nowrap;
  color: var(--white);
  pointer-events: none;
}
.pin.left .lbl { left: auto; right: 20px; border-left: 0; border-right: 3px solid var(--c); }
.pin .lbl em { font-style: normal; color: var(--silver); font-family: var(--mono); }
.pin:hover .core, .pin:focus-visible .core { transform: scale(1.4); }
.pin:hover { z-index: 5; }
@keyframes pinpulse { 50% { filter: brightness(1.5); } }
@keyframes pinring { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- 章节标题 ---------- */
.section { max-width: 1320px; margin: 0 auto; padding: 26px 24px; }
.sec-title { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; flex-wrap: wrap; }
.sec-title .zh { color: var(--silver); font-size: 15px; font-weight: 500; }
.sec-title::after { content: ""; flex: 1; min-width: 40px; height: 3px; background: repeating-linear-gradient(90deg, var(--gun) 0 6px, transparent 6px 12px); }

/* ---------- 城市卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px 26px; }
.grid .card { grid-column: span 2; }
.grid .card:nth-child(-n + 2) { grid-column: span 3; }
.card {
  --c: var(--yellow);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  box-shadow:
    0 -3px 0 0 var(--ink3), 0 3px 0 0 var(--ink3), -3px 0 0 0 var(--ink3), 3px 0 0 0 var(--ink3),
    8px 8px 0 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.12s steps(3), box-shadow 0.12s steps(3);
}
.card:hover, .card:focus-visible {
  transform: translate(-3px, -5px);
  box-shadow:
    0 -3px 0 0 var(--c), 0 3px 0 0 var(--c), -3px 0 0 0 var(--c), 3px 0 0 0 var(--c),
    12px 14px 0 0 rgba(0, 0, 0, 0.4);
  outline: none;
}
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--ink3); overflow: hidden; }
.thumb canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
.thumb .loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--slate);
  font-family: var(--mono);
  font-size: 12px;
}
.thumb-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 6px;
  background: rgba(11, 12, 20, 0.82);
  font-size: 12px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-name .zh { font-size: 18px; font-weight: 700; }
.card-name .ct { color: var(--silver); font-size: 13px; }
.card-tag { color: var(--silver); font-size: 13px; margin: 0; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 3px dotted var(--gun); }
.card-foot .go { color: var(--c); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.card-foot .lm { color: var(--slate); font-size: 12px; }

/* ---------- 特性 ---------- */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feat { padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.feat .ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink3); }
.feat h3 { margin: 0 0 4px; font-size: 15px; }
.feat p { margin: 0; color: var(--silver); font-size: 13px; line-height: 1.6; }

.footer { text-align: center; color: var(--slate); font-size: 13px; padding: 30px 20px 50px; }
.footer .bar { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.footer .bar i { width: 12px; height: 12px; display: block; }

/* =========================================================
 * 城市页
 * ========================================================= */
.city-view { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.stage { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.stage canvas.scene { width: 100%; height: 100%; display: block; object-fit: cover; cursor: var(--cur-grab-open, var(--cur-arrow, grab)); }
.stage.dragging canvas.scene { cursor: var(--cur-grab, grabbing); }
.stage.hovering canvas.scene { cursor: var(--cur-hand, pointer); }

.hud { position: absolute; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-tl { left: 18px; top: calc(var(--top) + 14px); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hud-title { padding: 12px 16px 12px; background: rgba(11, 12, 20, 0.72); backdrop-filter: blur(4px); border-left: 4px solid var(--accent); }
.hud-title .zh { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; font-size: 15px; }
.hud-title .zh b { font-size: 18px; }
.hud-title .zh span { color: var(--silver); font-size: 13px; }
.hud-tr { right: 18px; top: calc(var(--top) + 14px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud-tr { transition: right 0.25s steps(6); }
.city-view:has(.panel.open) .hud-tr { right: 396px; }
.city-view:has(.panel.open) .edge-nav.next { right: 378px; }
.clockbox { padding: 12px 16px; background: rgba(11, 12, 20, 0.72); backdrop-filter: blur(4px); text-align: right; min-width: 190px; }
.clockbox .row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.clockbox .date { color: var(--silver); font-size: 13px; margin-top: 8px; }
.clockbox .phase { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 13px; margin-top: 2px; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--red);
  color: #fff;
}
.live-badge.off { background: var(--gun); color: var(--silver); }
.live-badge .blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.edge-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(11, 12, 20, 0.55);
  color: var(--silver);
  font-size: 13px;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.edge-nav:hover { opacity: 1; color: var(--white); background: rgba(11, 12, 20, 0.8); }
.edge-nav.prev { left: 0; }
.edge-nav.next { right: 0; }

.tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  padding: 6px 10px;
  background: var(--ink3);
  border: 3px solid var(--accent);
  font-size: 13px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 16px));
}
.tooltip small { display: block; color: var(--silver); font-size: 11px; }
.tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: translateX(-50%);
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 9;
  padding: 7px 14px;
  background: rgba(11, 12, 20, 0.7);
  font-size: 13px;
  color: var(--silver);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  animation: hintfade 7s steps(14) forwards;
  pointer-events: none;
}
@keyframes hintfade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* 控制坞 */
.dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  background: rgba(22, 24, 40, 0.9);
  backdrop-filter: blur(6px);
  max-width: calc(100vw - 24px);
}
.dock .grp { display: flex; align-items: center; gap: 8px; }
.dock .sep { width: 3px; align-self: stretch; background: repeating-linear-gradient(var(--gun) 0 3px, transparent 3px 6px); }
.dock .lbl { font-size: 12px; color: var(--silver); white-space: nowrap; }
.time-slider { position: relative; width: 230px; height: 40px; display: flex; align-items: center; }
.time-slider .track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 12px;
  transform: translateY(-50%);
  background: var(--track, linear-gradient(90deg, #0b1233, #46376e 22%, #f58450 27%, #a8d6f2 38%, #a8d6f2 68%, #f58450 76%, #46376e 81%, #0b1233));
  box-shadow: 0 -3px 0 0 var(--ink3), 0 3px 0 0 var(--ink3), -3px 0 0 0 var(--ink3), 3px 0 0 0 var(--ink3);
}
.time-slider .ticks { position: absolute; left: 0; right: 0; top: calc(50% + 10px); display: flex; justify-content: space-between; font-size: 10px; color: var(--slate); font-family: var(--mono); pointer-events: none; }
.time-slider input { position: relative; width: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; height: 40px; }
.time-slider input::-webkit-slider-runnable-track { height: 40px; background: transparent; }
.time-slider input::-moz-range-track { height: 40px; background: transparent; }
.time-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 27px;
  height: 27px;
  margin-top: 6px;
  background: var(--thumb) center / 27px 27px no-repeat, var(--ink3);
  image-rendering: pixelated;
  box-shadow: 0 0 0 3px var(--ink3);
  cursor: var(--cur-hand, pointer);
}
.time-slider input::-moz-range-thumb {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 0;
  background: var(--thumb) center / 27px 27px no-repeat, var(--ink3);
  image-rendering: pixelated;
  box-shadow: 0 0 0 3px var(--ink3);
}
.wx-btn { width: 40px; }

/* 信息面板 */
.panel {
  position: absolute;
  z-index: 15;
  right: 18px;
  top: calc(var(--top) + 14px);
  bottom: 96px;
  width: 360px;
  max-width: calc(100vw - 36px);
  display: flex;
  flex-direction: column;
  background: rgba(22, 24, 40, 0.94);
  backdrop-filter: blur(6px);
  transform: translateX(calc(100% + 40px));
  transition: transform 0.25s steps(6);
}
.panel.open { transform: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 3px solid var(--ink3); gap: 10px; }
.panel-body { overflow-y: auto; padding: 14px 16px 18px; scrollbar-width: thin; scrollbar-color: var(--gun) transparent; }
.panel-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--gun); }
.panel .intro { color: #d8dce8; font-size: 14px; margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.fact { background: var(--ink3); padding: 8px 10px; }
.fact dt { font-size: 11px; color: var(--slate); }
.fact dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.lm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lm-list button {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel2);
  font-size: 14px;
}
.lm-list button:hover { background: var(--gun); }
.lm-list button .en { margin-left: auto; font-size: 10px; color: var(--slate); font-family: var(--mono); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subhead { font-size: 12px; color: var(--silver); letter-spacing: 0.1em; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }

/* 地标卡片 */
.lm-card {
  position: absolute;
  z-index: 30;
  left: 24px;
  bottom: 104px;
  width: min(440px, calc(100vw - 32px));
  padding: 20px 22px 20px;
  background: var(--panel);
  animation: pop 0.22s steps(4);
}
.lm-card[hidden] { display: none; }
.lm-card .close { position: absolute; right: 12px; top: 12px; }
.lm-card h3 { margin: 12px 0 8px; font-size: 20px; }
.lm-card p { margin: 0 0 12px; color: #d8dce8; font-size: 14px; }
.lm-card .didyou { background: var(--ink3); padding: 10px 12px; font-size: 13px; color: var(--yellow); display: flex; gap: 10px; align-items: flex-start; }
.lm-card .didyou img { margin-top: 2px; }
.lm-card .acts { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
@keyframes pop { 0% { transform: translateY(16px); opacity: 0; } 100% { transform: none; opacity: 1; } }

.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--top) + 18px);
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink3);
  border-left: 4px solid var(--lime);
  font-size: 14px;
  animation: pop2 2.4s steps(8) forwards;
}
@keyframes pop2 { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* 转场 */
#wipe { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 100; pointer-events: none; image-rendering: pixelated; }

/* 启动画面 */
.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: var(--ink2);
  transition: opacity 0.3s steps(4);
}
.boot.done { opacity: 0; pointer-events: none; }
.boot .inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.boot .bar { width: 220px; height: 14px; background: var(--ink3); box-shadow: 0 0 0 3px var(--gun); position: relative; }
.boot .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: repeating-linear-gradient(90deg, var(--lime) 0 8px, var(--green) 8px 12px); transition: width 0.1s steps(2); }
.boot .msg { font-family: var(--mono); font-size: 12px; color: var(--slate); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .topbar .clock-utc { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid .card, .grid .card:nth-child(-n + 2) { grid-column: span 1; }
  .grid .card:last-child { grid-column: span 2; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .time-slider { width: 170px; }
}
@media (max-width: 860px) {
  :root { --top: 52px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar .logo px-text { display: none; }
  .citynav a { padding: 6px 8px; font-size: 13px; }
  .hero-title px-text { --s: 6 !important; }
  .city-view { height: auto; min-height: 100svh; overflow: visible; background: var(--ink2); }
  .stage { position: relative; height: 64svh; margin-top: var(--top); }
  .hud-tl { top: 10px; left: 10px; }
  .hud-tr { top: 10px; right: 10px; }
  .hud-title { padding: 8px 10px; }
  .hud-title px-text { --s: 2 !important; }
  .clockbox { padding: 8px 10px; min-width: 0; }
  .clockbox px-text { --s: 3 !important; }
  .clockbox .date { display: none; }
  .edge-nav span { display: none; }
  .edge-nav { padding: 8px 6px; }
  .hint { bottom: 12px; font-size: 12px; }
  .dock {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin: 16px 12px 0;
    max-width: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .dock .sep { display: none; }
  .time-slider { width: min(260px, 60vw); }
  .panel {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    margin: 16px 12px 30px;
    transform: none;
    display: flex;
  }
  .panel-body { overflow: visible; }
  .panel .close-panel { display: none; }
  .city-view:has(.panel.open) .hud-tr { right: 10px; }
  .city-view:has(.panel.open) .edge-nav.next { right: 0; }
  .lm-card { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); max-height: 70vh; overflow-y: auto; animation: none; }
}
@media (max-width: 520px) {
  .hero { padding-left: 14px; padding-right: 14px; }
  .section { padding-left: 14px; padding-right: 14px; }
  .hero-title px-text { --s: 4 !important; }
  .pin .lbl { display: none; }
  .grid { grid-template-columns: 1fr; }
  .grid .card, .grid .card:nth-child(-n + 2), .grid .card:last-child { grid-column: span 1; }
  .feats { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hud-title .zh span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ---------- v2：主导航 + 城市菜单 ---------- */
.mainnav { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.mainnav a, .navbtn {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; color: var(--silver); font-size: 14px; position: relative; white-space: nowrap;
}
.mainnav a:hover, .navbtn:hover { color: var(--white); background: rgba(255, 255, 255, 0.05); }
.mainnav a.active, .navbtn.active, .navbtn.open { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.mainnav a.active::after, .navbtn.active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 3px; background: var(--c, var(--yellow));
}
.navbtn .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 2px; }
.navbtn.open .caret { transform: rotate(180deg); }
.citymenu {
  position: absolute; top: calc(var(--top) + 8px); left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100vw - 20px)); padding: 14px; z-index: 50; background: rgba(22, 24, 40, 0.97);
  animation: pop3 0.16s steps(3);
}
.citymenu[hidden] { display: none; }
@keyframes pop3 { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--slate); font-size: 12px; }
.cm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cm-grid a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel2); font-size: 14px; }
.cm-grid a:hover { background: var(--gun); }
.cm-grid a.cur { box-shadow: inset 3px 0 0 0 var(--c); background: var(--gun); }
.cm-grid b { white-space: nowrap; }
.cm-grid .dot { width: 8px; height: 8px; background: var(--c); flex: none; }
.cm-grid .en { font-family: var(--mono); font-size: 10px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-grid em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--silver); }
.cm-grid kbd { font-family: var(--mono); font-size: 10px; color: var(--slate); background: var(--ink3); padding: 0 5px; }

/* ---------- v2：地图首页 ---------- */
.maphome { min-height: 100vh; min-height: 100svh; padding: calc(var(--top) + 18px) 24px 18px; display: flex; flex-direction: column; gap: 14px; max-width: 1680px; margin: 0 auto; }
.mh-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mh-title p { margin: 10px 0 0; color: var(--silver); font-size: 15px; }
.mh-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.mh-map { padding: 8px; }
.mh-scroll { overflow: hidden; scrollbar-width: thin; scrollbar-color: var(--gun) transparent; }
.mh-map .map-inner { width: min(100%, calc((100svh - var(--top) - 200px) * 2.6087)); min-width: 600px; margin: 0 auto; }
.mh-swipe { display: none !important; }
.pin.bottom .lbl { left: 50%; top: 22px; transform: translateX(-50%); border-left: 0; border-top: 3px solid var(--c); }
.pin.top .lbl { left: 50%; top: auto; bottom: 22px; transform: translateX(-50%); border-left: 0; border-bottom: 3px solid var(--c); }

/* ---------- v2：关于页 ---------- */
.about-hero { padding-bottom: 8px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important; }
.grid .card, .grid .card:nth-child(-n + 2), .grid .card:last-child { grid-column: auto !important; }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.key { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: 14px; color: var(--silver); }
.key kbd { font-family: var(--mono); font-size: 13px; color: var(--ink); background: var(--yellow); padding: 3px 8px; font-weight: 700; box-shadow: 0 3px 0 0 #b8904a; }

/* ---------- v2：地标卡片右侧放置 ---------- */
.lm-card.right { left: auto; }

@media (max-width: 860px) {
  .mainnav a span { display: none; }
  .mainnav a, .navbtn { padding: 6px 9px; }
  .mh-scroll { overflow-x: auto; }
  .mh-map .map-inner { width: calc(56svh * 2.6087); max-width: none; }
  .mh-swipe { display: inline-flex !important; }
  .maphome { padding-left: 12px; padding-right: 12px; }
  .mh-title px-text { --s: 4 !important; }
}
@media (max-width: 520px) {
  .cm-grid { grid-template-columns: 1fr; }
  .pin .lbl { display: flex !important; }
  .mh-actions .pbtn.big { min-height: 44px; padding: 8px 16px; font-size: 15px; }
}
