:root {
  --bg: #0b1026;
  --panel: rgba(14, 20, 48, 0.92);
  --text: #f4f1ea;
  --muted: #a9b0cf;
  --red: #e2433b;
  --gold: #f5c451;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
#map { position: fixed; inset: 0; background: var(--bg); }
.leaflet-container { background: var(--bg); }
/* 把白天地圖轉成夜空色調 */
.leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(0.75) saturate(0.5); }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 500; pointer-events: none;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 24px;
  background: linear-gradient(var(--bg), rgba(11,16,38,0)); }
.top h1 { margin: 0; font-size: 22px; letter-spacing: 1px; }
.status { margin: 4px 0 0; color: var(--gold); font-size: 15px; min-height: 1.4em; }

.panel { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px);
  z-index: 500; max-width: 520px; margin: 0 auto; background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 14px 14px 12px;
  backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.label { font-size: 12px; color: var(--muted); }
.value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.eta { text-align: center; margin: 10px 0 8px; font-size: 14px; color: var(--text); min-height: 1.2em; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn { border: 0; border-radius: 999px; padding: 10px 16px; font-size: 15px; font-weight: 600;
  background: var(--red); color: #fff; cursor: pointer; font-family: inherit; }
.btn.ghost { background: rgba(255,255,255,0.1); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.note { text-align: center; color: var(--muted); font-size: 11px; margin: 8px 0 0; }
.teaser { display: block; text-decoration: none; margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.6;
  background: rgba(120, 90, 200, 0.18); border: 1px dashed rgba(180,160,255,0.35); color: #ddd6ff; }

.santa-icon { font-size: 34px; line-height: 1; filter: drop-shadow(0 0 8px rgba(245,196,81,0.9)); }
.me-icon { width: 16px; height: 16px; border-radius: 50%; background: #4aa3ff; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(74,163,255,0.3); }
.city-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: 0.9; }

.demo { position: fixed; top: calc(env(safe-area-inset-top) + 76px); left: 12px; right: 12px; z-index: 600;
  max-width: 520px; margin: 0 auto; display: flex; gap: 8px; align-items: center;
  background: rgba(0,0,0,0.6); padding: 6px 10px; border-radius: 12px; font-size: 12px; }
.demo input { flex: 1; }

@media (max-height: 640px) { .teaser { display: none; } }
.demo[hidden] { display: none; }
