* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif; }
body { display: flex; }

#sidebar {
  width: 340px; min-width: 340px; height: 100%; overflow-y: auto;
  background: #14161c; color: #e8eaf0; display: flex; flex-direction: column;
}
#sidebar header { padding: 16px 16px 8px; }
#sidebar h1 { margin: 0; font-size: 22px; letter-spacing: .5px; }
#sidebar .sub { font-size: 12px; color: #8a90a0; }

.search-box { padding: 8px 16px; }
#search {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #2a2e3a;
  background: #1d2028; color: #e8eaf0; font-size: 14px; outline: none;
}
#search:focus { border-color: #5b7fff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px; }
.chip {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer;
  border: 1px solid #2a2e3a; background: #1d2028; color: #c9cdd8; user-select: none;
}
.chip.active { border-color: currentColor; background: #232735; font-weight: 600; }
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

.conf-box { padding: 8px 16px 2px; font-size: 12px; color: #8a90a0; }
.conf-box label b { color: #e8eaf0; }
.conf-box input { width: 100%; accent-color: #5b7fff; }

.streets { padding-top: 6px; }
.streets .label { font-size: 12px; color: #8a90a0; padding: 0 16px; }

#results { flex: 1; overflow-y: auto; padding: 8px 0; }
.result {
  padding: 8px 16px; cursor: pointer; border-left: 3px solid transparent;
}
.result:hover { background: #1d2028; }
.result .name { font-size: 14px; font-weight: 600; }
.result .name .num { color: #8a90a0; font-weight: 400; }
.result .meta { font-size: 12px; color: #8a90a0; }
.result-head { padding: 10px 16px 4px; font-size: 13px; color: #aab0c0; border-top: 1px solid #2a2e3a; }
.result-head b { color: #fff; }

#stats { padding: 10px 16px; font-size: 11px; color: #8a90a0; border-top: 1px solid #2a2e3a; }

#map { flex: 1; height: 100%; }
#counter {
  position: fixed; top: 12px; right: 12px; z-index: 5;
  background: rgba(20, 22, 28, .85); color: #fff; padding: 6px 12px;
  border-radius: 8px; font-size: 12px; pointer-events: none;
}

.maplibregl-popup-content {
  font-family: inherit; background: #14161c; color: #e8eaf0;
  border-radius: 10px; padding: 12px 14px; min-width: 220px;
}
.maplibregl-popup-tip { border-top-color: #14161c !important; border-bottom-color: #14161c !important; }
.popup h3 { margin: 0 0 2px; font-size: 15px; }
.popup .ja { color: #aab0c0; font-size: 13px; }
.popup .cat { font-size: 12px; margin: 6px 0 2px; }
.popup .cat .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.popup .addr { font-size: 12px; color: #8a90a0; }
.popup a { color: #7d9bff; font-size: 12px; }
.popup .conf { font-size: 10px; color: #666d80; margin-top: 6px; }

.plaquette { margin-top: 8px; padding-top: 8px; border-top: 1px solid #2a2e3a; }
.plaquette .desc { font-size: 12px; color: #c9cdd8; margin-bottom: 4px; }
.plaquette .rating { font-size: 12px; color: #ffca6b; margin-bottom: 4px; }
.plaquette .stars { color: #ffca6b; letter-spacing: 1px; }
.plaquette .rating-src { color: #8a90a0; font-size: 11px; }

.kirikat {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid #2a2e3a;
  display: flex; gap: 10px; align-items: center; font-size: 12px;
}
.kirikat img { border-radius: 6px; background: #fff; padding: 3px; }

.searching { font-size: 12px; color: #aab0c0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.searching-detail { font-size: 10px; color: #666d80; width: 100%; padding-left: 22px; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #3a4468; border-top-color: #7d9bff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
