:root{
  --fjord:#2f7f86; --fjord-dark:#1f5a60; --snow:#fbfaf7; --ink:#23313a;
  --muted:#6b7a83; --moss:#3e9b5f; --amber:#e39b2d; --stone:#8a959c;
  --radius:16px; --shadow:0 6px 20px rgba(20,40,50,.16);
  --safe-top:env(safe-area-inset-top,0px); --safe-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;font-family:ui-rounded,"SF Pro Rounded","Nunito",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--ink);background:var(--snow)}
body{display:flex;flex-direction:column;overflow:hidden}
.topbar{padding:calc(10px + var(--safe-top)) 12px 8px;background:var(--snow);box-shadow:0 2px 10px rgba(20,40,50,.08);z-index:1000;display:flex;flex-direction:column;gap:8px}
.brand{display:flex;align-items:center;gap:10px}
.brand-icon{width:36px;height:36px;border-radius:10px}
h1{font-size:1.2rem;margin:0;letter-spacing:.2px}
.byline{margin:0;font-size:.75rem;color:var(--muted)}
.search{display:flex;gap:6px}
.search input{flex:1;min-width:0;font:inherit;font-size:16px;padding:10px 14px;border:2px solid #e3e7e8;border-radius:999px;background:#fff;outline:none}
.search input:focus{border-color:var(--fjord)}
.search button{font:inherit;font-weight:700;padding:0 16px;border:0;border-radius:999px;background:var(--fjord);color:#fff;cursor:pointer}
.search button:active{background:var(--fjord-dark)}
.filters{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.chip{flex:none;position:relative;cursor:pointer;user-select:none}
.chip input{position:absolute;opacity:0;pointer-events:none}
.chip span{display:inline-block;padding:6px 12px;border-radius:999px;border:2px solid #e3e7e8;background:#fff;font-size:.85rem;font-weight:600}
.chip input:checked+span{background:#e6f3f3;border-color:var(--fjord);color:var(--fjord-dark)}
.chip input:focus-visible+span{outline:2px solid var(--fjord);outline-offset:2px}
#map{flex:1;min-height:0}
.status{position:fixed;left:50%;transform:translateX(-50%);top:calc(150px + var(--safe-top));z-index:1100;background:rgba(35,49,58,.88);color:#fff;padding:7px 14px;border-radius:999px;font-size:.85rem;pointer-events:none;opacity:0;transition:opacity .2s;max-width:90vw;text-align:center}
.status.show{opacity:1}
.status.error{background:#b8473a;pointer-events:auto;display:flex;align-items:center;gap:10px;border-radius:16px;text-align:left}
.status button{font:inherit;font-weight:800;font-size:.8rem;border:0;border-radius:999px;padding:6px 12px;background:#fff;color:#b8473a;cursor:pointer;flex:none}
.fab{position:fixed;right:14px;bottom:calc(26px + var(--safe-bottom));z-index:1100;font:inherit;font-weight:800;font-size:1rem;padding:14px 20px;border:0;border-radius:999px;background:var(--fjord);color:#fff;box-shadow:var(--shadow);cursor:pointer}
.fab:active{transform:scale(.97)}
.fab[disabled]{opacity:.7}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:1200;background:#fff;border-radius:22px 22px 0 0;box-shadow:0 -6px 24px rgba(20,40,50,.18);max-height:48vh;overflow:auto;padding:6px 14px calc(14px + var(--safe-bottom))}
.sheet-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:#fff;padding:8px 0}
.sheet h2{font-size:1.05rem;margin:0}
.icon-btn{border:0;background:#f0f3f4;border-radius:999px;width:34px;height:34px;font-size:1rem;cursor:pointer}
.nearest-list{list-style:none;margin:0;padding:0}
.nearest-list li{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid #eef1f2}
.nearest-list .rank{flex:none;width:30px;height:30px;border-radius:50%;background:var(--fjord);color:#fff;display:grid;place-items:center;font-weight:800}
.nearest-list .info{flex:1;min-width:0;cursor:pointer}
.nearest-list .name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nearest-list .meta{font-size:.8rem;color:var(--muted)}
.go{flex:none;text-decoration:none;font-weight:700;font-size:.85rem;background:#e6f3f3;color:var(--fjord-dark);padding:8px 12px;border-radius:999px}
/* markers */
.pin{width:30px;height:30px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);display:grid;place-items:center;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.3)}
.pin b{transform:rotate(45deg);color:#fff;font-size:10px;font-weight:800;font-family:system-ui,sans-serif}
.pin.free{background:var(--moss)} .pin.paid{background:var(--amber)} .pin.unknown{background:var(--stone)}
.pin.near{outline:3px solid #ffd54a;outline-offset:1px}
.me{width:18px;height:18px;border-radius:50%;background:#2a7de1;border:3px solid #fff;box-shadow:0 0 0 6px rgba(42,125,225,.25)}
.marker-cluster-small,.marker-cluster-medium,.marker-cluster-large{background-color:rgba(47,127,134,.25)}
.marker-cluster-small div,.marker-cluster-medium div,.marker-cluster-large div{background-color:rgba(47,127,134,.85);color:#fff;font-weight:800}
/* popup */
.leaflet-popup-content-wrapper{border-radius:14px}
.pop h3{margin:0 0 6px;font-size:1rem}
.pop ul{list-style:none;margin:0 0 8px;padding:0;font-size:.85rem;line-height:1.5}
.pop .links{display:flex;flex-wrap:wrap;gap:6px}
.pop .links a{text-decoration:none;font-weight:700;font-size:.8rem;background:#e6f3f3;color:var(--fjord-dark);padding:6px 10px;border-radius:999px}
.pop .osm{display:block;margin-top:6px;font-size:.72rem;color:var(--muted)}
.leaflet-control-attribution{font-size:10px}
@media (min-width:760px){
  .topbar{flex-direction:row;align-items:center;flex-wrap:wrap}
  .search{flex:1;max-width:460px}
  .status{top:calc(80px + var(--safe-top))}
  .sheet{left:auto;right:14px;bottom:90px;width:360px;border-radius:20px}
}
.legend{background:rgba(255,255,255,.92);border-radius:12px;padding:6px 10px;font-size:.75rem;font-weight:600;display:flex;gap:10px;box-shadow:0 2px 8px rgba(20,40,50,.15);margin-bottom:calc(8px + var(--safe-bottom))!important}
.legend span{display:flex;align-items:center;gap:4px}
.dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.dot.free{background:var(--moss)}.dot.paid{background:var(--amber)}.dot.unknown{background:var(--stone)}
@media (max-width:759px){.leaflet-bottom.leaflet-left{bottom:76px}}
/* --- v4: topp-knapper, offline, favoritter, om --- */
.brand-text{flex:1;min-width:0}
.top-actions{display:flex;gap:6px}
.top-btn{font:inherit;font-weight:700;font-size:.85rem;border:2px solid #e3e7e8;background:#fff;color:var(--fjord-dark);border-radius:999px;padding:6px 12px;cursor:pointer}
.top-btn.round{width:36px;height:36px;padding:0;font-family:Georgia,serif;font-style:italic;font-size:1.05rem}
.offline{background:#fff4d6;color:#6b4e00;border-radius:12px;padding:7px 12px;font-size:.85rem;font-weight:600}
.sheet-note{margin:0 0 6px;font-size:.82rem;color:var(--muted)}
.arrow{flex:none;width:34px;height:34px;border-radius:50%;background:#fff4d6;display:grid;place-items:center;font-size:18px;font-weight:900;color:#b06d00;transition:transform .25s ease-out}
.fav-btn{font:inherit;font-weight:700;font-size:.8rem;border:2px solid #f0c64a;background:#fffaf0;color:#8a6100;padding:5px 10px;border-radius:999px;cursor:pointer;margin-bottom:8px}
.fav-btn.on{background:#ffd54a;color:#4a3500}
.pin .star{position:absolute;top:-6px;right:-6px;transform:rotate(45deg);font-size:12px;color:#ffc400;text-shadow:0 0 2px #fff,0 0 2px #fff}
.pin{position:relative}
.about-body p{margin:6px 0 10px;font-size:.92rem;line-height:1.45}
.muted{color:var(--muted);font-size:.82rem!important}
.offline-box{background:#f2f8f8;border-radius:14px;padding:10px 12px;margin:8px 0 12px}
.pill-btn{font:inherit;font-weight:800;border:0;border-radius:999px;background:var(--fjord);color:#fff;padding:10px 16px;cursor:pointer}
.pill-btn[disabled]{opacity:.6}
.about-links a{color:var(--fjord-dark);font-weight:700}
.empty{padding:14px 0;color:var(--muted);font-size:.9rem}
.nearest-list .unfav{flex:none;border:0;background:none;font-size:1.2rem;color:#e0a800;cursor:pointer}
@media (max-width:380px){.top-btn .lbl{display:none}}
.mt-logo{display:block;line-height:0;margin-bottom:4px!important}.mt-logo img{width:84px;height:auto}
