/* map3d.css — 立体の地図の盤（map3d.js と組で使う） */
.m3d {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  background: #e9e2d6;
  -webkit-tap-highlight-color: transparent;
}
.m3d[data-m3d-season="winter"] { background: #d9d2cf; }
.m3d .maplibregl-canvas { outline: none; }

/* 出典（必ず見える・小さく） */
.m3d .maplibregl-ctrl-attrib {
  font: 10px/1.4 "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 8px 0 0 0;
  padding: 2px 6px;
  max-width: calc(100% - 16px);
}
.m3d .maplibregl-ctrl-attrib a { color: #3a4250; text-decoration: none; }
.m3d .maplibregl-ctrl-attrib a:hover { text-decoration: underline; }
.m3d .m3d-attr-dem { color: #5a6270; }
@media (max-width: 480px) {
  .m3d .maplibregl-ctrl-attrib { font-size: 9px; }
}

/* 拡大・方角のボタン */
.m3d .maplibregl-ctrl-group {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(20, 30, 45, 0.18);
  overflow: hidden;
}
.m3d .maplibregl-ctrl-group button { width: 36px; height: 36px; }

/* 乗り物の係が無い時の駒 */
.m3d-piece {
  position: relative;
  width: 40px;
  height: 52px;
  pointer-events: none;
}
.m3d-piece-shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 26px;
  height: 8px;
  margin-left: -13px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(15, 20, 30, 0.45), rgba(15, 20, 30, 0));
}
.m3d-piece-body {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-sizing: border-box;
  box-shadow: 0 6px 14px rgba(15, 20, 30, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.m3d-piece-body svg { width: 20px; height: 20px; display: block; }
.m3d-piece-no {
  position: absolute;
  right: -2px;
  top: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 9px;
  background: #1d2330;
  color: #fff;
  font: 700 11px/18px "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.m3d-piece.is-moving .m3d-piece-body { animation: m3d-bob 0.42s ease-in-out infinite alternate; }
@keyframes m3d-bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .m3d-piece.is-moving .m3d-piece-body { animation: none; }
}
