:root {
  --font: 'Host Grotesk', 'Noto Sans JP', sans-serif;
  --glass-bg: rgba(255,255,255,.8);
  --glass-blur: blur(14px);
  /* 選択時: Apple Liquid Glassのような淡いパステル調のティント。
     ベタ塗りだと素人っぽく見えるとの指摘のため、色は薄く・ガラス感は保つ */
  --accent-on-bg: rgba(255, 214, 120, .38);
  --accent-on-ring: rgba(255, 193, 60, .55);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:var(--font); height:100vh; }
#map { width:100%; height:100%; }

#title-badge {
  position:absolute; top:0; left:50%; transform:translateX(-50%); z-index:10;
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border-radius:0 0 14px 14px; box-shadow:0 2px 16px rgba(0,0,0,.1);
  padding:10px 28px 8px; text-align:center; font-family:var(--font);
}
#title-badge h1 {
  font-size:22px; font-weight:700; color:#2a2a2a; line-height:1.3;
  display:flex; flex-direction:column; align-items:center;
}
#title-badge h1 .en {
  font-size:11px; font-weight:400; color:#2a2a2a; letter-spacing:.06em; margin-top:1px;
}

/* ポップアップ（山頂・建物クリック共通）。MapLibreデフォルトの見た目を
   すりガラス・モダン基調に上書きする */
.maplibregl-popup-content {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border:none; border-radius:12px; box-shadow:0 4px 24px rgba(0,0,0,.15);
  padding:12px 14px; font-family:var(--font) !important; min-width:140px;
}
.maplibregl-popup-tip { display:none; }
.maplibregl-popup-close-button {
  color:#8b7355; font-size:0; padding:4px; display:flex; align-items:center; justify-content:center;
}
.maplibregl-popup-close-button svg { width:14px; height:14px; }
.pm-h { font-size:12px; color:#666; }
.pm-h span { font-size:17px; font-weight:700; color:#8b4513; }
.pm-h span.no-data { font-size:13px; }
.pm-b { font-size:9px; color:#2a2a2a; margin-top:3px; }
.pp-name { font-size:15px; font-weight:700; color:#2a2a2a; margin-bottom:2px; }
.pp-height { font-size:12px; color:#666; }
.pp-height span { font-size:15px; font-weight:700; color:#8b4513; }
.pp-bldg { font-size:10px; color:#2a2a2a; margin-top:3px; }

#top-right-controls {
  position:absolute; top:10px; right:10px; z-index:10;
  display:flex; flex-direction:column; align-items:flex-end; gap:8px;
}

#ui-buttons { display:flex; flex-direction:column; gap:6px; }
#ui-buttons button, .info-btn {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border:none; border-radius:10px;
  padding:7px 4px; font-size:9px; color:#5a5048; cursor:pointer; font-family:var(--font);
  width:54px; display:flex; flex-direction:column; align-items:center; gap:3px;
  box-shadow:0 2px 8px rgba(0,0,0,.1); transition:background .15s, color .15s, box-shadow .15s;
}
#ui-buttons button svg, #ui-buttons button i, .info-btn svg, .info-btn i { width:18px; height:18px; stroke-width:1.8; color:#6b5a44; transition:color .15s, transform .15s; }
#ui-buttons button:hover, .info-btn:hover { background:#fff; }
#ui-buttons button.on { background:var(--accent-on-bg); box-shadow:0 0 0 1.5px var(--accent-on-ring), 0 2px 8px rgba(0,0,0,.08); }
#ui-buttons button .blbl, .info-btn .blbl { font-size:9px; line-height:1; white-space:nowrap; }
#north-toggle svg { transition:transform .2s linear; }

#legend {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border-radius:10px; padding:9px 11px; font-size:10px; color:#444; font-family:var(--font);
  box-shadow:0 2px 8px rgba(0,0,0,.1);
}
#legend.hidden { display:none; }
#legend .lt { font-size:10px; font-weight:700; margin-bottom:5px; color:#2a2a2a; letter-spacing:.03em; }
.lrow { display:flex; align-items:center; gap:6px; line-height:1.75; }
.lsw { width:22px; height:9px; border:0.5px solid rgba(138,124,96,.4); flex-shrink:0; }

/* 情報ボタン（凡例の下、他のUIボタンと同じ見た目に揃える）＋モーダル */
.info-btn { align-self:flex-end; }

#info-modal {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:100;
  align-items:center; justify-content:center; padding:20px;
}
#info-modal.visible { display:flex; }
#info-box {
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border-radius:14px; padding:24px 26px; max-width:480px; max-height:82vh; overflow:auto;
  box-shadow:0 8px 32px rgba(0,0,0,.25); font-family:var(--font); color:#3a3a3a; font-size:13px; line-height:1.75;
}
#info-box h2 { font-size:16px; font-weight:700; color:#2a2a2a; margin-bottom:12px; }
#info-box ul { margin:10px 0 14px; padding-left:1.3em; }
#info-box li { margin-bottom:6px; }
#info-box a { color:#8b5e34; }
.info-source { color:#777; font-size:11px; margin-top:6px; }
.info-credit { margin-top:16px; padding-top:14px; border-top:1px solid rgba(0,0,0,.08); color:#888; font-size:11px; }
.info-credit a { display:inline-flex; align-items:center; gap:3px; margin-right:10px; color:#888; text-decoration:none; }
.info-credit a:last-child { margin-right:0; }
.info-close-btn {
  margin-top:18px; padding:7px 18px; background:rgba(0,0,0,.05); border:1px solid rgba(0,0,0,.1);
  border-radius:8px; color:#4a4a4a; cursor:pointer; font-size:12px; font-family:var(--font);
}
.info-close-btn:hover { background:rgba(0,0,0,.08); }

#zoom-overlay {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  z-index:20; background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border-radius:12px; padding:14px 20px; font-size:13px; color:#1a1a1a; font-family:var(--font);
  text-align:center; box-shadow:0 4px 20px rgba(0,0,0,.15);
  display:none; pointer-events:none; line-height:1.7;
}
#zoom-overlay svg { width:16px; height:16px; vertical-align:-3px; margin-right:4px; color:#8b7355; }
#zoom-overlay .zo-sub { font-size:10px; color:#888; margin-top:4px; }
#zoom-overlay.visible { display:block; }

#computing-indicator {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:15;
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border-radius:12px; padding:14px 20px; font-size:13px; color:#1a1a1a; font-family:var(--font);
  display:none; align-items:center; gap:8px; box-shadow:0 4px 20px rgba(0,0,0,.15);
  pointer-events:none; line-height:1.7;
}
#computing-indicator.visible { display:flex; }
#computing-indicator .spinner {
  width:11px; height:11px; border:2px solid #d8c8a8; border-top-color:#1a1a1a;
  border-radius:50%; animation:tozan-spin 0.8s linear infinite; flex-shrink:0;
}
@keyframes tozan-spin { to { transform:rotate(360deg); } }

/* 現在地マーカー（tokyo-danmenzuと同じ構成のGPSドット） */
.maplibregl-marker { z-index:3; }
#gps-dot { width:14px; height:14px; position:relative; pointer-events:none; }
#gps-dot .core {
  width:10px; height:10px; background:#2f6fed; border-radius:50%; position:absolute;
  top:50%; left:50%; transform:translate(-50%,-50%); box-shadow:0 0 0 2px #fff, 0 0 6px 2px rgba(47,111,237,.5);
}
#gps-dot .ring {
  width:36px; height:36px; border-radius:50%; background:rgba(47,111,237,.25);
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%) scale(.2);
  animation:gps-ring 2s ease-out infinite;
}
@keyframes gps-ring {
  0% { transform:translate(-50%,-50%) scale(.2); opacity:.9; }
  100% { transform:translate(-50%,-50%) scale(1.4); opacity:0; }
}
