* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; display: flex; flex-direction: column; height: 100vh; }
.bar {
  padding: 0.5rem 1rem;
  background: #111;
  color: #eee;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.bar h1 { font-size: 1.1rem; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filters input[type="text"] { width: 8rem; padding: 0.25rem; }
.filters select { padding: 0.25rem; }
#btn-load { padding: 0.35rem 0.75rem; cursor: pointer; }
#btn-profile { padding: 0.35rem 0.75rem; cursor: pointer; }
#status { min-height: 1.5rem; padding: 0.25rem 1rem; background: #f6f6f6; color: #333; font-size: 0.9rem; }
#map { flex: 1; min-height: 240px; }
#panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100%);
  background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.15);
  padding: 1rem; overflow: auto; z-index: 2000;
}
#panel.hidden { display: none; }
#panel-close {
  position: absolute; top: 0.5rem; right: 0.5rem; border: none; background: none;
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
#panel-body { margin-top: 1.5rem; font-size: 0.95rem; }
.pill { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 999px; background: #eee; margin: 0.15rem; font-size: 0.8rem; }
.pin-icon {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 2px solid #111; border-radius: 50% 50% 50% 0;
  background: #fff; transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.pin-icon span { transform: rotate(45deg); font-size: 1rem; line-height: 1; }
.spot-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; background: #eee; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .5rem; }
.photo-strip button { border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #eee; }
#lightbox {
  position: fixed; inset: 0; z-index: 3000; display: grid; grid-template-columns: 4rem 1fr 4rem;
  align-items: center; gap: 1rem; padding: 3rem 1rem; background: rgba(0,0,0,.72);
  opacity: 1; transition: opacity .18s ease;
}
#lightbox.hidden { display: none; opacity: 0; }
#lightbox-img {
  max-width: min(1100px, 88vw); max-height: 86vh; justify-self: center; border-radius: 10px;
  box-shadow: 0 16px 60px rgba(0,0,0,.45); transform: scale(1); animation: photo-pop .18s ease;
}
@keyframes photo-pop { from { transform: scale(.96); opacity: .6; } to { transform: scale(1); opacity: 1; } }
#lightbox-close {
  position: fixed; top: 1rem; right: 1rem; width: 2.5rem; height: 2.5rem;
  border: 0; border-radius: 50%; background: #fff; color: #111; font-size: 1.8rem; cursor: pointer;
}
.lightbox-nav {
  border: 0; border-radius: 50%; width: 3rem; height: 3rem; background: #fff; color: #111;
  font-size: 2.5rem; cursor: pointer;
}
.lightbox-nav:disabled { background: #333; color: #777; cursor: default; }
.updates { margin-top: 1rem; border-top: 1px solid #ddd; padding-top: 0.5rem; }
.update-item { padding: 0.5rem 0; border-bottom: 1px solid #eee; }
.actions { display: grid; gap: 0.5rem; margin-top: 1rem; }
.actions button {
  border: 1px solid #111; background: #111; color: #fff; border-radius: 6px;
  padding: 0.65rem 0.75rem; cursor: pointer; text-align: left;
}
.actions button:hover { background: #333; }
.actions button:disabled { opacity: .6; cursor: wait; }
.notice { padding: 0.65rem; border-radius: 6px; background: #f3f3f3; color: #333; }
