/* Small Seoul (서울 소경) — Original Campdal.studio Hanji & Ink Design System */
:root {
  /* Default: Warm Translucent Korean Hanji Paper Glass */
  --surface: rgba(252, 248, 240, 0.88);
  --surface-strong: rgba(254, 251, 246, 0.96);
  --surface-hover: rgba(238, 231, 217, 0.94);
  --border: rgba(74, 58, 40, 0.16);
  --text: #221d17;
  --text-sub: #675d51;
  --vermilion: #c84b31;
  --celadon: #2a7b6f;
  --accent-soft: rgba(200, 75, 49, 0.13);
  --shadow: 0 12px 34px rgba(38, 28, 16, 0.16), 0 2px 8px rgba(38, 28, 16, 0.08);
  --dock-shadow: 0 14px 40px rgba(24, 18, 10, 0.22), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

body.theme-ink {
  /* Night / Obsidian Ink Glass */
  --surface: rgba(18, 22, 31, 0.84);
  --surface-strong: rgba(23, 28, 39, 0.94);
  --surface-hover: rgba(38, 45, 61, 0.92);
  --border: rgba(255, 255, 255, 0.14);
  --text: #f4f1ea;
  --text-sub: #a8b0be;
  --vermilion: #e67258;
  --celadon: #4ec4b2;
  --accent-soft: rgba(230, 114, 88, 0.20);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  --dock-shadow: 0 16px 44px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.09) inset;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b111c;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Stage & Map Layers */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #101926;
  transition: filter 1.6s cubic-bezier(0.22, 1, 0.36, 1), transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

body.intro-active #stage {
  filter: blur(12px) saturate(1.08);
}

#osd-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#osd-map.has-tint .openseadragon-canvas canvas {
  filter: url(#seoul-tint);
}

/* Hide legacy navigator box on mobile; keep ultra-clean rounded minimap tucked cleanly on desktop */
#osd-map .navigator canvas { filter: none !important; }
#osd-map .navigator {
  border-radius: 14px !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
  margin-bottom: 30px !important;
  margin-right: 18px !important;
  background: #1a2634 !important;
  opacity: 0.92;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#osd-map .navigator:hover { opacity: 1; }

.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#layer-lights { z-index: 2; mix-blend-mode: screen; }
#layer-bldg { z-index: 3; }
#layer-transit { z-index: 4; }
#layer-weather { z-index: 5; }
#layer-depth-debug { z-index: 6; }

/* Zero-cost Atmospheric Edge Vignette (no fullscreen backdrop-filter GPU blur!) */
#lens-peripheral-blur {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(ellipse 74% 70% at 50% 50%,
    rgba(24, 30, 42, 0) 64%,
    rgba(16, 22, 34, 0.22) 100%);
}

/* =====================================================================
   CINEMATIC EARTH -> CLOUDS -> SEOUL ORBITAL DIVE OPENING SEQUENCE
   ===================================================================== */
#orbital-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #060b16;
  overflow: hidden;
  opacity: 1;
  transition: opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1), visibility 1.15s ease;
}

#orbital-intro.is-fading {
  opacity: 0;
  pointer-events: none;
}

#orbital-intro.is-done {
  display: none;
}

.intro-layer {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center center;
  will-change: transform, opacity, filter;
  transform-origin: 50% 50%;
}

#intro-earth {
  background-image: url('./intro/earth_korea.jpg');
  transform-origin: 51% 50.5%;
  opacity: 1;
  transform: scale(1.0);
  filter: brightness(1.02) blur(0px);
}

#intro-seoul {
  background-image: url('./intro/seoul_aerial.jpg');
  transform-origin: 50% 53%;
  opacity: 0;
  transform: scale(0.95);
  filter: blur(8px);
}

/* Phase 1: Earth orbital zoom toward Korean Peninsula */
#orbital-intro.phase-earth #intro-earth {
  animation: earthDive 2.45s cubic-bezier(0.32, 0.02, 0.68, 0.98) forwards;
}

/* Phase 2: Break through cloud layer over Seoul */
#orbital-intro.phase-seoul #intro-seoul {
  animation: seoulDive 2.45s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes earthDive {
  0%   { transform: scale(1.0); opacity: 1; filter: blur(0px) brightness(1.0); }
  55%  { transform: scale(2.15); opacity: 1; filter: blur(1.5px) brightness(1.06); }
  100% { transform: scale(3.85); opacity: 0; filter: blur(10px) brightness(1.2); }
}

@keyframes seoulDive {
  0%   { transform: scale(0.95); opacity: 0; filter: blur(10px) brightness(1.12); }
  25%  { transform: scale(1.22); opacity: 1; filter: blur(2px) brightness(1.04); }
  72%  { transform: scale(2.35); opacity: 1; filter: blur(1px) brightness(1.02); }
  100% { transform: scale(3.65); opacity: 0; filter: blur(9px) brightness(1.08); }
}

/* Strong radial peripheral bokeh blur + atmospheric cloud vignette during dive */
.intro-radial-blur {
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: radial-gradient(circle at 50% 50%, transparent 24%, rgba(0, 0, 0, 0.65) 56%, black 88%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 24%, rgba(0, 0, 0, 0.65) 56%, black 88%);
  background: radial-gradient(circle at 50% 50%, transparent 28%, rgba(8, 16, 30, 0.45) 85%, rgba(6, 11, 22, 0.85) 100%);
}

.intro-clouds {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 32% at 15% 22%, rgba(255, 252, 245, 0.42), transparent 70%),
    radial-gradient(ellipse 46% 36% at 86% 24%, rgba(255, 252, 245, 0.38), transparent 72%),
    radial-gradient(ellipse 52% 34% at 22% 84%, rgba(246, 250, 255, 0.36), transparent 72%),
    radial-gradient(ellipse 48% 36% at 82% 80%, rgba(255, 252, 245, 0.40), transparent 70%);
  filter: blur(22px);
  opacity: 0;
  transform: scale(0.85);
}

#orbital-intro.phase-seoul .intro-clouds {
  animation: cloudsPart 2.2s ease-out forwards;
}

@keyframes cloudsPart {
  0%   { opacity: 0; transform: scale(0.82); }
  35%  { opacity: 0.95; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(2.1); }
}

.intro-hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  color: #f8f5ee;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
  opacity: 0;
}

#orbital-intro.phase-earth .intro-hud {
  animation: introHudFade 3.45s ease forwards;
}

@keyframes introHudFade {
  0%   { opacity: 0; transform: scale(0.96); }
  18%  { opacity: 1; transform: scale(1); }
  78%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 0; transform: scale(1.1); }
}

.intro-reticle {
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reticle-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 242, 214, 0.68);
  animation: reticlePulse 1.8s ease-in-out infinite;
}

.reticle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e67258;
  box-shadow: 0 0 14px rgba(230, 114, 88, 0.95);
}

@keyframes reticlePulse {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.14); opacity: 1; }
}

.intro-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 2.2px;
  color: rgba(255, 241, 212, 0.85);
  margin-bottom: 8px;
}

.intro-title {
  margin: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 8px;
  padding-left: 8px;
}

.intro-studio {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 2.4px;
  color: rgba(240, 236, 226, 0.85);
}

.intro-studio strong {
  color: #f3c47c;
  font-weight: 700;
}

.intro-skip {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 105;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(14, 20, 32, 0.58);
  backdrop-filter: blur(10px);
  color: #f8f5ee;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.intro-skip:hover {
  background: rgba(200, 75, 49, 0.82);
  transform: translateY(-1px);
}

/* =====================================================================
   ORIGINAL CAMPDAL.STUDIO FLOATING UI COMPONENTS
   ===================================================================== */

/* Hide HUD gracefully during orbital dive, reveal smoothly once arrived */
.studio-crest, .utility-pill, .floating-dock, .studio-footer {
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
body.intro-active .studio-crest,
body.intro-active .utility-pill,
body.intro-active .floating-dock,
body.intro-active .studio-footer {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
body.intro-active .floating-dock {
  transform: translate(-50%, 16px);
}

/* 1. Top-Left Minimal Studio Crest */
.studio-crest {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 20;
  padding: 11px 15px;
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 215px;
}

.crest-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

/* Official Campdal.studio Brand Emblem */
.campdal-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(17, 19, 24, 0.28);
}

.crest-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.crest-ko {
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.crest-sub {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.crest-sub strong {
  color: var(--vermilion);
  font-weight: 700;
  letter-spacing: 0.2px;
}

.crest-live-row {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--celadon);
  box-shadow: 0 0 8px var(--celadon);
}

.crest-sep { color: var(--text-sub); }

.crest-metrics {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.crest-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.crest-metrics i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.crest-metrics b {
  color: var(--text);
  font-weight: 600;
}

.crest-api-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--celadon);
  font-variant-numeric: tabular-nums;
}
.crest-api-row[hidden] { display: none; }

.api-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 7px rgba(16, 185, 129, 0.85);
  flex-shrink: 0;
}

/* 2. Top-Right Horizontal Utility Pill */
.utility-pill {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.util-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.14s ease;
}

.util-btn:hover {
  background: var(--surface-hover);
  transform: scale(1.06);
}

.util-lang {
  width: auto;
  min-width: 34px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--vermilion);
}

.crest-metrics em {
  font-style: normal;
}

.util-div {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 3px;
}

/* 3. Bottom-Center Floating Glass Capsule Dock */
.floating-dock {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--dock-shadow);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.floating-dock::-webkit-scrollbar { display: none; }

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dock-btn:hover { background: var(--surface-hover); }

.dock-btn.active {
  background: var(--vermilion);
  color: #fff9f2;
}

.dock-btn.is-3d {
  background: var(--celadon);
  color: #fff;
}

.dock-div {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}

.dock-segment {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(128, 120, 108, 0.13);
  gap: 2px;
}

.seg-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.seg-btn:hover { color: var(--text); }

.seg-btn.active {
  background: var(--surface-strong);
  color: var(--vermilion);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* 4. Right Slide-Over Landmark Drawer */
.places-drawer {
  position: fixed;
  top: 72px;
  right: 18px;
  bottom: 92px;
  z-index: 26;
  width: 332px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.places-drawer[hidden] { display: none; }

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
  color: var(--vermilion);
}

.drawer-head h2 {
  margin: 3px 0 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
}

.zone-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.zone-tabs::-webkit-scrollbar { display: none; }

.zone-tab {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.zone-tab.active {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fff9f2;
}

.places-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 2px;
}

.place-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.place-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.place-title { font-size: 13.5px; font-weight: 600; }
.place-desc { font-size: 11.5px; color: var(--text-sub); margin-top: 2px; line-height: 1.4; }

/* 5. Floating Layers & Weather Sheet (Above Bottom Dock) */
.dock-sheet {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  width: min(500px, calc(100vw - 24px));
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.dock-sheet[hidden] { display: none; }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--vermilion);
}

.sheet-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  cursor: pointer;
  padding: 3px 2px;
}

.layer-toggle input { accent-color: var(--vermilion); cursor: pointer; }
.layer-toggle .swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.layer-toggle .lbl { flex: 1; }
.layer-toggle .cnt { font-size: 11px; color: var(--text-sub); font-variant-numeric: tabular-nums; }

.sheet-side {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.side-label {
  font-size: 11.5px;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.side-label strong { color: var(--text); margin-left: 4px; }
.sheet-side input[type="range"] { width: 100%; accent-color: var(--vermilion); }

.rhythm-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 7px;
}

.ceremony-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 5px;
}

.pill-royal {
  border-color: rgba(185, 28, 28, 0.34);
  color: var(--vermilion);
  font-weight: 600;
}

.ceremony-card-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.pill-btn.pill-sm {
  padding: 4.5px 3px;
  font-size: 10.5px;
  white-space: nowrap;
}

.weather-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.weather-pills .pill-btn {
  padding: 5.5px 4px;
  font-size: 11.5px;
}

.sky-telemetry {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.pill-btn.pill-sm {
  padding: 4.5px 6px;
  font-size: 11px;
}

.pill-btn {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.pill-btn.active {
  background: var(--accent-soft);
  border-color: var(--vermilion);
  color: var(--vermilion);
  font-weight: 700;
}

/* Live Seoul TOPIS Road Congestion Strip inside Layers Sheet */
.traffic-board {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.traffic-board[hidden] { display: none; }

.traffic-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 11px;
}

.traffic-board-title {
  font-weight: 700;
  color: var(--text);
}

.traffic-board-quota {
  color: var(--text-sub);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.traffic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.traffic-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.traffic-chip:hover {
  transform: translateY(-1px);
  border-color: var(--vermilion);
  background: var(--surface-hover);
}

.traffic-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.traffic-chip.idx-jam i { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.75); }
.traffic-chip.idx-slow i { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.65); }
.traffic-chip.idx-clear i { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.65); }
.traffic-chip.lvl-busy i { background: #e11d48; box-shadow: 0 0 6px rgba(225, 29, 72, 0.8); }
.traffic-chip.lvl-mild i { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.7); }
.traffic-chip.lvl-norm i { background: #0ea5e9; box-shadow: 0 0 6px rgba(14, 165, 233, 0.65); }
.traffic-chip.lvl-calm i { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.65); }
.traffic-chip .ev-tag {
  font-size: 9px;
  font-weight: 700;
  color: #b45309;
  background: rgba(251, 191, 36, 0.24);
  padding: 1px 4px;
  border-radius: 999px;
}
body.theme-ink .traffic-chip .ev-tag { color: #fde68a; background: rgba(251, 191, 36, 0.20); }
.traffic-chip b { font-weight: 700; }
.traffic-chip em { font-style: normal; font-size: 10px; color: var(--text-sub); }

/* 6. Selected Building / Live Vehicle Inspector Card */
.inspector-card {
  position: fixed;
  top: 184px;
  left: 18px;
  z-index: 25;
  width: 286px;
  padding: 15px 17px;
  border-radius: 18px;
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.inspector-card[hidden] { display: none; }

.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspector-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--vermilion);
}

.inspector-card h2 {
  margin: 6px 0 4px;
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  line-height: 1.3;
}

.inspector-meta { font-size: 13px; color: var(--text); margin-bottom: 3px; }
.inspector-sub { font-size: 11.5px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.inspector-actions { margin-top: 10px; }

.follow-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--vermilion);
  background: var(--accent-soft);
  color: var(--vermilion);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.follow-btn.following {
  background: var(--vermilion);
  color: #fff9f2;
}

.inspector-foot {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--text-sub);
}

.icon-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-close:hover { background: var(--surface-hover); color: var(--text); }

/* Map Building & Landmark Pins (Hanji Editorial Badges) */
.map-pins {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
  contain: layout style;
}

.pin-btn {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(24, 18, 10, 0.20);
  transition: transform 0.14s ease, background 0.14s ease;
}

.pin-btn:hover {
  transform: translate(-50%, -110%) scale(1.05);
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fff9f2;
}

.pin-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermilion);
  flex-shrink: 0;
}

.pin-btn.tier-2 {
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 500;
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(24, 18, 10, 0.15);
}
.pin-btn.tier-2 .pin-dot {
  width: 4.5px;
  height: 4.5px;
  background: var(--celadon);
}

.pin-btn.tier-3 {
  padding: 1.5px 6px;
  font-size: 9.5px;
  font-weight: 500;
  opacity: 0.88;
  box-shadow: none;
}
.pin-btn.tier-3 .pin-dot { display: none; }

/* Studio Footer Watermark */
.studio-footer {
  position: fixed;
  right: 18px;
  bottom: 8px;
  z-index: 20;
  font-size: 10.5px;
  color: rgba(255, 250, 240, 0.86);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
}

.studio-footer a {
  color: #f3c47c;
  font-weight: 700;
  text-decoration: none;
}
.studio-footer a:hover { text-decoration: underline; }

.credits-link {
  background: transparent;
  border: none;
  padding: 0;
  color: rgba(255, 250, 240, 0.82);
  font-family: inherit;
  font-size: 10.5px;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
}
.credits-link:hover { color: #f3c47c; text-decoration: underline; }

.credits-popover {
  position: fixed;
  right: 18px;
  bottom: 34px;
  z-index: 32;
  width: min(300px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 11px;
  color: var(--text);
}
.credits-popover[hidden] { display: none; }

.credits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 11.5px;
  color: var(--vermilion);
  margin-bottom: 6px;
}

.credits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.45;
  color: var(--text-sub);
}
.credits-list strong { color: var(--text); font-weight: 600; margin-right: 4px; }
.credits-list a { color: var(--celadon); text-decoration: none; }
.credits-list a:hover { text-decoration: underline; }

/* Whisper-Quiet Top-Right Visitor Counter & Popover */
.visitor-whisper {
  position: fixed;
  top: 66px;
  right: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  opacity: 0.56;
  cursor: pointer;
  transition: opacity 0.18s ease, color 0.16s ease, transform 0.15s ease;
}
.visitor-whisper[hidden] { display: none; }
.visitor-whisper:hover,
.visitor-whisper.active {
  opacity: 0.96;
  color: var(--text);
}
.vw-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.75);
  flex-shrink: 0;
}
.vw-sep { opacity: 0.45; }

.visitors-popover {
  position: fixed;
  top: 93px;
  right: 18px;
  z-index: 32;
  width: min(286px, calc(100vw - 24px));
  padding: 12px 13px;
  border-radius: 15px;
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.visitors-popover[hidden] { display: none; }

.visitors-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.visitors-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vermilion);
}

.visitors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.v-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 7px 6px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.v-stat-live {
  border-color: rgba(16, 185, 129, 0.35);
}
.v-lbl {
  font-size: 9.5px;
  color: var(--text-sub);
  font-weight: 500;
}
.v-val {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}
.v-stat-live .v-val { color: var(--celadon); }
.v-sub {
  font-size: 9.5px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visitors-meta {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: 10px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.visitors-refs {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.visitors-refs[hidden] { display: none; }
.v-ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 9.5px;
  color: var(--text-sub);
}
.v-ref-chip b { color: var(--text); font-weight: 600; }

.visitors-days {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.visitors-days[hidden] { display: none; }
.v-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--text-sub);
}
.v-day-row b { color: var(--text); font-weight: 600; }

/* Share & Watercolor Postcard Popover */
.share-popover {
  position: fixed;
  top: 68px;
  right: 18px;
  z-index: 33;
  width: min(272px, calc(100vw - 24px));
  padding: 11px 12px;
  border-radius: 15px;
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.share-popover[hidden] { display: none; }

.share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1px;
}
.share-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vermilion);
}

.share-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}
.share-action:hover {
  background: var(--surface-hover);
  border-color: var(--vermilion);
  transform: translateY(-1px);
}
.share-action:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.sa-ico {
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}
.sa-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sa-body strong {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
}
.sa-body small {
  font-size: 9.8px;
  color: var(--text-sub);
  line-height: 1.3;
}

.share-toast {
  padding: 5px 9px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--vermilion);
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
}
.share-toast[hidden] { display: none; }

/* Zen Window Mode (Living Second-Monitor Seoul Window & Clean Recording) */
.studio-crest,
.utility-pill,
.floating-dock,
.studio-footer {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
body.zen-mode .studio-crest,
body.zen-mode .utility-pill,
body.zen-mode .visitor-whisper,
body.zen-mode .floating-dock,
body.zen-mode .studio-footer,
body.zen-mode #osd-map .navigator,
body.zen-mode .inspector-card {
  opacity: 0 !important;
  pointer-events: none !important;
}
.zen-exit-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 35;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.30;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.zen-exit-btn[hidden] { display: none; }
.zen-exit-btn:hover {
  opacity: 0.96;
  transform: scale(1.03);
}

@media (max-width: 720px) {
  .studio-crest { top: 10px; left: 10px; padding: 8px 11px; min-width: 175px; }
  .crest-metrics { display: none; }
  .utility-pill { top: 10px; right: 10px; padding: 3px 5px; }
  .util-btn { width: 28px; height: 28px; font-size: 13px; }
  .util-desktop-only { display: none !important; }
  .visitor-whisper { top: 48px; right: 10px; padding: 2px 7px; font-size: 9.5px; }
  .visitors-popover { top: 74px; right: 10px; }
  .share-popover { top: 50px; right: 10px; }
  .floating-dock { bottom: 14px; padding: 5px 6px; }
  .dock-btn { padding: 6px 9px; font-size: 12px; }
  .places-drawer { left: 12px; right: 12px; width: auto; top: 64px; bottom: 80px; }
  .sheet-grid { grid-template-columns: 1fr; }
  .sheet-side { border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 10px; }
  #osd-map .navigator { display: none !important; }
}
