/* =============================================================
   日本タイル地図 — styles
   ============================================================= */
.map-section { padding-top: 8px; }

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 20px;
  align-items: start;
}

/* ---- Board ---- */
.map-board-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px;
}
.map-board {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}
.tile {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 600; line-height: 1.1; text-align: center;
  padding: 1px; position: relative; border: 1px solid transparent;
  font-family: inherit; overflow: hidden;
}
.tile-empty { background: transparent; }
.tile-nodata {
  background: var(--surface-2); color: var(--ink-3); opacity: .75;
  border-color: var(--line);
}
.tile-data {
  background: var(--teal-100); color: var(--teal-900);
  border-color: var(--teal-300); cursor: pointer;
  transition: background .14s, transform .08s, box-shadow .14s;
}
.tile-data:hover { background: var(--teal-300); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tile-data.is-active {
  background: var(--teal-600); color: #fff; border-color: var(--teal-600);
  box-shadow: 0 0 0 3px var(--teal-100);
}
.tile-name { display: block; }
.tile-n {
  margin-top: 1px; min-width: 14px; height: 13px; padding: 0 3px;
  display: inline-grid; place-items: center; border-radius: 999px;
  background: var(--surface); color: var(--teal-700); font-size: 9px; font-weight: 700;
}
.tile-data.is-active .tile-n { background: rgba(255,255,255,.28); color: #fff; }

/* ---- Legend ---- */
.map-legend {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-2);
}
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.lg-sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.lg-sw.lg-data { background: var(--teal-100); border-color: var(--teal-300); }
.lg-sw.lg-nodata { background: var(--surface-2); }
.lg-note { color: var(--ink-3); font-weight: 400; font-size: 11.5px; }

/* ---- Panel ---- */
.map-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px;
  position: sticky; top: 16px;
}
.map-panel-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; color: var(--ink-3); padding: 40px 20px;
}
.map-panel-empty svg { color: var(--teal-300); }
.mp-empty-title { margin: 4px 0 0; font-weight: 700; color: var(--ink-2); font-size: 15px; }
.mp-empty-sub { margin: 0; font-size: 13px; max-width: 30ch; }

.mp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mp-eyebrow {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  font-weight: 700; color: var(--teal-700); background: var(--teal-100);
  padding: 3px 9px; border-radius: var(--r-pill);
}
.mp-title { margin: 8px 0 0; font-size: 17px; color: var(--teal-900); font-weight: 700; }
.mp-count { font-size: 26px; font-weight: 700; color: var(--teal-700); line-height: 1; white-space: nowrap; }
.mp-count small { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-left: 2px; }
.mp-summary { margin: 10px 0 14px; font-size: 13px; color: var(--ink-2); }

.mp-list { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.mp-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 13px; background: var(--surface); }
.mp-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mp-name { font-weight: 700; color: var(--ink); font-size: 14.5px; line-height: 1.4; }
.mp-addr { margin: 6px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.mp-item-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.mp-years { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-y { display: inline-flex; align-items: center; gap: 4px; }
.mp-y i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink-3); }
.mp-note { margin: 9px 0 0; font-size: 12px; color: var(--ink-3); background: var(--surface-2); padding: 7px 10px; border-radius: var(--r-sm); }

.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-panel { position: static; }
  .map-board-wrap { overflow-x: auto; }
  .map-board { min-width: 460px; }
}
