* { box-sizing: border-box; }
html, body { margin: 0; height: 100dvh; font: 14px/1.4 system-ui, sans-serif; }

#map { position: fixed; inset: 0; width: 100%; height: 100dvh; }

#category-boxes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px 10px; margin-top: 6px;
}
#category-boxes label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
#category-boxes .cat-heading { grid-column: 1 / -1; font-weight: 600;
  margin-top: 6px; color: #666; font-size: 11px; }
#category-boxes .cat-heading:first-of-type { margin-top: 0; }
#category-filter summary { cursor: pointer; font-weight: 500; }

#filters {
  position: absolute; top: 12px; left: 60px; z-index: 1000;
  background: #fff; padding: 8px 10px; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  display: flex; flex-direction: column; gap: 6px;
  width: 380px; font-size: 13px;
}
#filters .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#filters .row input[type=range] { flex: 1; min-width: 0; }
.dual-range { position: relative; flex: 1; height: 20px; }
.dual-range input[type=range] {
  position: absolute; left: 0; right: 0; width: 100%;
  pointer-events: none; appearance: none; background: none; margin: 0;
}
.dual-range input[type=range]::-webkit-slider-runnable-track {
  height: 4px; background: #ddd; border-radius: 2px;
}
.dual-range input[type=range]::-webkit-slider-thumb {
  pointer-events: auto; appearance: none;
  width: 14px; height: 14px; margin-top: -5px;
  background: #f5a623; border-radius: 50%; cursor: pointer;
}
.dual-range input[type=range]:nth-child(2)::-webkit-slider-runnable-track {
  background: transparent;
}
.dual-range input[type=range]::-moz-range-track {
  height: 4px; background: #ddd; border-radius: 2px;
}
.dual-range input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 14px; height: 14px;
  background: #f5a623; border: none; border-radius: 50%; cursor: pointer;
}
#filters .row > label { display: flex; align-items: center; gap: 4px; }
#filters .row > details { margin-left: auto; }
#filters .row > details[open] { width: 100%; margin-left: 0; }
@media (max-width: 600px) {
  #filters { left: 8px; right: 8px; width: auto; }
  #category-boxes { grid-template-columns: repeat(2, 1fr); }
}
#filters input[type=search] { width: 100%; padding: 4px 6px; }
#filters .attribution { font-size: 10px; color: #999; text-align: right; }
#filters .attribution a { color: #999; }

#detail {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 1001;
  width: 360px; max-width: 90vw;
  background: #fff; box-shadow: -2px 0 12px rgba(0,0,0,.2);
  padding: 16px; overflow-y: auto;
  transform: translateX(0); transition: transform .2s ease;
}
#detail[hidden] { display: block; transform: translateX(100%); }
#detail-close {
  position: absolute; top: 8px; right: 8px;
  border: 0; background: none; font-size: 24px; cursor: pointer;
}
#detail h2 { margin: 0 0 8px; font-size: 18px; }
#d-meta { font-size: 13px; color: #444; margin-bottom: 12px; }
.stars { display: inline-block; font-size: 18px; line-height: 1; }
.star { position: relative; display: inline-block; }
.star-bg { color: #ddd; }
.star-fg { position: absolute; left: 0; top: 0; overflow: hidden; color: #f5a623; }
.rating-num { font-size: 22px; font-weight: bold; color: #f5a623; margin-left: 6px; vertical-align: -1px; }
.review-count { font-size: 12px; color: #888; margin-left: 4px; }
#d-meta .award { display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; margin-right: 6px; }
.award-Gold   { background: #f5c518; color: #000; }
.award-Silver { background: #c0c0c0; color: #000; }
.award-Bronze { background: #cd7f32; color: #fff; }
.award-百名店 { background: #2a7ae2; color: #fff; }
#d-meta .michelin { display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; margin-right: 6px;
  background: #c81d25; color: #fff; }
#d-hours { font-size: 12px; color: #666; white-space: pre-line; margin-bottom: 12px; }
#d-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 12px; }
#d-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
#d-link { display: inline-block; margin-top: 8px; color: #2a7ae2; text-decoration: none; }
#d-link:hover { text-decoration: underline; }

#update-banner {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; padding: 10px 14px; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3); z-index: 2000; font-size: 13px;
}
#update-banner button {
  margin-left: 8px; padding: 4px 10px; background: #f5a623; color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font: inherit;
}

