#lyn-wrap-lokalt{
    --ly-ink:#122031;
    --ly-muted:#59677a;
    --ly-shell-bg:
      radial-gradient(920px 240px at 100% -60px, rgba(68, 121, 182, 0.12), transparent 52%),
      radial-gradient(780px 220px at -8% 100%, rgba(88, 128, 167, 0.08), transparent 56%),
      linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,248,252,0.96));
    --ly-shell-border:rgba(148,163,184,.24);
    --ly-shell-shadow:
      0 22px 42px rgba(15,23,42,.10),
      0 8px 20px rgba(15,23,42,.06),
      inset 0 1px 0 rgba(255,255,255,.7);
    --ly-head-bg:linear-gradient(135deg, rgba(255,244,231,.97), rgba(249,232,212,.95));
    --ly-head-border:rgba(191,141,92,.24);
    --ly-head-pill-bg:rgba(255,255,255,.78);
    --ly-head-pill-border:rgba(148,163,184,.24);
    --ly-head-pill-accent-bg:rgba(37,99,235,.10);
    --ly-head-pill-accent-border:rgba(37,99,235,.24);
    --ly-map-bg:#edf3fb;
    --ly-map-border:rgba(148,163,184,.18);
    --panel-bg:rgba(255,255,255,.84);
    --panel-border:rgba(148,163,184,.24);
    --ly-panel-shadow:0 18px 34px rgba(15,23,42,.14), inset 0 1px 0 rgba(255,255,255,.68);
    --ly-field-bg:#eef9f0;
    --ly-field-border:rgba(109,155,125,.28);
    --ly-count-bg:linear-gradient(180deg, rgba(221,235,253,.96), rgba(203,224,250,.96));
    --ly-count-border:rgba(59,130,246,.26);
    --ly-legend-pill-bg:linear-gradient(180deg, rgba(241,245,249,.96), rgba(229,236,244,.96));
    --ly-legend-pill-border:rgba(148,163,184,.24);
    --text:var(--ly-ink);
    --chip:#e7ecf8;
    --ic:#287EFF;
    --cg:#FF4B4B;
    --super:#FFD54A;
    --poly:#111;
    --btn:#0d6efd;
    --btn-hover:#0b5ed7;
    --shadow:0 16px 30px rgba(15,23,42,.14);
    --zoom-col:48px;
    color-scheme:light;
    font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Noto Sans",sans-serif;
    color:var(--text);
    display:grid;
    gap:.95rem;
    width:100%;
    max-width:none;
    margin:0;
  }
  :root[data-theme="dark"] #lyn-wrap-lokalt{
    --ly-ink:#e5edf5;
    --ly-muted:#b9c5d4;
    --ly-shell-bg:
      radial-gradient(980px 260px at 100% -70px, rgba(93, 132, 178, 0.18), transparent 54%),
      radial-gradient(760px 220px at -10% 100%, rgba(36, 77, 118, 0.12), transparent 56%),
      linear-gradient(180deg, rgba(20,24,29,0.98), rgba(15,19,24,0.96));
    --ly-shell-border:rgba(148,163,184,.18);
    --ly-shell-shadow:
      0 26px 50px rgba(0,0,0,.30),
      0 12px 26px rgba(0,0,0,.16),
      inset 0 1px 0 rgba(255,255,255,.04);
    --ly-head-bg:linear-gradient(135deg, rgba(24,29,34,.97), rgba(18,23,28,.94));
    --ly-head-border:rgba(148,163,184,.18);
    --ly-head-pill-bg:rgba(255,255,255,.06);
    --ly-head-pill-border:rgba(148,163,184,.22);
    --ly-head-pill-accent-bg:rgba(59,130,246,.18);
    --ly-head-pill-accent-border:rgba(96,165,250,.30);
    --ly-map-bg:#11161d;
    --ly-map-border:rgba(148,163,184,.16);
    --panel-bg:linear-gradient(180deg, rgba(24,29,34,.94), rgba(18,23,28,.92));
    --panel-border:rgba(148,163,184,.24);
    --ly-panel-shadow:0 20px 36px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.05);
    --ly-field-bg:linear-gradient(180deg, rgba(47,53,58,.96), rgba(37,43,48,.96));
    --ly-field-border:rgba(132,184,149,.28);
    --ly-count-bg:linear-gradient(180deg, rgba(22,47,90,.90), rgba(18,38,72,.90));
    --ly-count-border:rgba(96,165,250,.34);
    --ly-legend-pill-bg:linear-gradient(180deg, rgba(24,29,34,.94), rgba(18,23,28,.92));
    --ly-legend-pill-border:rgba(148,163,184,.22);
    --chip:#1d2535;
    --ic:#287EFF;
    --cg:#FF4B4B;
    --super:#ffe37a;
    --poly:#111;
    --btn:#3b82f6;
    --btn-hover:#2563eb;
    --shadow:0 20px 34px rgba(0,0,0,.28);
    color-scheme:dark;
  }
  @media (prefers-color-scheme:dark){
    :root:not([data-theme]) #lyn-wrap-lokalt{
      --ly-ink:#e5edf5;
      --ly-muted:#b9c5d4;
      --ly-shell-bg:
        radial-gradient(980px 260px at 100% -70px, rgba(93, 132, 178, 0.18), transparent 54%),
        radial-gradient(760px 220px at -10% 100%, rgba(36, 77, 118, 0.12), transparent 56%),
        linear-gradient(180deg, rgba(20,24,29,0.98), rgba(15,19,24,0.96));
      --ly-shell-border:rgba(148,163,184,.18);
      --ly-shell-shadow:
        0 26px 50px rgba(0,0,0,.30),
        0 12px 26px rgba(0,0,0,.16),
        inset 0 1px 0 rgba(255,255,255,.04);
      --ly-head-bg:linear-gradient(135deg, rgba(24,29,34,.97), rgba(18,23,28,.94));
      --ly-head-border:rgba(148,163,184,.18);
      --ly-head-pill-bg:rgba(255,255,255,.06);
      --ly-head-pill-border:rgba(148,163,184,.22);
      --ly-head-pill-accent-bg:rgba(59,130,246,.18);
      --ly-head-pill-accent-border:rgba(96,165,250,.30);
      --ly-map-bg:#11161d;
      --ly-map-border:rgba(148,163,184,.16);
      --panel-bg:linear-gradient(180deg, rgba(24,29,34,.94), rgba(18,23,28,.92));
      --panel-border:rgba(148,163,184,.24);
      --ly-panel-shadow:0 20px 36px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.05);
      --ly-field-bg:linear-gradient(180deg, rgba(47,53,58,.96), rgba(37,43,48,.96));
      --ly-field-border:rgba(132,184,149,.28);
      --ly-count-bg:linear-gradient(180deg, rgba(22,47,90,.90), rgba(18,38,72,.90));
      --ly-count-border:rgba(96,165,250,.34);
      --ly-legend-pill-bg:linear-gradient(180deg, rgba(24,29,34,.94), rgba(18,23,28,.92));
      --ly-legend-pill-border:rgba(148,163,184,.22);
      --chip:#1d2535;
      --ic:#287EFF;
      --cg:#FF4B4B;
      --super:#ffe37a;
      --poly:#111;
      --btn:#3b82f6;
      --btn-hover:#2563eb;
      --shadow:0 20px 34px rgba(0,0,0,.28);
      color-scheme:dark;
    }
  }

  .ly-page-shell{
    display:flex;
    flex-direction:column;
    gap:1rem;
    padding:clamp(.9rem,2vw,1.15rem) 0 0;
    border-radius:20px;
    border:1px solid var(--ly-shell-border);
    background:var(--ly-shell-bg);
    box-shadow:var(--ly-shell-shadow);
    overflow:hidden;
  }
  .ly-page-head{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0;
    width:100%;
    padding:0 clamp(.9rem,2vw,1.15rem);
    box-sizing:border-box;
    border:0;
    background:none;
    text-align:center;
  }
  #lyn-wrap-lokalt h1{
    margin:0;
    text-align:center;
    font-size:clamp(1.18rem,2.2vw,1.62rem);
    line-height:1.04;
    font-weight:800;
    color:var(--text);
  }
  #map{
    width:100%;
    height:clamp(480px,82vh,88vh);
    min-height:480px;
    border-radius:18px;
    overflow:hidden;
    box-shadow:var(--shadow);
    background:var(--ly-map-bg);
    border:1px solid var(--ly-map-border);
    position:relative;
  }

  /* --- Z-INDEX FIXES --- */
  /* Keep Leaflet popups above our UI */
  .leaflet-pane.leaflet-popup-pane { z-index: 1200 !important; }

  /* Put our UI under the drawer, but over markers/overlays */
  /* (Leaflet panes: markers ~600, tooltip 650, popup 700) */
  .panel  { z-index: 650; }   /* was 1001 */
  .legend { z-index: 640; }   /* was 1000 */

  /* Panel: top-left, to the right of zoom controls */
  .panel{
    position:relative;
    inset:auto;
    background:
      linear-gradient(180deg, rgba(8, 13, 23, 0.48), rgba(8, 13, 23, 0.68)),
      url("/images/lightning-fjord-panel.webp?v=20260429") center center / 100% 112% no-repeat,
      var(--ly-head-bg);
    border:1px solid var(--ly-head-border);
    border-radius:16px;
    backdrop-filter:saturate(160%) blur(10px);
    box-shadow:var(--ly-panel-shadow);
    padding:.44rem .58rem .5rem;
    display:grid;
    grid-template-columns:max-content max-content max-content;
    gap:.24rem .34rem;
    align-items:end;
    justify-content:center;
    width:100%;
    max-width:none;
    margin:0 auto;
  }
  .panel-title{
    grid-column:1 / -1;
    padding:0 0 .08rem;
  }
  .panel-title h1{
    color:#f8fafc !important;
    text-shadow:0 2px 8px rgba(0,0,0,.78);
  }
  .panel-lead{
    max-width:34rem;
    margin:.18rem auto 0;
    color:rgba(248,250,252,.84);
    font-size:.68rem;
    line-height:1.24;
    text-align:center;
    text-shadow:0 1px 5px rgba(0,0,0,.72);
  }
  .row{display:contents;}
  .hdr{
    font-size:.62rem;
    font-weight:800;
    letter-spacing:.1em;
    text-transform:uppercase;
    color:rgba(248,250,252,.88);
    text-align:left;
    justify-self:start;
    text-shadow:0 1px 5px rgba(0,0,0,.72);
  }
  .hdr--empty{
    visibility:hidden;
  }

  .count{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:1.95rem;
    background:var(--ly-count-bg);
    color:var(--text);
    padding:.14rem .54rem;
    border-radius:999px;
    font-weight:800;
    font-size:.78rem;
    border:1px solid var(--ly-count-border);
    justify-self:end;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.2);
  }
  .count[aria-busy="true"]{opacity:.65}
  .count--map{
    position:absolute;
    top:0;
    right:calc(100% + .18rem);
    min-height:1.72rem;
    min-width:4.9rem;
    padding:.12rem .5rem;
    font-size:.74rem;
    justify-self:auto;
    white-space:nowrap;
    box-shadow:0 10px 18px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.22);
  }

  .panel select{
    min-width:0;
    width:auto;
    min-height:2.18rem;
    margin-top:-1px;
    padding:.28rem .58rem;
    border-radius:.72rem;
    border:1px solid var(--ly-field-border);
    background:var(--ly-field-bg) !important;
    color:var(--text) !important;
    font-size:.88rem;
    font-weight:600;
    line-height:1.1;
    color:var(--text);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  }
  .sr-only{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0, 0, 0, 0) !important;
    white-space:nowrap !important;
    border:0 !important;
  }
  .panel select option{
    background:#fff;
    color:#0f172a;
  }
  .panel select option:checked,
  .panel select option:hover{
    background:#f8fafc;
    color:#0f172a;
  }
  :root[data-theme="dark"] #lyn-wrap-lokalt .panel select option{
    background:#f8fafc !important;
    color:#11161b !important;
  }
  :root[data-theme="dark"] #lyn-wrap-lokalt .panel select option:checked,
  :root[data-theme="dark"] #lyn-wrap-lokalt .panel select option:hover{
    background:rgb(226, 232, 240) !important;
    color:#11161b !important;
  }
  #typeSel{min-width:6.2rem;}
  #timeSel{min-width:8.1rem;}

  .panel button{
    min-height:2.18rem;
    margin-top:-1px;
    padding:.3rem .72rem;
    border:1px solid color-mix(in oklab, var(--btn) 26%, transparent);
    border-radius:.78rem;
    background:linear-gradient(180deg, color-mix(in oklab, var(--btn) 82%, #fff), var(--btn));
    color:#fff;
    font-weight:700;
    font-size:.88rem;
    cursor:pointer;
    box-shadow:0 10px 18px color-mix(in oklab, var(--btn) 22%, transparent);
    justify-self:end;
  }
  .panel button:hover{background:var(--btn-hover)}
  .panel button:disabled{opacity:.74;cursor:wait}

  /* Legend: top-right */
  .legend{
    position:absolute;
    inset:10px 10px auto auto;
    width:max-content;
    max-width:calc(100% - 20px);
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:.18rem;
    pointer-events:none;
  }
  .lg-row{
    display:inline-flex;
    align-items:center;
    gap:.38rem;
    min-height:1.72rem;
    width:100%;
    max-width:100%;
    padding:.24rem .58rem;
    box-sizing:border-box;
    border-radius:999px;
    border:1px solid var(--ly-legend-pill-border);
    background:var(--ly-legend-pill-bg);
    box-shadow:0 14px 26px rgba(15,23,42,.12);
    font-size:.8rem;
    font-weight:600;
    line-height:1.1;
    justify-content:flex-start;
  }
  .lg-label{
    flex:1 1 auto;
    min-width:0;
    text-align:left;
  }
  .lg-side{
    flex:0 0 auto;
    margin-left:auto;
    text-align:right;
    white-space:nowrap;
  }
  .sw{width:14px;height:14px;border-radius:50%; position:relative; overflow:hidden}
  .sw.ic{background:var(--ic)} .sw.cg{background:var(--cg)}
  .sw.super{
    background:center/100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.4' fill='%23ffd84a' stroke='%23fff4b8' stroke-width='1'/%3E%3Ccircle cx='5.2' cy='5.1' r='2.2' fill='%23fff8bf' fill-opacity='.94'/%3E%3C/svg%3E");
    border:none;
    box-shadow:
      0 0 0 1px rgba(92,68,0,.22),
      0 0 10px 2px color-mix(in oklab, #ffe15a 72%, transparent);
  }

  @media (min-width:970px){
    .legend{
      inset:10px auto auto 56px;
      align-items:flex-start;
    }
    .legend .count--map{
      right:auto;
      left:calc(100% + .28rem);
    }
  }

  /* Optional superbolt pulse ring (used by JS) */
  .sb-pulse{pointer-events:none}
  .sb-pulse .ring{
    position:absolute; left:-14px; top:-14px; width:28px; height:28px; border-radius:50%;
    border:2px solid var(--super); opacity:.9; transform-origin:center;
    animation:sb-p 1.8s ease-out forwards;
  }
  @keyframes sb-p{ 0%{transform:scale(.6);opacity:.9} 70%{transform:scale(2.3);opacity:.25} 100%{transform:scale(2.6);opacity:0} }
  @media (prefers-reduced-motion:reduce){ .sb-pulse .ring{animation:none;opacity:.55} }

  /* ---------- Popup card ---------- */
  .leaflet-popup-content-wrapper{
    border-radius:18px;
    border:1px solid rgba(245,158,11,.54);
    background:#070604;
    box-sizing:border-box;
    overflow:visible;
    box-shadow:
      0 24px 48px rgba(2,6,23,.58),
      0 0 0 1px rgba(255,196,99,.08),
      inset 0 1px 0 rgba(255,255,255,.08);
  }
  .leaflet-popup-tip{
    background:#0b0702;
    box-shadow:-1px 1px 0 rgba(245,158,11,.44);
  }
  .leaflet-popup-close-button{
    position:absolute;
    top:-12px;
    right:-12px;
    z-index:5;
    width:28px;
    height:28px;
    border:1px solid rgba(255,190,86,.74) !important;
    border-radius:50%;
    background:linear-gradient(180deg, rgba(26,18,8,.96), rgba(8,6,4,.96));
    color:#ffe6b0 !important;
    font-size:17px !important;
    font-weight:700;
    line-height:26px !important;
    text-align:center;
    box-sizing:border-box;
    padding:0 !important;
    text-decoration:none;
    box-shadow:
      0 8px 18px rgba(0,0,0,.36),
      0 0 14px rgba(245,158,11,.22),
      inset 0 1px 0 rgba(255,255,255,.14);
  }
  .leaflet-popup-close-button:hover{
    color:#fff !important;
    background:#2a1705;
    border-color:#ffd071 !important;
  }
  .leaflet-popup-close-button:focus-visible{
    outline:2px solid #ffd071;
    outline-offset:1px;
  }
  .leaflet-popup-content{
    margin:0;
    width:clamp(286px, 58vw, 400px);
    max-width:calc(100vw - 58px);
    font-size:1rem;
    line-height:1.36;
    box-sizing:border-box;
    overflow:hidden;
    border-radius:17px;
  }
  .ly-popup{
    --accent: var(--cg);
    --theme-accent:#f59e0b;
    --theme-edge:#ff7a18;
    --theme-glow:rgba(245,158,11,.38);
    --theme-current:#ff7565;
    --theme-soft:rgba(245,158,11,.13);
    --theme-text:#fff7ea;
    --theme-muted:#ffd28a;
    width:100%;
    max-width:100%;
    position:relative;
    container:lyn-popup / inline-size;
    border-radius:17px;
    padding:.72rem;
    box-sizing:border-box;
    overflow:hidden;
    color:var(--theme-text);
    background:
      linear-gradient(90deg, rgba(8,7,7,.95) 0%, rgba(8,7,7,.86) 39%, rgba(8,7,7,.40) 68%, rgba(8,7,7,.78) 100%),
      linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.20) 42%, rgba(0,0,0,.88) 88%),
      url("/images/lightning-popup-storm-v2.webp?v=20260613") 66% center / auto 100% no-repeat,
      #090704;
    border:1px solid rgba(245,158,11,.32);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.10),
      inset 0 -1px 0 rgba(255,190,86,.10);
  }
  .ly-popup.is-ic{
    --theme-accent:#38bdf8;
    --theme-edge:#0ea5e9;
    --theme-glow:rgba(56,189,248,.38);
    --theme-current:#9ad8ff;
    --theme-soft:rgba(56,189,248,.14);
    --theme-muted:#a8e4ff;
    background:
      linear-gradient(90deg, rgba(2,12,21,.95) 0%, rgba(3,19,33,.86) 39%, rgba(3,23,39,.40) 68%, rgba(2,12,21,.78) 100%),
      linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.20) 42%, rgba(0,0,0,.88) 88%),
      url("/images/lightning-popup-storm-v2.webp?v=20260613") 66% center / auto 100% no-repeat,
      #03111d;
    border-color:rgba(56,189,248,.32);
  }
  .ly-popup.is-super{
    --theme-accent:#ffd54a;
    --theme-edge:#f59e0b;
    --theme-glow:rgba(255,213,74,.42);
    --theme-current:#ffe879;
  }
  .ly-popup::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    pointer-events:none;
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.06),
      inset 0 0 34px rgba(255,140,24,.08);
  }
  .ly-popup::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:linear-gradient(180deg, rgba(255,185,72,.08), transparent 24%, transparent 72%, rgba(0,0,0,.28));
    mix-blend-mode:screen;
    opacity:.65;
  }
  .ly-popup .head{
    position:relative;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.85rem;
    margin:0;
    padding:.03rem .06rem .56rem;
    background:linear-gradient(180deg, rgba(0,0,0,.08), transparent);
  }
  .ly-popup .summary{
    display:flex;
    align-items:center;
    min-width:0;
    gap:.72rem;
  }
  .ly-popup .bolt{
    flex:0 0 auto;
    width:46px;
    height:46px;
    border-radius:11px;
    display:grid;
    place-items:center;
    font-size:2.25rem;
    font-weight:900;
    color:#f97316;
    background:linear-gradient(180deg, #fff2a4 0%, #ffd348 55%, #f59e0b 100%);
    border:1px solid rgba(255,226,128,.72);
    transform:skew(-5deg);
    text-shadow:
      0 0 10px rgba(255,184,53,.54),
      0 6px 18px rgba(0,0,0,.52);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.66),
      0 0 20px rgba(245,158,11,.34),
      0 10px 22px rgba(0,0,0,.34);
  }
  .ly-popup .kA-row{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:.5rem;
    row-gap:3px;
    position:relative;
    min-height:1.62rem;
  }
  .ly-popup .kA{
    font:950 1.72rem/1 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Noto Sans",sans-serif;
    letter-spacing:0;
    color:var(--theme-current);
    text-shadow:
      0 1px 0 rgba(0,0,0,.70),
      0 0 15px var(--theme-glow);
  }
  .ly-popup.is-cg .kA{ color:var(--theme-current); }
  .ly-popup.is-ic .kA{ color:var(--theme-current); }
  .ly-popup .sb-tag{
    display:inline-flex;
    align-items:center;
    padding:2px 8px;
    border-radius:999px;
    font:900 .7rem/1 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Noto Sans",sans-serif;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:#6e4300;
    border:1px solid #d8a313;
    background:linear-gradient(180deg, #fff7c8 0%, #ffd860 100%);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.65),
      0 0 10px rgba(255,204,77,.35);
    margin-top:1px;
  }
  .ly-popup.is-super .kA-row .sb-tag{
    position:static;
    transform:none;
    margin-top:0;
    white-space:nowrap;
  }
  .ly-popup .sub{
    font-size:1.02rem;
    line-height:1.05;
    color:#fff7ea;
    margin-top:.1rem;
    font-weight:800;
    text-shadow:0 2px 10px rgba(0,0,0,.66);
  }
  .ly-popup .text{ min-width:0; }
  .ly-popup .chip{
    flex:0 0 auto;
    font-weight:900;
    border-radius:999px;
    padding:.34rem .68rem;
    font-size:.82rem;
    line-height:1;
    background:rgba(7,6,4,.48);
    color:#fff7ea;
    border:1px solid var(--theme-accent);
    box-shadow:
      0 0 12px var(--theme-glow),
      inset 0 1px 0 rgba(255,255,255,.12);
  }
  .ly-popup .place-block{
    position:relative;
    z-index:2;
    padding:.46rem .58rem .32rem;
    border:1px solid rgba(245,158,11,.28);
    border-radius:10px 10px 0 0;
    background:linear-gradient(180deg, rgba(10,8,5,.58), rgba(10,8,5,.40));
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.06),
      0 8px 22px rgba(0,0,0,.18);
  }
  .ly-popup .section-label{
    display:flex;
    align-items:center;
    gap:.34rem;
    margin:0 0 .38rem;
    color:var(--theme-accent);
    font-size:.66rem;
    font-weight:900;
    letter-spacing:.06em;
    line-height:1;
    text-transform:uppercase;
    text-shadow:0 0 10px var(--theme-glow);
  }
  .ly-popup .section-label::before{
    content:"";
    width:.58rem;
    height:.58rem;
    border-radius:50% 50% 50% 0;
    background:var(--theme-accent);
    transform:rotate(-45deg);
    box-shadow:0 0 10px var(--theme-glow);
  }
  .ly-popup .place-list{
    display:grid;
    grid-template-columns:1fr;
    gap:0;
  }
  .ly-popup .place-row{
    display:grid;
    grid-template-columns:auto minmax(0, 1fr) auto;
    align-items:center;
    gap:.48rem;
    min-width:0;
    padding:.22rem 0;
    border-top:1px solid rgba(245,158,11,.15);
  }
  .ly-popup .place-row:first-child{
    border-top:0;
    padding-top:0;
  }
  .ly-popup .place-icon{
    width:.82rem;
    height:.82rem;
    align-self:center;
    background:linear-gradient(180deg, #c6e67b 0%, var(--theme-accent) 100%);
    clip-path:polygon(50% 4%, 98% 84%, 64% 84%, 64% 96%, 36% 96%, 36% 84%, 2% 84%);
    filter:drop-shadow(0 0 7px var(--theme-glow));
  }
  .ly-popup .place-name{
    min-width:0;
    overflow-wrap:normal;
    word-break:normal;
    hyphens:none;
    color:#fff8eb;
    font-size:.84rem;
    font-weight:800;
    text-shadow:0 1px 8px rgba(0,0,0,.64);
  }
  .ly-popup .place-row.is-primary .place-name{
    color:#fff;
    font-size:.88rem;
    font-weight:950;
  }
  .ly-popup .place-type{
    color:#f7d79d;
    font-weight:750;
  }
  .ly-popup .place-distance{
    color:#fff4d8;
    font-size:.8rem;
    font-weight:900;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  .ly-popup .stats{
    position:relative;
    z-index:2;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:0;
    margin:0;
    border-top:1px solid rgba(245,158,11,.24);
    border-inline:1px solid rgba(245,158,11,.34);
    border-bottom:1px solid rgba(245,158,11,.34);
    background:rgba(7,5,2,.72);
  }
  .ly-popup .stat{
    min-width:0;
    padding:.48rem .58rem .46rem;
    border-top:1px solid rgba(245,158,11,.16);
    border-inline-end:1px solid rgba(245,158,11,.20);
    display:grid;
    grid-template-columns:auto minmax(0, 1fr);
    grid-template-areas:
      "icon label"
      "icon value";
    gap:.08rem .48rem;
    align-items:center;
  }
  .ly-popup .stat:nth-child(2n){
    border-inline-end:0;
  }
  .ly-popup .head + .stats{
    border-radius:10px 10px 0 0;
  }
  .ly-popup .stat dt{
    grid-area:label;
    display:flex;
    align-items:center;
    margin:0;
    color:var(--theme-accent);
    font-size:.62rem;
    font-weight:900;
    letter-spacing:.06em;
    line-height:1.1;
    text-transform:uppercase;
  }
  .ly-popup .stat-icon{
    grid-area:icon;
    place-self:center;
    width:1.46rem;
    height:1.46rem;
    background:linear-gradient(180deg, #c7f36b 0%, var(--theme-accent) 100%);
    filter:drop-shadow(0 0 8px var(--theme-glow));
    -webkit-mask:var(--stat-mask) center / contain no-repeat;
    mask:var(--stat-mask) center / contain no-repeat;
  }
  .ly-popup .stat--terrain{
    --stat-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 2 6 16h5L4 26h9v5h6v-5h9l-7-10h5L16 2Z'/%3E%3C/svg%3E");
  }
  .ly-popup .stat--height{
    --stat-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='m2 27 10-18 5 7 4-6 9 17H2Zm10.4-11.5L7.2 25h14.6l-5.3-9-3 4.2-1.1-4.7Z'/%3E%3C/svg%3E");
  }
  .ly-popup .stat--accuracy{
    --stat-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M14 1h4v4.2A11 11 0 0 1 26.8 14H31v4h-4.2A11 11 0 0 1 18 26.8V31h-4v-4.2A11 11 0 0 1 5.2 18H1v-4h4.2A11 11 0 0 1 14 5.2V1Zm2 8a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm0 4a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E");
  }
  .ly-popup .stat--sensors{
    --stat-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M14 13h4v18h-4V13Zm-6.8 1.8a12.5 12.5 0 0 1 17.6 0L22 17.6a8.5 8.5 0 0 0-12 0l-2.8-2.8Zm-5.7-5.7a20.5 20.5 0 0 1 29 0l-2.8 2.8a16.5 16.5 0 0 0-23.4 0L1.5 9.1Zm11.4 11.4a4.5 4.5 0 0 1 6.2 0L16 23.6l-3.1-3.1Z'/%3E%3C/svg%3E");
  }
  .ly-popup .stat dd{
    grid-area:value;
    margin:0;
    min-width:0;
    color:#fffaf1;
    font-size:.9rem;
    font-weight:800;
    overflow-wrap:anywhere;
    text-shadow:0 1px 8px rgba(0,0,0,.64);
  }
  .ly-popup .stat.is-strong dd{
    color:#fff;
  }
  .ly-popup .mono{
    font-variant-numeric:tabular-nums;
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    white-space:nowrap;
    letter-spacing:0;
    color:#fff8ea;
  }
  .ly-popup .popup-footer{
    position:relative;
    z-index:2;
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
    align-items:start;
    gap:.58rem;
    padding:.5rem .58rem;
    border:1px solid rgba(245,158,11,.34);
    border-top:0;
    border-radius:0 0 9px 9px;
    background:rgba(7,5,2,.78);
  }
  .ly-popup .coord-line{
    min-width:0;
    display:grid;
    grid-template-columns:auto minmax(0, 1fr);
    grid-template-areas:"icon copy";
    column-gap:.42rem;
    align-items:start;
    justify-content:stretch;
    text-align:left;
  }
  .ly-popup .footer-icon{
    flex:0 0 auto;
    width:1.8rem;
    height:1.8rem;
    background:linear-gradient(180deg, #ffcf5a, var(--theme-accent));
    filter:drop-shadow(0 0 9px var(--theme-glow));
    -webkit-mask:var(--footer-mask) center / contain no-repeat;
    mask:var(--footer-mask) center / contain no-repeat;
  }
  .ly-popup .footer-icon--pin{
    grid-area:icon;
    transform:none;
    --footer-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 1C9.9 1 5 5.9 5 12c0 8.8 11 19 11 19s11-10.2 11-19C27 5.9 22.1 1 16 1Zm0 15.5A4.5 4.5 0 1 1 16 7a4.5 4.5 0 0 1 0 9.5Z'/%3E%3C/svg%3E");
  }
  .ly-popup .footer-copy{
    grid-area:copy;
    min-width:0;
    display:grid;
    justify-items:start;
    gap:.07rem;
  }
  .ly-popup .footer-label{
    color:var(--theme-accent);
    font-size:.62rem;
    font-weight:900;
    letter-spacing:.06em;
    line-height:1.1;
    text-transform:uppercase;
  }
  .ly-popup .coord-value{
    font-size:.72rem;
    line-height:1.08;
  }
  .ly-popup .dt{
    display:grid;
    grid-template-columns:auto minmax(0, 1fr);
    grid-template-areas:
      "icon time"
      "icon clock"
      ". rel";
    column-gap:.42rem;
    row-gap:.07rem;
    align-items:start;
    justify-items:start;
    justify-self:stretch;
    min-width:0;
    border:0;
    border-radius:0;
    background:none;
    color:#ffe7b5;
    font-size:.74rem;
    line-height:1.15;
    white-space:normal;
    overflow:visible;
    text-align:left;
  }
  .ly-popup .dt::before{
    content:"";
    grid-area:icon;
    width:1.14rem;
    height:1.14rem;
    justify-self:center;
    align-self:start;
    background:var(--theme-accent);
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 4a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm-1.5 3h3v7.2l5 3-1.5 2.6-6.5-3.9V9Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 4a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm-1.5 3h3v7.2l5 3-1.5 2.6-6.5-3.9V9Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .ly-popup .time-main{
    grid-area:time;
    min-width:0;
    padding:0;
    overflow:visible;
    justify-self:start;
    text-align:left;
    text-overflow:clip;
    white-space:nowrap;
  }
  .ly-popup .time-main::before{
    content:none;
  }
  .ly-popup .time-clock{
    grid-area:clock;
    min-width:0;
    justify-self:start;
    color:#fff8ea;
    text-align:left;
    white-space:nowrap;
  }
  .ly-popup .time-rel{
    grid-area:rel;
    align-self:start;
    display:block;
    justify-self:start;
    padding:0;
    border-top:0;
    border-inline-start:0;
    color:#fff1cb;
    background:none;
    text-align:left;
    white-space:nowrap;
  }
  @container lyn-popup (min-width: 430px){
    .ly-popup .popup-footer{
      grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
      align-items:start;
      gap:.7rem;
    }
    .ly-popup .dt{
      justify-self:stretch;
      margin-inline-start:0;
    }
    .ly-popup .time-rel{
      border-inline-start:0;
    }
  }
  @container lyn-popup (min-width: 680px){
    .ly-popup .head{
      padding-block-end:1.72rem;
    }
    .ly-popup .place-list{
      grid-template-columns:repeat(3, minmax(0, 1fr));
    }
    .ly-popup .place-row{
      align-items:center;
      padding-inline-end:.45rem;
      border-inline-end:1px solid rgba(245,158,11,.18);
    }
    .ly-popup .place-row:last-child{
      border-inline-end:0;
      padding-inline-end:0;
    }
    .ly-popup .stats{
      grid-template-columns:repeat(4, minmax(0, 1fr));
    }
    .ly-popup .stat{
      border-top:0;
    }
    .ly-popup .stat:nth-child(2n){
      border-inline-end:1px solid rgba(245,158,11,.20);
    }
    .ly-popup .stat:last-child{
      border-inline-end:0;
    }
    .ly-popup .popup-footer{
      grid-template-columns:minmax(0, .95fr) minmax(270px, 1.05fr);
      align-items:center;
    }
  }
  @media (max-width:420px){
    .leaflet-popup-content{
      width:calc(100vw - 58px);
    }
    .ly-popup{
      padding:.76rem;
    }
    .ly-popup .head{
      gap:.58rem;
      padding-block-end:.9rem;
    }
    .ly-popup .bolt{
      width:42px;
      height:42px;
      font-size:2.35rem;
    }
    .ly-popup .kA{
      font-size:1.72rem;
    }
    .ly-popup .sub{
      font-size:1.02rem;
    }
    .ly-popup .chip{
      padding:.34rem .62rem;
      font-size:.82rem;
    }
    .ly-popup .place-block,
    .ly-popup .stat,
    .ly-popup .popup-footer{
      padding-inline:.58rem;
    }
    .ly-popup .stat-icon,
    .ly-popup .footer-icon{
      width:1.48rem;
      height:1.48rem;
    }
    .ly-popup .popup-footer{
      grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
      justify-items:stretch;
      column-gap:.46rem;
    }
    .ly-popup .coord-line{
      justify-content:stretch;
      text-align:left;
    }
    .ly-popup .footer-copy{
      justify-items:start;
    }
    .ly-popup .dt{
      grid-template-columns:auto minmax(0, 1fr);
      grid-template-areas:
        "icon time"
        "icon clock"
        ". rel";
      justify-items:start;
      justify-self:stretch;
      margin-inline-start:0;
      text-align:left;
    }
    .ly-popup .time-main{
      justify-self:start;
      text-align:left;
    }
    .ly-popup .time-clock{
      justify-self:start;
      text-align:left;
    }
    .ly-popup .time-rel{
      border-inline-start:0;
      border-top:0;
      justify-self:start;
      text-align:left;
    }
  }
  @media (max-width:700px){
    .ly-page-head{
      align-items:center;
      text-align:center;
    }
    #lyn-wrap-lokalt h1{
      text-align:center;
    }
  }
  @media (max-width:540px){
    #lyn-wrap-lokalt{
      gap:.8rem;
    }
    .ly-page-shell{
      padding:.8rem 0 0;
    }
    .ly-page-head{
      gap:0;
      padding:0 .8rem;
    }
    .panel{
      width:100%;
      padding:.56rem .6rem;
      gap:.32rem .36rem;
      grid-template-columns:max-content max-content max-content;
    }
    .hdr{
      font-size:.64rem;
    }
    .count{
      min-height:1.82rem;
      padding:.1rem .48rem;
      font-size:.74rem;
    }
    .count--map{
      min-height:1.58rem;
      min-width:4.5rem;
      padding:.08rem .42rem;
      font-size:.7rem;
    }
    .panel select{
      min-height:2.02rem;
      margin-top:-1px;
      padding:.24rem .5rem;
      font-size:.84rem;
    }
    .panel button{
      min-height:2.02rem;
      margin-top:-1px;
      padding:.24rem .62rem;
      font-size:.84rem;
    }
    .legend{
      inset:10px 10px auto auto;
    }
    .lg-row{
      font-size:.76rem;
      padding:.22rem .5rem;
    }
  }
