:root{
  --bg:#0b1220;
  --ink:#000000;
  --muted:#000000;

  /* Liquid Glass */
  --radius: 15px;
  --tint-color: 255, 255, 255;
  --tint-opacity: 0.25;
  --frost-blur: 6px;
  --shadow-color:#ffffff;
  --shadow-blur: 2px;
  --shadow-spread: 0px;
  --shadow-offset: 0px 0px;
  --outer-shadow-blur: 10px;
  --accent:#4da3ff;
  --border-legacy:#1f2a44;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* GLOBAL */
[hidden]{ display:none !important; }
html,body,#map{height:100%;width:100%;margin:0}
html,body{
  overflow:hidden;
  overscroll-behavior: none;
}
body{
  background:var(--bg);
  color:var(--ink);
  font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
}


/* NAVBAR */
.navbar{
  position:absolute;
  top:calc(8px + var(--safe-top));
  left:calc(8px + var(--safe-left));
  right:calc(8px + var(--safe-right));
  z-index:1100;
  display:flex; align-items:center; gap:12px;
  padding:6px 14px; border-radius:var(--radius);
  touch-action: manipulation;
  overscroll-behavior: contain;
}
.navbar .brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  font-size:15px; /* desktop */
}

@media (max-width: 480px){
  .navbar .brand{ font-size:12px; }
}
@media (max-width: 360px){
  .navbar .brand{ font-size:12px; }
}
.navbar .spacer{flex:1}
select,.btn{
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .06));
  color:var(--ink);
  border:1px solid rgba(255,255,255,0.16);
  border-radius:16px; padding:6px 10px;
  -webkit-backdrop-filter: blur(calc(var(--frost-blur) * .9));
  backdrop-filter:         blur(calc(var(--frost-blur) * .9));
}
.btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px }

/* PANEL LEWY */
.panel{
  position:absolute;
  left:calc(8px + var(--safe-left));
  top:calc(64px + var(--safe-top));
  width:380px;
  z-index:1250;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:var(--radius);
  max-height:calc(100vh - 64px - var(--safe-top) - 16px - var(--safe-bottom));
  margin-bottom:calc(8px + var(--safe-bottom));
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  pointer-events:none;
  visibility:hidden;
  opacity:0;
  transform:translateX(calc(-100% - 24px));
  transition:transform .26s ease, opacity .2s ease, visibility 0s linear .26s;
}
.panel.is-open{
  pointer-events:auto;
  visibility:visible;
  opacity:1;
  transform:translateX(0);
  transition:transform .26s ease, opacity .2s ease;
}

.panel header{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,0.12)}
.panel header{
  touch-action: manipulation;
  overscroll-behavior: contain;
}
.panel header h2{margin:0;font-size:18px}

/* dociśnij elementy po prawej w nagłówku panelu */
.panel header .spacer { 
  flex: 1 1 auto;   /* zajmij całe wolne miejsce */
}

.panel .content{padding:5px 10px 10px 10px;overflow:auto;flex:0 1 auto;}
.panel .content{ touch-action: pan-y; overscroll-behavior-y: contain; }
.row{display:flex;align-items:center;gap:10px}
.badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;height:44px;padding:0 10px;
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .05));
  border:1px solid rgba(255,255,255,0.16);
  border-radius:16px;font-weight:800
}
.hint{font-size:12px;color:var(--muted)}
.lokalizacja{font-size:10px}
.section{
  border:1px solid rgba(255,255,255,0.12); border-radius:16px; padding:10px;
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .03));
  box-shadow: inset 0 1px 0 #ffffff22; margin-top:10px;
}

/* Ikona zwiń */
.icon-btn{
  display:inline-grid; place-items:center; width:36px; height:36px; border-radius:12px;
  border:1px solid rgba(255,255,255,0.16);
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .06));
  color:var(--ink); cursor:pointer;
}
.icon-btn.icon-btn--close span{
  font-size:18px;
  line-height:1;
}

/* Grupa akcji w nagłówku po prawej */
.header-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

/* Delikatny feedback po skopiowaniu linku */
.icon-btn.is-copied{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.icon-btn.is-copied svg { opacity: .9; }

/* iOS slider */
.opacity{width:100%}
input[type="range"]{
  -webkit-appearance:none; appearance:none; height:6px; border-radius:999px;
  background:#ffffff59; outline:none;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; width:22px; height:22px; border-radius:50%;
  background:#fff; box-shadow: 0 2px 8px rgba(0,0,0,.50), inset 0 0 0 1px #0001; border:none;
}
input[type="range"]::-moz-range-thumb{
  width:22px; height:22px; border-radius:50%; background:#fff; border:none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.400), inset 0 0 0 1px #0001;
}

/* BĄBELKI (lupa + toggle panelu) – wspólny styl */
.fab, .sidebarFab{
  display:inline-grid; place-items:center;
  width:56px; height:56px; border-radius:18px;
  color:var(--ink); cursor:pointer;
  border:1px solid rgba(255,255,255,0.12);
  background-color: rgba(var(--tint-color), var(--tint-opacity));
  -webkit-backdrop-filter: blur(var(--frost-blur));
  backdrop-filter:         blur(var(--frost-blur));
  box-shadow:
    inset 0 0 var(--shadow-blur) var(--shadow-spread) var(--shadow-color),
    var(--shadow-offset) var(--outer-shadow-blur) rgba(0,0,0,0.20);
  touch-action: manipulation;
}
.fab svg, .sidebarFab svg{ width:22px; height:22px; display:block; }
.fab:focus-visible, .sidebarFab:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.fab:hover, .sidebarFab:hover{ filter:brightness(1.05) }
.fab:active, .sidebarFab:active{ transform:translateY(0.5px) scale(0.995) }
.sidebarFab{
  position:absolute;
  left:calc(10px + var(--safe-left));
  top:calc(64px + var(--safe-top));
  z-index:1200;
}
.fab-stack{
  position:absolute;
  right:calc(10px + var(--safe-right));
  top:calc(64px + var(--safe-top));
  z-index:1100;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.opacity-expander{
  position:absolute;
  right:calc(10px + var(--safe-right));
  bottom:calc(8px + var(--safe-bottom));
  z-index:1200;
}
.opacity-expander > .fab{
  margin-left:auto;
}
.opacity-expander .fab-panel{
  position:absolute;
  right:64px;
  bottom:0;
  transform-origin:bottom right;
}

.panel-toggle{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:4px;
  width:190px;
  height:auto;
  min-height:100px;
  padding:15px 5px 5px 15px;
  text-align:left;
}
.panel-toggle__title{
  font-size:18px;
  font-weight:600;
}
.panel-toggle__place{
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}
.panel-toggle__cta{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  font-size:9px;
  color:rgba(16,24,40,0.7);
  width:100%;
  text-align:right;
}
.panel-toggle__cta svg{ flex:0 0 auto; }
.panel-toggle__cta-text{ flex:0 1 auto; }

.moon-fab{
  padding:0;
}
.moon-fab.is-active{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.fab.is-active{ outline:2px solid var(--accent); outline-offset:2px; }
.moon-fab__content{
  position:relative;
  width:46px;
  height:46px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.moon-fab__emoji{
  font-size:30px;
  line-height:1;
}
.moon-panel{
  position:absolute;
  top:calc(64px + var(--safe-top));
  right:calc(10px + var(--safe-right));
  width:360px;
  z-index:1250;
  transform:translateX(calc(100% + 24px));
  transition:transform .24s ease, opacity .18s ease;
  pointer-events:none;
  touch-action: pan-y;
  overscroll-behavior: contain;
  visibility:hidden;
  opacity:0;
  max-height:calc(100vh - 64px - var(--safe-top) - 12px - var(--safe-bottom));
  margin-bottom:calc(12px + var(--safe-bottom));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.moon-panel.is-open{
  transform:translateX(0);
  visibility:visible;
  opacity:1;
  pointer-events:auto;
}
.moon-panel__card{
  position:relative;
  height:auto;
  max-height:100%;
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
  min-height:0;
  border-radius:var(--radius);
  background-color: rgba(var(--tint-color), var(--tint-opacity));
  -webkit-backdrop-filter: blur(var(--frost-blur));
  backdrop-filter:         blur(var(--frost-blur));
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 0 var(--shadow-blur) var(--shadow-spread) var(--shadow-color),
    var(--shadow-offset) var(--outer-shadow-blur) rgba(0,0,0,0.20);
}
.moon-panel__card{
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.moon-panel__card *{ touch-action: pan-y; }
.moon-panel__card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 38%);
  mix-blend-mode: screen;
}
.moon-panel__header{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  padding:12px 14px;
  column-gap:12px;
  border-bottom:1px solid rgba(255,255,255,0.12);
}
.moon-panel__header h3{
  margin:0;
  font-size:18px;
  flex:1 1 auto;
}
.moon-panel__close{
  margin-left:auto;
  width:36px;
  height:36px;
  border-radius:12px;
}
.moon-panel__close span{
  font-size:18px;
  line-height:1;
}
.moon-panel__body{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  padding:5px 10px 10px 10px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}
.moon-panel__phase{
  display:flex;
  align-items:center;
  gap:18px;
}
.moon-panel__visual{
  display:flex;
  align-items:center;
  justify-content:center;
  width:140px;
  height:140px;
  border-radius:50%;
}
.moon-panel__emoji{
  font-size:120px;
  line-height:1;
}
.moon-panel__phase-info{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.moon-panel__phase-name{
  font-size:22px;
  font-weight:700;
}
.moon-panel__phase-sub{
  font-size:14px;
  color:var(--muted);
}
.moon-panel__stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.moon-panel__stat{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .03));
  box-shadow: inset 0 1px 0 #ffffff22;
}
.moon-panel__stat-label{
  font-size:12px;
  color:var(--muted);
}
.moon-panel__stat-value{
  font-size:16px;
  font-weight:600;
}
.moon-panel__times{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .03));
  box-shadow: inset 0 1px 0 #ffffff22;
}
.moon-panel__section-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.moon-panel__section-header h4{
  margin:0;
  font-size:16px;
}
.moon-panel__timezone{
  font-size:12px;
  color:var(--muted);
}
.moon-panel__time-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  font-size:14px;
}
.moon-panel__time-row + .moon-panel__time-row{ margin-top:6px; }
.moon-panel__time-label{
  font-size:12px;
  color:var(--muted);
}
.moon-panel__time-value{
  font-size:16px;
  font-weight:600;
  text-align:right;
}
.moon-panel__time-row--current .moon-panel__time-label{
  font-size:14px;
}
.moon-panel__next{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .03));
  box-shadow: inset 0 1px 0 #ffffff22;
}
.moon-panel__next h4,
.moon-panel__location h4{
  margin:0 0 8px 0;
  font-size:16px;
}
.moon-phase-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.moon-phase-list__item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 10px;
  border-radius:12px;
  background-color: rgba(0,0,0,0.14);
  border:1px solid rgba(255,255,255,0.08);
}
.moon-phase-list__icon{
  font-size:22px;
}
.moon-phase-list__content{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.moon-phase-list__title{
  font-weight:600;
}
.moon-phase-list__time{
  font-size:12px;
  color:var(--muted);
}
.moon-panel__location{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .03));
  box-shadow: inset 0 1px 0 #ffffff22;
}
.moon-panel__location-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.moon-panel__location-timezone{
  grid-column:1 / -1;
}

/* ===== Panel Informacje ===== */
.info-panel{
  position:absolute;
  top:calc(64px + var(--safe-top));
  right:calc(10px + var(--safe-right));
  width:420px;
  z-index:1245; /* poniżej księżyca aby nie zachodziły konflikty focusu */
  transform:translateX(calc(100% + 24px));
  transition:transform .24s ease, opacity .18s ease;
  pointer-events:none;
  visibility:hidden;
  opacity:0;
  max-height:calc(100vh - 64px - var(--safe-top) - 12px - var(--safe-bottom));
  margin-bottom:calc(12px + var(--safe-bottom));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.info-panel.is-open{ transform:translateX(0); visibility:visible; opacity:1; pointer-events:auto; }
.info-panel__card{
  position:relative; display:flex; flex-direction:column; flex:1 1 auto; min-height:0;
  border-radius:var(--radius);
  background-color: rgba(var(--tint-color), var(--tint-opacity));
  -webkit-backdrop-filter: blur(var(--frost-blur));
  backdrop-filter:         blur(var(--frost-blur));
  border:1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 0 var(--shadow-blur) var(--shadow-spread) var(--shadow-color), var(--shadow-offset) var(--outer-shadow-blur) rgba(0,0,0,0.20);
}
.info-panel__card::after{ content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 38%); mix-blend-mode: screen; }
.info-panel__header{ position:relative; display:flex; align-items:center; gap:12px; padding:12px 14px; border-bottom:1px solid rgba(255,255,255,0.12); }
.info-panel__header h3{ margin:0; font-size:18px; flex:1 1 auto; }
.info-panel__close{ margin-left:auto; width:36px; height:36px; font-size: 18px; border-radius:12px; }
.info-panel__body{ position:relative; flex:1 1 auto; min-height:0; padding:5px 10px 10px 10px; overflow-y:auto; display:flex; flex-direction:column; gap:10px; }
.info-section{ display:flex; flex-direction:column; gap:10px; padding:12px; border-radius:14px; border:1px solid rgba(255,255,255,0.12); background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .03)); box-shadow: inset 0 1px 0 #ffffff22; }
.info-section__title{ margin:0; font-size:14px; }
.info-subtitle{ margin:4px 0 0 0; font-size:14px; font-weight:600; color:var(--muted); }
.info-panel p{ margin:0; font-size:12px; text-align: justify; color:var(--text); }
.info-panel p + p{ margin-top:10px; }

@media (max-width:960px){
  .info-panel{ width:min(92vw, 400px); }
}
@media (max-width:720px){
  .info-panel{ top:calc(64px + var(--safe-top)); right:calc(8px + var(--safe-right)); left:calc(8px + var(--safe-left)); bottom:calc(5px + var(--safe-bottom)); width:auto; max-height:calc(100vh - var(--safe-top) - var(--safe-bottom) - 24px); margin-bottom:0; transform:translateY(calc(100% + 32px)); }
  .info-panel.is-open{ transform:translateY(0); }
  .info-panel__card{ height:100%; }
}
@media (max-width:359px){
  .info-panel__body{ padding:12px 14px 16px; }
  .info-section__title{ font-size:14px; }
}

@media (max-width:960px){
  .moon-panel{ width:min(92vw, 340px); }
}

@media (max-width:720px){
  .moon-panel{
    top:calc(64px + var(--safe-top));
    right:calc(8px + var(--safe-right));
    left:calc(8px + var(--safe-left));
    bottom:calc(5px + var(--safe-bottom));
    width:auto;
    max-height:calc(100vh - var(--safe-top) - var(--safe-bottom) - 24px);
    margin-bottom:0;
    transform:translateY(calc(100% + 32px));
  }
  .moon-panel.is-open{
    transform:translateY(0);
  }
  .moon-panel__card{ height:100%; }
  .moon-panel__body{ flex:1 1 auto; }
  .moon-panel__visual{ width:120px; height:120px; }
}

@media (max-width:359px){
  .moon-panel__phase{ flex-direction:column; align-items:flex-start; }
  .moon-panel__stats{ grid-template-columns:1fr; }
  .moon-panel__location-grid{ grid-template-columns:1fr; }
}

/* BĄBELEK z ROZWIJANYM PANELIKIEM (Przezroczystość) */
.fab-expander{
  position:absolute; right:8px; z-index:1100;
  display:flex; align-items:center;
  touch-action:manipulation;
}
.fab-panel{
  overflow:hidden; width:0; opacity:0; transform:translateX(8px);
  transition: width .22s ease, opacity .18s ease, transform .22s ease, padding .22s ease;
  padding:0; border-radius:var(--radius);

  /* szkło */
  background-color: rgba(var(--tint-color), var(--tint-opacity));
  -webkit-backdrop-filter: blur(var(--frost-blur));
  backdrop-filter:         blur(var(--frost-blur));
  box-shadow:
    inset 0 0 var(--shadow-blur) var(--shadow-spread) var(--shadow-color),
    var(--shadow-offset) var(--outer-shadow-blur) rgba(0,0,0,0.20);
  border:1px solid rgba(255,255,255,0.12);
}
.fab-expander.is-open .fab-panel{
  width:260px; opacity:1; transform:translateX(0); padding:5px; margin-left: 10px;
}
.fab-panel .label{ font-size:12px; color:var(--muted); margin-bottom:6px; margin-left: 10px; }

@media (max-width:480px){
  .fab-expander.is-open .fab-panel{ width:200px; }
}

/* MODAL / Geocoder */
.backdrop{ position:fixed; inset:0; z-index:1400;
  background: radial-gradient(120% 100% at 50% 0%, #00000080 0%, #00000055 40%, #00000080 100%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal{ position:fixed; inset:0; z-index:1500; display:flex; align-items:center; justify-content:center; }
.modal-card{ width:min(92vw, 560px); border-radius:var(--radius); padding:0; }
.modal-header{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid rgba(255,255,255,0.12); }
.modal-header h3{ margin:0; font-size:20px }
.modal-close{ border:1px solid rgba(255,255,255,0.16); background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .06));
  color:var(--ink); border-radius:16px; padding:6px 10px; cursor:pointer; font-size: 18px; }
.modal-body{ padding:14px 16px 18px; }
.modal-hint{ margin-top:10px; font-size:12px; color:var(--muted) }

#modalGeocoder{ width:100%; display:flex; flex-direction:column; gap:12px; }
#modalGeocoder > .leaflet-control-geocoder{ order:1; }
#modalGeocoder .leaflet-control-geocoder,
#modalGeocoder .leaflet-control-geocoder.leaflet-control-geocoder-expanded{
  width:100% !important; max-width:100% !important; box-sizing:border-box;
  background:linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05));
  border:1px solid rgba(255,255,255,0.14);
  border-radius:22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -1px 0 rgba(255,255,255,0.08), 0 24px 40px rgba(6, 16, 38, 0.35);
}
#modalGeocoder .leaflet-control-geocoder-form{ position:relative; display:flex !important; align-items:center; gap:12px; width:100%; }
#modalGeocoder .leaflet-control-geocoder-icon{ display:none !important }
#modalGeocoder .leaflet-control-geocoder-form input{
  flex:1 1 auto; min-width:0; width:auto !important; max-width:unset !important; box-sizing:border-box;
  font-size:18px; line-height:1.3; padding:14px 18px;
  color:var(--ink);
  background:linear-gradient(135deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.08) 100%);
  border:1px solid rgba(255,255,255,0.25); border-radius:18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -1px 0 rgba(255,255,255,0.12), 0 5px 15px rgba(6, 16, 38, 0.20);
  -webkit-backdrop-filter: blur(calc(var(--frost-blur) * 1.1));
  backdrop-filter:         blur(calc(var(--frost-blur) * 1.1));
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#modalGeocoder .leaflet-control-geocoder-form input::placeholder{
  color: rgba(16, 24, 40, 0.55);
}
#modalGeocoder .leaflet-control-geocoder-form input:focus{
  border-color: rgba(77, 163, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.52), inset 0 -1px 0 rgba(255,255,255,0.16), 0 18px 40px rgba(10, 28, 60, 0.45);
  background:linear-gradient(135deg, rgba(255,255,255,0.38) 0%, rgba(255,255,255,0.14) 100%);
  outline:none;
}
#modalGeocoder .leaflet-control-geocoder-clear{
  position:static !important; flex:0 0 auto; white-space:nowrap;
  align-self:stretch; display:flex; align-items:center; justify-content:center;
  padding:0 16px; font-size:14px; color:rgba(16, 24, 40, 0.68);
  background:linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
  border:1px solid rgba(255,255,255,0.18); border-radius:16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42), inset 0 -1px 0 rgba(255,255,255,0.08);
  cursor:pointer; transition: all 0.2s ease;
}
#modalGeocoder .leaflet-control-geocoder-clear:hover{
  color:rgba(16, 24, 40, 0.85);
  border-color:rgba(255,255,255,0.28);
  background:linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.12));
}
#modalGeocoder .leaflet-control-geocoder-clear:focus-visible{
  outline:2px solid rgba(77, 163, 255, 0.7);
  outline-offset:2px;
}
#modalGeocoder .leaflet-control-geocoder-form-no-error,
#modalGeocoder .leaflet-control-geocoder-error{ display:none !important; }
#modalGeocoderStatus{
  order:2;
  margin:0;
  padding:12px 16px;
  font-size:14px;
  line-height:1.45;
  border-radius:18px;
  color:rgba(16, 24, 40, 0.78);
  background:linear-gradient(145deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08));
  border:1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -1px 0 rgba(255,255,255,0.08);
}
#modalGeocoderStatus[hidden]{ display:none !important; }
#modalGeocoderStatus[data-variant="loading"]{ color:rgba(16, 24, 40, 0.65); }
#modalGeocoderStatus[data-variant="error"]{ color:rgba(174, 28, 36, 0.82); border-color:rgba(255, 0, 46, 0.25); }
#modalGeocoderStatus[data-variant="empty"]{ color:rgba(16, 24, 40, 0.72); }
#modalGeocoder .leaflet-control-geocoder-alternatives{
  width:100% !important; max-width:100% !important; box-sizing:border-box;
  background-color: rgba(var(--tint-color), .20); border:1px solid rgba(255,255,255,0.16);
  border-radius:16px; overflow:auto; max-height:50vh;
}

@media (max-width:600px){
  .modal{
    align-items:flex-start;
    padding:calc(var(--safe-top) + 12px) calc(12px + var(--safe-right)) calc(var(--safe-bottom) + 12px) calc(12px + var(--safe-left));
  }
  .modal-card{
    width:100%;
    max-height:calc(100vh - var(--safe-top) - var(--safe-bottom) - 76px);
    border-radius:24px 24px 18px 18px;
    overflow:hidden;
  }
  .modal-header{ padding:16px 18px 12px; }
  .modal-body{
    padding:12px 18px 20px;
    overflow-y:auto;
    max-height:calc(100% - 72px);
  }
}

/* LEGENDA / HUD */

.legend{
  position:absolute; right:10px; bottom:12px; z-index:1100;
  padding:8px 10px; font-size:10px; max-width:70ch; border-radius:16px;
}
.cursorHud{
  position:absolute; pointer-events:none; z-index:1200;
  padding:6px 8px; font-size:12px; border-radius:12px;
  background-color: rgba(var(--tint-color), .20); border:1px solid rgba(255,255,255,0.16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* RESPONSYWNOŚĆ */
@media (max-width: 820px){
  .panel{
    top:calc(64px + var(--safe-top));
    left:calc(8px + var(--safe-left));
    right:calc(8px + var(--safe-right));
    bottom:calc(5px + var(--safe-bottom));
    width:auto;
    height:auto;
    max-height:calc(100vh - var(--safe-top) - var(--safe-bottom) - 24px);
    margin-bottom:0;
    transform:translateY(calc(100% + 32px));
  }
  .panel.is-open{
    transform:translateY(0);
  }
  .panel .content{ flex:1 1 auto; }
}

/* Auto „szkło” na wybranych elementach */
.navbar,.panel,.legend,.modal-card,.fab,.sidebarFab{
  background-color: rgba(var(--tint-color), var(--tint-opacity));
  -webkit-backdrop-filter: blur(var(--frost-blur)); backdrop-filter: blur(var(--frost-blur));
  box-shadow: inset 0 0 var(--shadow-blur) var(--shadow-spread) var(--shadow-color),
              var(--shadow-offset) var(--outer-shadow-blur) rgba(0,0,0,0.20);
  border:1px solid rgba(255,255,255,0.12); border-radius:var(--radius);
}
.navbar::after,.panel::after,.legend::after,.modal-card::after,.fab::after,.sidebarFab::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 38%); mix-blend-mode: screen;
}
html.is-webkit .navbar::after,
html.is-webkit .panel::after,
html.is-webkit .legend::after,
html.is-webkit .modal-card::after,
html.is-webkit .fab::after,
html.is-webkit .sidebarFab::after{
  mix-blend-mode: normal;
  opacity: .55;
}

/* rozmiar ikony w środku */
.icon-btn svg{ width:22px; height:22px; display:block; }

/* focus/hover/active – jak w .fab */
.icon-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.icon-btn:hover{ filter:brightness(1.05); }
.icon-btn:active{ transform: translateY(0.5px) scale(0.995); }

/* Logo w pasku */
.navbar .brand .logo{
  height: clamp(24px, 6vw, 31px);
  width: auto;
  max-width: 100%;
  display: block;
}

/* ====== Klik-marker (pulsująca kropka) ====== */
.simple-map-marker { pointer-events: none; }
.simple-map-marker .marker-circle{
  position: relative;
  width: 20px; height: 20px; border-radius: 50%;
  background: #e3b23f;               /* miękki „wypełniacz” */
  box-shadow:
    0 0 0 2px #FFCD59 inset,         /* wewnętrzny ring */
    0 2px 8px rgba(0,0,0,.25);         /* delikatny cień */
}
.simple-map-marker .marker-inner-circle{
  position:absolute; inset:4px; border-radius:50%;
  background:#9F2118;                   /* centralna kropka */
  box-shadow: 0 0 0 2px #ffffffcc inset;
}

/* pulsująca aureola */
.simple-map-marker .marker-circle::after{
  content:"";
  position:absolute; inset:-4px; border-radius:50%;
  border:2px solid #FFCD59;
  opacity:.9;
  animation: markerPulse 1.8s ease-out infinite;
}
@keyframes markerPulse{
  0%   { transform: scale(0.6); opacity:.9; }
  70%  { transform: scale(1.35); opacity:0; }
  100% { transform: scale(1.35); opacity:0; }
}

/* ===== Pogoda – karuzela kart ===== */
.wx-scroller{
  display:flex; gap:12px; overflow-x:auto; padding:4px 2px 2px;
  scroll-snap-type: x mandatory;
}
.wx-card{
  flex:0 0 180px; scroll-snap-align:start;
  border:1px solid rgba(255,255,255,0.12); border-radius:16px;
  background-color: rgba(var(--tint-color), calc(var(--tint-opacity) + .03));
  box-shadow: inset 0 1px 0 #ffffff22;
  padding:10px;
}
.wx-card h4{ margin:0 0 6px 0; font-size:16px }
.wx-row{ display:flex; align-items:center; gap:8px; margin:4px 0 }
.wx-big{ font-size:22px; font-weight:800 }
.wx-muted{ font-size:12px; color:var(--muted) }
.wx-icon{ font-size:18px; line-height:1 }

#nightWx { display:flex; gap:.5rem; overflow-x:auto; padding-bottom:.25rem; }
#nightWx { touch-action: pan-x pan-y; }
#nightWx{ overscroll-behavior-x: contain; }
#nightWx .wx-card { min-width: 150px; flex: 0 0 auto; }

/* ===== Liquid Glass Scrollbars (WebKit/Chromium) ===== */
:root{
  --sb-size: 10px;             /* grubość paska */
  --sb-radius: 12px;           /* zaokrąglenia */
  --sb-bg: rgba(255,255,255,.10);    /* tło toru */
  --sb-thumb: rgba(255,255,255,.35); /* kciuk */
  --sb-thumb-hover: rgba(255,255,255,.48);
  --sb-thumb-active: rgba(255,255,255,.60);
  --sb-border: rgba(255,255,255,.22); /* cienka ramka szkła */
  --sb-shadow: 0 2px 8px rgba(0,0,0,.25), inset 0 0 0 1px #0001;
}

/* globalnie (możesz zawęzić do .panel .content, #nightWx itd.) */
*::-webkit-scrollbar{
  width: var(--sb-size);
  height: var(--sb-size);
}

*::-webkit-scrollbar-track{
  background: var(--sb-bg);
  border-radius: var(--sb-radius);
  /* subtelna obwódka jak w Liquid Glass */
  box-shadow: inset 0 0 0 1px var(--sb-border);
}

*::-webkit-scrollbar-thumb{
  background: var(--sb-thumb);
  border-radius: calc(var(--sb-radius) - 2px);
  box-shadow: var(--sb-shadow);
  /* “szklany” rant: wewnętrzna jasna krawędź */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

*::-webkit-scrollbar-thumb:hover{
  background: var(--sb-thumb-hover);
}

*::-webkit-scrollbar-thumb:active{
  background: var(--sb-thumb-active);
}

/* róg przy scrollu poziomym+ pionowym */
*::-webkit-scrollbar-corner{
  background: transparent;
}

/* ===== Firefox ===== */
html{
  scrollbar-width: thin; /* auto | thin | none */
  scrollbar-color: rgba(255,255,255,.45) rgba(255,255,255,.10);
}

/* Lepsza dostępność: gdy ktoś ogranicza przezroczystość */
@media (prefers-reduced-transparency: reduce){
  *::-webkit-scrollbar-thumb{
    backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.25), inset 0 0 0 1px #0002;
  }
}

/* Gdy UI w jasnym motywie – możesz podmienić kolory */
@media (prefers-color-scheme: light){
  :root{
    --sb-bg: rgba(0,0,0,.08);
    --sb-thumb: rgba(0,0,0,.28);
    --sb-thumb-hover: rgba(0,0,0,.38);
    --sb-thumb-active: rgba(0,0,0,.50);
    --sb-border: rgba(0,0,0,.12);
  }
}

.stopka {display:flex;align-items:center;gap:10px;font-size:0.7em}
.stopka a,
.stopka a:visited,
.stopka a:hover,
.stopka a:active,
.stopka a:focus {
  color: var(--ink) !important;    /* u Ciebie: #000 */
  text-decoration: none !important;
}

.img-fluid {
  display: block;
  max-width: 100%;
  height: auto;
}