* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1c1c1c; }

#app { display: grid; grid-template-columns: 1fr 360px; height: 100vh; }
#map { width: 100%; height: 100%; }

#sidebar { background: #f7f6f3; border-left: 1px solid #e0ddd5; display: flex; flex-direction: column; overflow: hidden; }
#sidebar header { padding: 16px; border-bottom: 1px solid #e0ddd5; background: linear-gradient(180deg, #2c5f2d 0%, #234a23 100%); color: #fff; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,0.18); color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 0.5px; flex-shrink: 0; }
#sidebar h1 { margin: 0; font-size: 17px; line-height: 1.2; }
#sidebar .subtitle { margin: 2px 0 0; color: rgba(255,255,255,0.85); font-size: 12px; }

#locate-btn { width: 100%; padding: 10px 12px; background: #fff; color: #2c5f2d; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
#locate-btn:hover { background: #f0f0f0; }
#locate-btn:disabled { opacity: 0.6; cursor: default; }

.status { margin: 10px 0 0; font-size: 12px; color: rgba(255,255,255,0.85); }
.status.error { color: #ffd2cf; }

#results { overflow-y: auto; flex: 1; }
#intro { padding: 14px 16px; border-bottom: 1px solid #ece9e0; font-size: 13px; line-height: 1.5; color: #333; }
#intro h2 { margin: 0 0 8px; font-size: 15px; color: #2c5f2d; }
#intro p { margin: 0 0 8px; }
#intro p:last-child { margin-bottom: 0; }
#intro .disclaimer { font-size: 12px; color: #555; background: #fdf6e3; border-left: 3px solid #c0392b; padding: 8px 10px; border-radius: 2px; }
#intro a { color: #2c5f2d; }
#nearest { list-style: none; margin: 0; padding: 0; }
#nearest li { padding: 12px 16px; border-bottom: 1px solid #ece9e0; cursor: pointer; }
#nearest li:hover { background: #efece4; }
#nearest .row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
#nearest .name { font-weight: 600; font-size: 14px; }
#nearest .dist { font-size: 12px; color: #2c5f2d; white-space: nowrap; }
#nearest .type { font-size: 12px; color: #666; margin: 2px 0; }
#nearest .hours { font-size: 11px; color: #444; margin-top: 4px; line-height: 1.4; }
#nearest .badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 10px; background: #2c5f2d22; color: #2c5f2d; margin-left: 4px; }
#nearest .badge.no { background: #a33322; color: #a33; }

#sidebar footer { padding: 8px 12px; border-top: 1px solid #e0ddd5; font-size: 11px; color: #555; }
.attribution { margin: 8px 0 0; font-size: 10px; line-height: 1.5; color: #666; }
.attribution a { color: #2c5f2d; }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 8px; margin-right: 3px; vertical-align: middle; }
.dot-toilet { background: #1e88e5; }
.dot-cafe { background: #ef6c00; }
.dot-lodging { background: #8e24aa; }
.dot-other { background: #6d4c41; }

.maplibregl-popup-content { font-size: 12px; max-width: 260px; }
.maplibregl-popup-content strong { font-size: 13px; }

@media (max-width: 720px) {
  #app { grid-template-columns: 1fr; grid-template-rows: 55vh 45vh; }
  #sidebar { border-left: none; border-top: 1px solid #e0ddd5; }
}
