* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #map { height: 100%; width: 100%; }
body { font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; overflow: hidden; }

#map { background: #f2efe9; }

#topbar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 8px 18px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 230px;
  pointer-events: none;
}
#dist-label { font-size: 13px; color: #444; }
#dist { font-size: 24px; font-weight: 700; color: #1a73e8; }
#status { font-size: 11px; color: #777; margin-top: 2px; }

#controls {
  position: absolute;
  right: 12px;
  bottom: 34px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#controls button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  font-size: 22px;
  cursor: pointer;
  color: #555;
}
#controls button.active { background: #1a73e8; color: #fff; }
#btn-compass { display: none; }

#offline-status {
  position: absolute;
  left: 72px;
  bottom: 18px;
  z-index: 1000;
  max-width: calc(100% - 150px);
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  color: #555;
  font-size: 11px;
  pointer-events: none;
}
#offline-status[data-state="ready"] { color: #1b5e20; }
#offline-status[data-state="error"] { color: #b71c1c; }

/* 現在地マーカー */
.loc-icon { pointer-events: none; }
.loc-rot { width: 48px; height: 48px; transition: transform 0.2s linear; }
.loc-rot svg { display: block; }
.loc-rot .cone { opacity: 0; transition: opacity 0.3s; }
.loc-rot.has-heading .cone { opacity: 1; }

/* 目的地・地名ラベル */
.dest-pin { font-size: 30px; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.text-label { pointer-events: none; }
.text-label .inner {
  transform: translate(-50%, -50%);
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
  color: #555;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}
.text-label .inner.dest-label {
  font-size: 13px;
  font-weight: 700;
  color: #c62828;
  transform: translate(-50%, 10px);
}
