
:root{
 --ink:#0f172a;--navy:#172235;--blue:#12355b;--blue2:#0d6e8a;--gold:#d6a843;
 --paper:#f7f2e8;--card:#fff;--line:#d7dee6;--muted:#64748b;--shadow:0 12px 32px rgba(15,23,42,.12)
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--paper);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select{font:inherit} button{cursor:pointer}
a{color:inherit}
.app{max-width:1400px;margin:auto;min-height:100vh}
.topbar{position:sticky;top:0;z-index:1200;background:rgba(23,34,53,.97);backdrop-filter:blur(12px);color:white;padding:13px 16px;border-bottom:1px solid rgba(255,255,255,.1)}
.brandrow{display:flex;align-items:center;gap:11px}
.logo{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;background:#fff;overflow:hidden;box-shadow:inset 0 0 0 2px rgba(18,53,91,.16)}.logo img{width:100%;height:100%;object-fit:contain;display:block;max-width:43px;max-height:43px}
.brand h1{font:700 21px Georgia,serif;margin:0}.brand p{margin:2px 0 0;color:#cbd5e1;font-size:12px}
.tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}
.tab{padding:10px;border:1px solid #475569;border-radius:12px;background:transparent;color:white;font-weight:800}
.tab.active{background:white;color:var(--blue);border-color:white}
.toolbar{display:flex;gap:8px;padding:11px 14px;background:white;border-bottom:1px solid var(--line)}
.search{flex:1;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:12px}
.filter{max-width:190px;padding:11px 9px;border:1px solid var(--line);border-radius:12px;background:white}
.view{display:none}.view.active{display:block}
.map-shell{position:relative;height:calc(100dvh - 158px);min-height:420px;max-height:calc(100dvh - 158px);overflow:hidden;background:#dfe8ed}
#map{position:absolute;inset:0;z-index:2}
#fallback{position:absolute;inset:0;z-index:1;background:#dfeef5;overflow:auto}
#fallback svg{display:block;width:100%;height:100%;min-height:0}
.map-status{position:absolute;left:12px;bottom:14px;z-index:500;background:rgba(255,255,255,.95);padding:7px 10px;border-radius:10px;font-size:11px;color:var(--muted);box-shadow:0 4px 15px rgba(15,23,42,.12)}
.leaflet-popup-content-wrapper{border-radius:16px}.leaflet-popup-content{margin:11px;width:245px!important}
.popup img{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:10px;background:#e2e8f0}
.popup h3{font:700 17px Georgia,serif;margin:8px 0 4px}.popup p{margin:0 0 9px;font-size:12px;color:var(--muted)}
.popup button{width:100%;border:0;border-radius:10px;padding:9px;background:var(--blue);color:white;font-weight:800}
.cluster{background:var(--blue)!important;color:white;border-radius:50%;display:grid!important;place-items:center;border:3px solid var(--gold);font-weight:900;box-shadow:0 5px 16px rgba(15,23,42,.25)}
.feed{padding:14px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.card{background:white;border:1px solid rgba(15,23,42,.08);border-radius:19px;overflow:hidden;box-shadow:var(--shadow)}
.card img{display:block;width:100%;aspect-ratio:4/5;object-fit:cover;background:#e2e8f0}.cardbody{padding:13px}
.cat{display:inline-block;background:#edf7fa;color:var(--blue2);padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800;margin-bottom:8px}
.card h2{font:700 21px/1.14 Georgia,serif;margin:0 0 6px}.meta{font-size:12px;color:var(--muted);margin-bottom:11px}
.actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.btn{border:0;border-radius:11px;padding:10px 12px;text-decoration:none;text-align:center;font-size:12px;font-weight:800}
.primary{background:var(--blue);color:white}.ghost{background:white;color:var(--blue);border:1px solid var(--line)}
.near{padding:16px}.nearhero{background:linear-gradient(135deg,var(--blue),#17627c);color:white;padding:18px;border-radius:19px;box-shadow:var(--shadow)}
.nearhero h2{font:700 24px Georgia,serif;margin:0 0 5px}.nearhero p{margin:0 0 13px;color:#dbeafe;font-size:13px}
.nearbuttons{display:flex;gap:8px;flex-wrap:wrap}.nearbuttons .btn{flex:1;min-width:150px}
.nearlist{display:grid;gap:9px;margin-top:12px}.nearrow{display:grid;grid-template-columns:82px 1fr auto;gap:12px;align-items:center;background:white;border:1px solid var(--line);border-radius:16px;padding:10px 12px;box-shadow:0 5px 14px rgba(15,23,42,.05);transition:transform .12s ease,box-shadow .12s ease}.nearrow:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,23,42,.08)}
.nearrow img{width:82px;height:96px;object-fit:cover;border-radius:10px}.nearrow h3{font:700 16px Georgia,serif;margin:0 0 3px}.nearrow p{font-size:11px;color:var(--muted);margin:0}.distance{font-weight:900;color:var(--blue);font-size:13px;white-space:nowrap}.near-open{display:block;margin-top:5px;color:var(--blue2);font-size:11px;font-weight:800}
.modal{display:none;position:fixed;inset:0;z-index:2000;background:rgba(2,6,23,.74);padding:12px;align-items:flex-end;justify-content:center}.modal.open{display:flex}
.modalbox{background:white;width:min(620px,100%);max-height:92vh;overflow:auto;border-radius:24px;position:relative}.modalbox img{width:100%;max-height:42dvh;object-fit:cover;border-radius:24px 24px 0 0}
.modalbody{padding:16px}.modalbody h2{font:700 25px Georgia,serif;margin:0 0 5px}.modalactions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:13px}
.close{position:absolute;top:12px;right:12px;width:38px;height:38px;border-radius:50%;border:0;background:rgba(15,23,42,.92);color:white;font-size:21px}
.install{display:none;margin-left:auto;border:1px solid #64748b;background:transparent;color:#fff;border-radius:10px;padding:8px 10px;font-size:11px;font-weight:800}
.install.show{display:inline-flex}
.empty{padding:28px;text-align:center;color:var(--muted)}
@media(max-width:620px){.feed{grid-template-columns:1fr}.card img{aspect-ratio:9/12}.toolbar{flex-wrap:wrap}.filter{width:100%;max-width:none}.map-shell{height:calc(100dvh - 215px);max-height:calc(100dvh - 215px);min-height:360px}}
@media(min-width:800px){.headerinner{display:flex;align-items:center;justify-content:space-between;gap:20px}.tabs{width:390px;margin-top:0}.topbar{padding:14px 22px}.toolbar{padding:11px 22px}.modal{align-items:center}.map-shell{height:calc(100dvh - 150px);max-height:calc(100dvh - 150px);min-height:420px}}

.cluster-popup{min-width:260px}
.cluster-popup h3{font:700 18px Georgia,serif;margin:0 0 8px}
.cluster-list{display:grid;gap:7px}
.cluster-item{display:grid;grid-template-columns:48px 1fr;gap:8px;align-items:center;padding:6px;border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0;cursor:pointer}
.cluster-item img{width:48px;height:58px;object-fit:cover;border-radius:7px}
.cluster-item strong{display:block;font-size:12px;line-height:1.2}
.cluster-item span{font-size:10px;color:var(--muted)}

.story-detail .modalbody{padding:18px}
.story-desc{font-size:14px;line-height:1.5;color:#475569;margin:8px 0 14px}
.story-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0 14px}
.story-detail-grid div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:11px;padding:9px}
.story-detail-grid strong{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;margin-bottom:3px}
.story-detail-grid span{font-size:12px;font-weight:700}
.source-link{display:block;margin-top:10px;text-align:center;font-size:11px;color:#64748b}

.install-help{position:fixed;inset:0;z-index:2500;background:rgba(2,6,23,.58);display:grid;place-items:end center;padding:14px}
.install-help[hidden]{display:none}
.install-help-card{position:relative;width:min(520px,100%);background:white;border-radius:18px;padding:18px;box-shadow:0 24px 60px rgba(0,0,0,.25)}
.install-help-card h3{font:700 20px Georgia,serif;margin:0 28px 6px 0}
.install-help-card p{margin:0;color:#475569;line-height:1.45;font-size:13px}
.install-help-close{position:absolute;top:8px;right:10px;border:0;background:transparent;font-size:24px;color:#475569}

@media(max-width:1100px){.feed{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.feed{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.feed{grid-template-columns:1fr}.story-detail-grid{grid-template-columns:1fr}.nearrow{grid-template-columns:72px 1fr auto}.nearrow img{width:72px;height:84px}}

/* v1.2.1 viewport repair */
.map-shell{height:calc(100dvh - 158px);max-height:calc(100dvh - 158px);min-height:420px;overflow:hidden}
#map,#fallback{width:100%;height:100%}
#fallback svg{width:100%;height:100%;min-height:0}
@media(max-width:620px){
  .map-shell{height:calc(100dvh - 215px);max-height:calc(100dvh - 215px);min-height:360px}
}
@media(min-width:800px){
  .map-shell{height:calc(100dvh - 150px);max-height:calc(100dvh - 150px);min-height:420px}
}

/* v1.2.2 search clear */
.search-wrap{position:relative;flex:1;min-width:0}
.search-wrap .search{width:100%;padding-right:42px}
.clear-search{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;border-radius:50%;background:#eef2f6;color:#475569;font-size:20px;line-height:1;display:none;align-items:center;justify-content:center}
.clear-search.show{display:flex}
.clear-search:hover{background:#e2e8f0;color:#0f172a}

/* v1.2.2 story detail */
.story-detail{width:min(820px,calc(100vw - 24px));max-height:min(92dvh,760px);overflow:hidden}
.story-detail>img{width:100%;height:auto;max-height:38dvh;object-fit:cover}
.story-detail .modalbody{overflow:auto;max-height:54dvh}
.story-detail .modalactions{position:sticky;bottom:0;background:white;padding-top:10px;padding-bottom:2px;z-index:2}
@media(min-width:760px){
  .story-detail{display:grid;grid-template-columns:minmax(280px,42%) 1fr;align-items:stretch}
  .story-detail>img{width:100%;height:100%;max-height:none;object-fit:cover;border-radius:24px 0 0 24px}
  .story-detail .modalbody{max-height:92dvh;overflow:auto;padding:22px}
  .story-detail .modalactions{position:sticky;bottom:0;background:white;margin-top:18px;padding:10px 0 2px}
}

/* v1.3.0 results/footer/privacy */
.result-count{display:flex;align-items:center;justify-content:flex-end;min-width:95px;padding:0 2px;color:#475569;font-size:12px;font-weight:800;white-space:nowrap}
.privacy-note{margin:9px 2px 0;color:#dbeafe;font-size:11px}
.app-footer{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;padding:16px 14px 20px;border-top:1px solid var(--line);background:#fff;color:#64748b;font-size:11px;text-align:center}
.app-footer div{white-space:nowrap}
.modalactions{grid-template-columns:repeat(2,minmax(0,1fr))}
.modalactions [hidden]{display:none!important}
.empty-state{padding:34px 20px;text-align:center;color:#64748b}
.empty-state strong{display:block;color:#0f172a;font:700 18px Georgia,serif;margin-bottom:6px}
.empty-state span{font-size:13px}
@media(max-width:620px){
  .toolbar{align-items:stretch}
  .result-count{width:100%;justify-content:flex-start;padding-left:2px}
  .app-footer{gap:5px 10px}
  .app-footer div{white-space:normal}
}

/* v1.3.1 place support */
.location-badge{display:inline-flex;align-items:center;gap:5px;margin:3px 0 8px;padding:4px 8px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:10px;font-weight:800}
.location-note{font-size:11px;line-height:1.4;color:#64748b;margin-top:6px}
.place-label{font-weight:800;color:#0f172a}

/* v1.3.3 footer shell */
.app-footer{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:8px 18px;
  width:100%;
  margin:0;
  padding:14px 18px;
  border-top:1px solid rgba(255,255,255,.1);
  background:var(--navy);
  color:#e2e8f0;
  font-size:11px;
  text-align:center;
}
.app-footer div{white-space:nowrap}
@media(max-width:620px){
  .app-footer{gap:5px 10px;padding:12px 14px}
  .app-footer div{white-space:normal}
}

/* v1.4.0 */
.actions.single{grid-template-columns:1fr}

/* v1.4.1 social/ads/footer */
.ad-band{
  width:100%;
  padding:10px 14px;
  background:#f7f2e8;
  border-bottom:1px solid var(--line);
}
.ad-band-bottom{
  border-top:1px solid var(--line);
  border-bottom:0;
  padding-top:14px;
  padding-bottom:14px;
}
.ad-band[hidden]{display:none!important}
.ad-shell{
  width:min(100%,1120px);
  min-height:90px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
}
.ad-label{
  padding:5px 10px 0;
  color:#94a3b8;
  font-size:9px;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:.08em;
  text-align:center;
}
.ad-unit{width:100%;min-height:75px}
.app-footer{
  width:100%;
  margin:0;
  padding:17px 20px;
  background:var(--navy)!important;
  color:#e2e8f0!important;
  border-top:3px solid var(--gold)!important;
  box-shadow:0 -3px 12px rgba(15,23,42,.08);
}
.app-footer div{color:#e2e8f0}
@media(max-width:620px){
  .ad-band{padding:8px}
  .ad-shell{min-height:72px;border-radius:9px}
  .ad-unit{min-height:58px}
  .app-footer{padding:15px 12px}
}

.seo-intro{max-width:1100px;margin:10px auto 4px;padding:0 16px}.seo-intro h1{font-size:clamp(1.25rem,2.5vw,1.8rem);margin:.35rem 0}.seo-intro p{margin:.25rem 0 .75rem;line-height:1.5}.seo-directory{max-width:1100px;margin:16px auto;padding:0 16px}.seo-directory summary{cursor:pointer;font-weight:700}.seo-directory ul{columns:2;column-gap:28px;padding-left:22px}.seo-directory li{break-inside:avoid;margin:.35rem 0}@media(max-width:700px){.seo-directory ul{columns:1}}

/* v1.17.1 UX: preserve all three map/watch/near modes plus Update Map at desktop and mobile widths. */
.tabs{grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,520px)}
.tab{min-width:0;white-space:nowrap}
@media(min-width:800px){.tabs{width:500px;flex-shrink:0}}
@media(max-width:520px){.tabs{gap:5px}.tab{padding:10px 5px;font-size:12px}.brand h1{font-size:19px}.brandrow{gap:8px}}
@media(min-width:800px) and (max-width:1050px){.headerinner{flex-wrap:wrap}.tabs{width:100%}}
