*{box-sizing:border-box}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;max-width:1000px;margin:0 auto;padding:1rem;background:#0b1020;color:#e8ecff;line-height:1.5}
header h1{margin:.2rem 0}
.controls{display:flex;gap:.5rem;flex-wrap:wrap;margin:1rem 0}
.legend{display:flex;gap:.9rem;align-items:center;margin:.2rem 0 .9rem 0;opacity:.92}
.legend-item{display:inline-flex;gap:.4rem;align-items:center;font-size:.9rem}
.dot{display:inline-block;width:10px;height:10px;border-radius:999px}
.dot-wishlist{background:#f59e0b}
.dot-visited{background:#22c55e}
.controls input,.controls select{padding:.72rem .8rem;min-height:44px;border-radius:.6rem;border:1px solid #2d365c;background:#141b33;color:#e8ecff}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#map{height:420px;border-radius:.9rem;border:1px solid #2d365c;margin:.6rem 0 1rem 0;overflow:hidden;box-shadow:0 10px 26px rgba(0,0,0,.35)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:.8rem}
.card{background:#141b33;border:1px solid #2d365c;border-radius:.8rem;padding:.8rem}
.card-highlight{outline:3px solid #7aa2ff;outline-offset:2px;transition:outline-color .2s ease}
.card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem;margin:.05rem 0 .5rem}
.card h3{margin:0;font-size:1.06rem;line-height:1.25}
.status-badge{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:800;letter-spacing:.02em;padding:.28rem .58rem;border-radius:999px;border:1px solid transparent;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.status-wishlist{background:linear-gradient(180deg,rgba(245,158,11,.28),rgba(245,158,11,.16));border-color:rgba(245,158,11,.55);color:#fde68a}
.status-visited{background:linear-gradient(180deg,rgba(34,197,94,.28),rgba(34,197,94,.16));border-color:rgba(34,197,94,.55);color:#bbf7d0}
.meta{opacity:.8;font-size:.9rem}
.rating{margin:.35rem 0;color:#ffd36b;font-weight:600;font-size:.92rem}
.photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem;margin:.55rem 0}
.photo-btn{padding:0;border:0;background:transparent;cursor:zoom-in;border-radius:.5rem;overflow:hidden}
.photos img{display:block;width:100%;height:74px;object-fit:cover;border-radius:.5rem;border:1px solid #2d365c;background:#0f1630;transition:transform .2s ease,opacity .2s ease}
.photo-btn:hover img{transform:scale(1.03);opacity:.95}
.tags{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.4rem}
.tag{font-size:.75rem;padding:.2rem .45rem;border:1px solid #3c4a78;border-radius:999px;opacity:.9}
.links a{color:#9fc0ff;text-decoration:none}
.links a:hover{text-decoration:underline}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible{
  outline:3px solid #7aa2ff;
  outline-offset:2px;
}
.maplibregl-popup-content{background:#ffffff !important;color:#111827 !important;border:1px solid #cfd8ea;border-radius:.7rem;box-shadow:0 10px 24px rgba(0,0,0,.25);font-size:.95rem;line-height:1.45}
.maplibregl-popup-content .popup,
.maplibregl-popup-content .popup *{color:#111827 !important}
.maplibregl-popup-content a{color:#1d4ed8 !important;font-weight:600}
.maplibregl-popup-content a:hover{text-decoration:underline}
.maplibregl-popup-tip{border-top-color:#cfd8ea !important}
.maplibregl-ctrl-group{border:none !important;border-radius:.6rem !important;overflow:hidden}
.maplibregl-ctrl button{background:#141b33 !important;color:#e8ecff !important}
#status{min-height:1.2rem;font-size:.95rem;color:#c7d4ff}
#status.error{color:#ff8e8e}
#retry{padding:.7rem .95rem;min-height:44px;border-radius:.6rem;border:1px solid #3d4f84;background:#19244a;color:#e8ecff;cursor:pointer;margin:.4rem 0 1rem}
#retry:hover{background:#223060}

.image-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(4,8,18,.88);padding:1rem}
.image-modal[hidden]{display:none}
.image-modal img{max-width:min(1200px,95vw);max-height:88vh;border-radius:.75rem;border:1px solid #2d365c;box-shadow:0 16px 38px rgba(0,0,0,.45);background:#111}
.image-modal-close{position:fixed;top:14px;right:14px;width:42px;height:42px;border-radius:999px;border:1px solid #41558a;background:#1a264d;color:#e8ecff;font-size:1.1rem;cursor:pointer;z-index:1002}
.image-modal-close:hover{background:#23346a}
.image-modal-nav{position:fixed;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:999px;border:1px solid #41558a;background:#1a264d;color:#e8ecff;font-size:2rem;line-height:1;cursor:pointer;z-index:1002}
.image-modal-nav:hover{background:#23346a}
.image-modal-prev{left:14px}
.image-modal-next{right:14px}
.image-modal-counter{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);padding:.35rem .65rem;border-radius:999px;border:1px solid #41558a;background:#1a264d;color:#e8ecff;font-size:.85rem;z-index:1002}

@media (max-width: 767px){
  body{padding:.75rem}
  .controls{position:sticky;top:0;z-index:10;background:#0b1020;padding:.6rem 0 .4rem;gap:.6rem}
  .controls input,.controls select{width:100%}
  #map{height:52vh;min-height:280px;max-height:420px;margin:.4rem 0 .8rem}
  .grid{grid-template-columns:1fr;gap:.7rem}
  .card{padding:.9rem}
  .card-top{flex-direction:column;align-items:flex-start;gap:.45rem}
  .photos{grid-template-columns:repeat(2,minmax(0,1fr))}
  .photos img{height:90px}
}

@media (max-width: 430px){
  #map{height:46vh;min-height:240px}
}

footer{margin:1rem 0;opacity:.7}
