:root{
  --bg0:#070b1c;
  --bg1:#0b1330;
  --bg2:#0d1a3f;
  --card:#0f214e;
  --card2:#0c1a3b;
  --line:rgba(255,255,255,.08);
  --text:#e7ecff;
  --muted:rgba(231,236,255,.65);
  --muted2:rgba(231,236,255,.45);
  --accent:#5dd6ff;
  --accent2:#8a7bff;
  --danger:#ff4d6d;
  --shadow:0 18px 60px rgba(0,0,0,.45);
  --radius:18px;
  --radius2:26px;
}


/* Light theme */
html[data-theme="light"]{
  --bg0:#f4f7ff;
  --bg1:#f8faff;
  --bg2:#eef3ff;
  --card:#ffffff;
  --card2:#f5f7ff;
  --line:rgba(10,20,50,.12);
  --text:#0b1330;
  --muted:rgba(11,19,48,.72);
  --muted2:rgba(11,19,48,.52);
  --shadow:0 18px 60px rgba(10,20,50,.14);
}

/* Sidebar tweaks in light mode */
html[data-theme="light"] .sidebar{
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(245,247,255,.84));
  border:1px solid var(--line);
}
html[data-theme="light"] .brand-mark{
  box-shadow:0 12px 30px rgba(10,20,50,.12);
}
html[data-theme="light"] .side-item:hover{
  background:rgba(10,20,50,.05);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:var(--bg0);
  overflow-x:hidden;
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(900px 600px at 15% 15%, rgba(93,214,255,.18), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(138,123,255,.14), transparent 55%),
    radial-gradient(700px 500px at 70% 80%, rgba(41,220,160,.10), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg0));
  pointer-events:none;
}

a{color:inherit; text-decoration:none}
code{background:rgba(255,255,255,.06); padding:.15rem .35rem; border-radius:8px; border:1px solid var(--line)}

.shell{
  position:relative;
  display:flex;
  gap:22px;
  padding:22px;
  max-width:none;
  width:100%;
  margin:0 auto;
}

.sidebar{
  width:88px;
  background:linear-gradient(180deg, rgba(15,33,78,.85), rgba(10,18,43,.75));
  border:1px solid var(--line);
  border-radius:var(--radius2);
  box-shadow:var(--shadow);
  padding:14px 10px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.side-top{display:flex; flex-direction:column; gap:16px}
.brand{
  display:flex; align-items:center; gap:10px;
  padding:8px 10px;
  border-radius:16px;
}
.brand-mark{
  width:22px;height:22px;border-radius:8px;
  background:conic-gradient(from 180deg, #5dd6ff, #8a7bff, #29dca0, #5dd6ff);
  box-shadow:0 10px 25px rgba(93,214,255,.25);
}
.brand-mark.big{width:34px;height:34px;border-radius:12px}
.brand-text{font-weight:700; font-size:12px; letter-spacing:.3px; color:rgba(231,236,255,.85)}
.side-nav{display:flex; flex-direction:column; gap:10px; padding:0 8px}

.side-item{
  height:44px;width:44px;
  display:flex; align-items:center; justify-content:center;
  border-radius:16px;
  color:rgba(231,236,255,.72);
  border:1px solid transparent;
  background:rgba(255,255,255,.02);
  transition:.2s ease;
}
.side-item:hover{transform:translateY(-1px); background:rgba(255,255,255,.05)}
.side-item.is-active{
  color:#fff;
  background:linear-gradient(135deg, rgba(93,214,255,.18), rgba(138,123,255,.12));
  border-color:rgba(93,214,255,.25);
}

.ico{display:inline-flex; align-items:center; justify-content:center}
.ico svg{display:block}

.side-bottom{display:flex; flex-direction:column; align-items:center; gap:10px; padding:0 8px}
.side-avatar{
  width:44px;height:44px;border-radius:16px;
  background:linear-gradient(135deg, rgba(93,214,255,.25), rgba(138,123,255,.18));
  border:1px solid rgba(255,255,255,.10);
  display:flex; align-items:center; justify-content:center;
  font-weight:700;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
}

.main{flex:1; min-width:0}

.grid{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:22px;
  align-items:start;
}

.col-main{min-width:0}
.col-right{position:sticky; top:22px; display:flex; flex-direction:column; gap:18px}

.card{
  background:linear-gradient(180deg, rgba(15,33,78,.80), rgba(11,19,48,.78));
  border:1px solid var(--line);
  border-radius:var(--radius2);
  box-shadow:var(--shadow);
  overflow:hidden;
  padding:10px;
}

.card-head{
  padding:18px 18px 0 18px;
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
}

.card-title{font-weight:700; font-size:16px}
.card-sub{color:var(--muted); font-size:13px; margin-top:4px}

.composer{padding:18px}
.composer-row{display:flex; gap:14px; align-items:flex-start}
.avatar{
  width:44px;height:44px;border-radius:16px;
  background:rgba(255,255,255,.06);
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-weight:700;
}
.avatar.small{width:36px;height:36px;border-radius:14px}

.textarea{
  width:100%;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(5,10,24,.45);
  color:var(--text);
  padding:12px 14px;
  outline:none;
  resize:vertical;
  font-size:14px;
  line-height:1.5;
}
.textarea:focus{border-color:rgba(93,214,255,.35); box-shadow:0 0 0 4px rgba(93,214,255,.08)}

.input, .select{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(5,10,24,.45);
  color:var(--text);
  padding:11px 12px;
  outline:none;
  font-size:14px;
}
.input:focus, .select:focus{border-color:rgba(93,214,255,.35); box-shadow:0 0 0 4px rgba(93,214,255,.08)}

.label{display:block; font-size:13px; color:var(--muted); margin:10px 0 6px}
.form{padding:18px}
.row{display:flex; gap:14px}
.col{flex:1; min-width:0}
.col.col-btn{display:flex; align-items:flex-end}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 14px;
  font-weight:600;
  cursor:pointer;
  transition:.2s ease;
}
.btn:hover{transform:translateY(-1px); background:rgba(255,255,255,.06)}

.btn.ghost, .btn.btn-ghost{
  background:transparent;
}
.btn.ghost:hover, .btn.btn-ghost:hover{
  background:rgba(255,255,255,.04);
}
html[data-theme="light"] .btn.ghost:hover, html[data-theme="light"] .btn.btn-ghost:hover{
  background:rgba(10,20,50,.04);
}

.row-actions{display:flex; gap:10px; align-items:center}
.help{margin-top:10px; font-size:12px; opacity:.75}

.btn.primary{
  background:linear-gradient(135deg, rgba(93,214,255,.22), rgba(138,123,255,.18));
  border-color:rgba(93,214,255,.25);
}
.btn.full{width:100%}
.btn.tiny{padding:7px 10px; border-radius:12px; font-size:12px}
.btn.danger{background:rgba(255,77,109,.10); border-color:rgba(255,77,109,.25)}
.btn.danger:hover{background:rgba(255,77,109,.14)}

.file-btn{
  position:relative;
  display:inline-flex; align-items:center; gap:10px;
  border-radius:16px;
  border:1px dashed rgba(255,255,255,.14);
  background:rgba(255,255,255,.03);
  padding:10px 14px;
  cursor:pointer;
  user-select:none;
}
.file-btn:hover{background:rgba(255,255,255,.05)}
.file-input{display:none}

.composer-actions{
  margin-top:14px;
  display:flex; align-items:center; justify-content:space-between; gap:14px;
}
.composer-actions .left{display:flex; gap:10px; align-items:center; flex-wrap:wrap}

.file-preview{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-top:12px;
}
.file-pill{
  display:flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  font-size:12px;
  color:var(--muted);
}

.post{padding:16px 16px 18px 16px; margin-top:18px}
.post-head{display:flex; align-items:flex-start; justify-content:space-between; gap:16px}
.post-user{display:flex; gap:12px; align-items:center}
.post-name{font-weight:700}
.post-meta{color:var(--muted2); font-size:12px; margin-top:2px; display:flex; align-items:center; gap:6px}
.dot{opacity:.5}

.badge{
  display:inline-flex; align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(93,214,255,.20);
  background:rgba(93,214,255,.10);
  color:rgba(231,236,255,.9);
  font-size:12px;
}
.badge:hover{border-color:rgba(93,214,255,.35)}

.post-body{
  margin-top:12px;
  color:rgba(231,236,255,.92);
  font-size:14px;
  line-height:1.6;
}

.like-btn{
  display:inline-flex; align-items:center; gap:10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  padding:10px 12px;
  cursor:pointer;
  color:rgba(231,236,255,.75);
  transition:.2s ease;
}
.like-btn:hover{background:rgba(255,255,255,.06)}
.like-btn.is-liked{
  color:#fff;
  border-color:rgba(255,77,109,.35);
  background:rgba(255,77,109,.12);
}

.media-grid{
  margin-top:14px;
  display:grid;
  gap:10px;
  grid-template-columns:repeat(2,1fr);
}
.media-grid.media-1{grid-template-columns:1fr}
.media-item img, .video-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
  cursor:pointer;
}
.video-thumb{position:relative}
.video-thumb .play{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
}
.video-thumb .play:before{
  content:'';
  width:54px;height:54px;border-radius:999px;
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 18px 50px rgba(0,0,0,.5);
}
.video-thumb .play:after{
  content:'';
  position:absolute;
  width:0;height:0;
  border-left:14px solid rgba(255,255,255,.92);
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
  margin-left:4px;
}

.empty{padding:26px 18px 24px 18px}
.empty-title{font-weight:700}
.empty-sub{color:var(--muted); margin-top:6px}

.profile{padding:18px}
.profile-hello{color:var(--muted); font-size:13px}
.profile-name{font-weight:800; font-size:22px; margin-top:6px}
.profile-stats{display:flex; gap:14px; margin-top:14px}
.stat{flex:1; border-radius:18px; border:1px solid var(--line); background:rgba(0,0,0,.16); padding:12px}
.stat .n{font-weight:800; font-size:18px}
.stat .l{color:var(--muted2); font-size:12px; margin-top:3px}
.profile-hint{color:var(--muted2); font-size:12px; margin-top:12px}

.sideblock{padding:18px}
.sideblock-head{display:flex; align-items:baseline; justify-content:space-between}
.sideblock-title{font-weight:800}
.sideblock-sub{color:var(--muted2); font-size:12px}
.quick-links{display:flex; flex-direction:column; gap:10px; margin-top:12px}
.q{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.16);
  color:rgba(231,236,255,.86);
}
.q:hover{background:rgba(255,255,255,.05)}

.chips{display:flex; flex-wrap:wrap; gap:10px; margin-top:12px}
.chip{
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.14);
  color:rgba(231,236,255,.8);
  padding:8px 12px;
  font-size:12px;
  cursor:pointer;
}
.chip:hover{background:rgba(255,255,255,.05)}
.chip.static{cursor:default}
.mini{color:var(--muted); font-size:13px; margin-top:12px; line-height:1.55}

.place-grid{
  padding:16px;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}
.place-card{
  display:flex;
  border-radius:22px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.14);
  overflow:hidden;
  transition:.2s ease;
}
.place-card:hover{transform:translateY(-2px); background:rgba(255,255,255,.04)}
.place-media{width:120px; min-height:98px; background:rgba(0,0,0,.15)}
.place-media img{width:100%;height:100%;object-fit:cover; display:block}
.place-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:rgba(231,236,255,.55)}
.place-body{padding:12px 12px 12px 12px; flex:1; min-width:0}
.place-name{font-weight:800}
.place-meta{margin-top:6px; color:var(--muted2); font-size:12px; display:flex; gap:6px; flex-wrap:wrap}
.tagrow{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.tag{
  border-radius:999px;
  border:1px solid rgba(93,214,255,.18);
  background:rgba(93,214,255,.09);
  color:rgba(231,236,255,.85);
  padding:6px 10px;
  font-size:12px;
}

.hero{position:relative}
.hero-media{height:240px; overflow:hidden; position:relative}
.hero-media img{width:100%;height:100%;object-fit:cover; display:block; filter:saturate(1.05) contrast(1.03)}
.hero-grad{
  position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 0%, rgba(7,11,28,.15) 40%, rgba(7,11,28,.92) 100%);
}
.hero-body{padding:18px}
.hero-title-row{display:flex; align-items:flex-start; justify-content:space-between; gap:14px}
.hero-title{font-weight:900; font-size:26px}
.hero-meta{margin-top:8px; color:var(--muted2); font-size:12px; display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.hero-notes{margin-top:12px; color:rgba(231,236,255,.92); line-height:1.6}

.link-btn{
  background:none; border:none; padding:0; margin:0;
  color:rgba(93,214,255,.9);
  cursor:pointer;
  font-size:12px;
}
.link-btn:hover{text-decoration:underline}

.gallery-grid{
  padding:16px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
}
.gallery-item{position:relative}
.gallery-item img{width:100%;height:160px; object-fit:cover}
.cover-form{position:absolute; bottom:10px; right:10px; opacity:0; transition:.2s ease}
.gallery-item:hover .cover-form{opacity:1}
.post-mini{border-top:1px solid var(--line); padding:16px}
.post-mini:first-child{border-top:none}

.coords{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px}
.coords-val{font-weight:700; color:rgba(231,236,255,.9)}

.plan-board{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:14px;
  padding:16px;
}
.plan-col{
  border-radius:22px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.12);
  padding:12px;
  min-height:240px;
}
.plan-col-head{font-weight:900; margin-bottom:10px}
.muted{color:var(--muted2)}
.plan-empty{color:var(--muted2); font-size:13px; padding:10px}
.plan-card{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.16);
  padding:12px;
  margin-top:10px;
}
.plan-title{font-weight:800}
.plan-meta{color:var(--muted2); font-size:12px; margin-top:6px}
.plan-notes{color:rgba(231,236,255,.88); font-size:13px; margin-top:10px; line-height:1.55}
.plan-actions{display:flex; justify-content:space-between; gap:10px; margin-top:12px; align-items:center}
.select.tiny{padding:7px 10px; border-radius:12px; font-size:12px}

.alert{
  margin:14px 18px 0 18px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  font-size:13px;
}
.alert.error{border-color:rgba(255,77,109,.25); background:rgba(255,77,109,.10)}
.alert.info{border-color:rgba(93,214,255,.25); background:rgba(93,214,255,.10)}

.auth-shell{
  position:relative;
  display:flex;
  min-height:100vh;
  align-items:center;
  justify-content:center;
  padding:22px;
}

.auth-card{
  width:min(520px, 92vw);
  background:linear-gradient(180deg, rgba(15,33,78,.82), rgba(11,19,48,.78));
  border:1px solid var(--line);
  border-radius:var(--radius2);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.auth-head{padding:22px}
.brand-row{display:flex; align-items:center; gap:14px}
.auth-title{font-weight:900; font-size:20px}
.auth-sub{color:var(--muted); margin-top:6px; font-size:13px; line-height:1.5}
.auth-foot{padding:0 22px 22px 22px}
.link{color:rgba(93,214,255,.95)}
.link:hover{text-decoration:underline}

.lightbox{
  position:fixed; inset:0;
  z-index:999;
  display:flex; align-items:center; justify-content:center;
}
.lightbox[hidden]{
  display:none !important;
}
.lb-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.72)}
.lb-content{
  position:relative;
  width:min(1100px, 92vw);
  max-height:86vh;
  background:rgba(10,18,43,.85);
  border:1px solid rgba(255,255,255,.12);
  border-radius:22px;
  box-shadow:0 30px 90px rgba(0,0,0,.6);
  padding:14px;
  display:flex; align-items:center; justify-content:center;
}
.lb-content img, .lb-content video{
  max-width:100%;
  max-height:78vh;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.25);
}
.lb-close{
  position:absolute;
  top:10px; right:10px;
  width:38px;height:38px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.25);
  color:rgba(231,236,255,.9);
  font-size:22px;
  cursor:pointer;
}

.mini-list{margin:12px 0 0 0; padding-left:16px; color:var(--muted); font-size:13px; line-height:1.55}
.mini-list li{margin:6px 0}

/* Responsive */
@media (max-width: 1060px){
  .grid{grid-template-columns:1fr}
  .col-right{position:relative; top:auto}
  .place-grid{grid-template-columns:1fr}
  .gallery-grid{grid-template-columns:repeat(2,1fr)}
  .plan-board{grid-template-columns:1fr}
}

@media (max-width: 720px){
  .shell{padding:14px; gap:14px}
  .sidebar{width:76px; padding:12px 8px}
  .brand-text{display:none}
  .place-media{width:110px}
  .gallery-item img{height:140px}
  .composer-actions{flex-direction:column; align-items:stretch}
  .composer-actions .left{width:100%}
  .btn.primary{width:100%}
}


/* Theme toggle icons */
.theme-ico{display:none}
html[data-theme="light"] .theme-ico-sun{display:block}
html:not([data-theme="light"]) .theme-ico-moon{display:block}


/* Atlas layout */
.atlas-wrap{
  display:grid;
  grid-template-columns: 1fr 420px;
  gap:22px;
  align-items:start;
}
.atlas-map-card{
  position:relative;
  border-radius:var(--radius2);
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--card2);
  box-shadow:var(--shadow);
}
#atlasMap{
  height: calc(100vh - 44px);
  min-height: 560px;
}

/* Atlas: prevent Leaflet controls/popups from being clipped by rounded corners */
.atlas-map-card .leaflet-top .leaflet-control{ margin-top:18px !important; }
.atlas-map-card .leaflet-left .leaflet-control{ margin-left:18px !important; }
.atlas-map-card .leaflet-right .leaflet-control{ margin-right:18px !important; }
.atlas-map-card .leaflet-bottom .leaflet-control{ margin-bottom:18px !important; }
/* Keep popups inside */
.atlas-map-card .leaflet-popup-content-wrapper{ border-radius:14px; }


.atlas-map-hud{
  position:absolute;
  left:14px;
  right:14px;
  top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  pointer-events:none;
}
.atlas-hud-box{
  pointer-events:auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(0,0,0,.30);
  backdrop-filter: blur(10px);
  border:1px solid rgba(255,255,255,.18);
}
html[data-theme="light"] .atlas-hud-box{
  background:rgba(255,255,255,.70);
  border:1px solid rgba(10,20,50,.12);
}
.atlas-hud-title{font-weight:800}
.atlas-hud-sub{font-size:12px; opacity:.8}

.atlas-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
  position:sticky;
  top:22px;
}

.atlas-search{display:flex; gap:10px; align-items:center}
.atlas-chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.chip{
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  cursor:pointer;
}
.chip:hover{border-color:rgba(255,255,255,.18)}
.chip.is-on{background:linear-gradient(135deg, rgba(93,214,255,.20), rgba(138,123,255,.16)); border-color:rgba(93,214,255,.35)}
html[data-theme="light"] .chip{background:rgba(10,20,50,.03)}
html[data-theme="light"] .chip:hover{border-color:rgba(10,20,50,.18)}

.atlas-list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: calc(100vh - 340px);
  overflow:auto;
  padding-right:4px;
}
.atlas-item{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  cursor:pointer;
}
.atlas-item:hover{border-color:rgba(255,255,255,.18)}
.atlas-item.is-active{box-shadow:0 0 0 3px rgba(93,214,255,.18)}
html[data-theme="light"] .atlas-item{background:rgba(10,20,50,.02)}
.atlas-item-thumb{
  width:44px; height:44px; border-radius:12px; overflow:hidden;
  background:rgba(255,255,255,.06);
  border:1px solid var(--line);
  flex:0 0 auto;
}
.atlas-item-thumb img{width:100%; height:100%; object-fit:cover; display:block}
.atlas-item-body{min-width:0}
.atlas-item-title{font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.atlas-item-meta{font-size:12px; opacity:.75; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

.atlas-pop-img{width:100%; height:110px; border-radius:12px; overflow:hidden; margin-bottom:8px}
.atlas-pop-img img{width:100%; height:100%; object-fit:cover; display:block}
.atlas-pop-title{font-weight:900; margin-bottom:4px}
.atlas-pop-tags{font-size:12px; opacity:.8; margin-bottom:8px}
.atlas-pop-link a{color:var(--accent); text-decoration:none; font-weight:800}

/* Leaflet theming */
#atlasMap .leaflet-control-layers,
#atlasMap .leaflet-bar{
  border:1px solid var(--line) !important;
  box-shadow:var(--shadow) !important;
  border-radius:14px !important;
  overflow:hidden;
}
#atlasMap .leaflet-control-layers,
#atlasMap .leaflet-bar a{
  background:rgba(0,0,0,.30) !important;
  backdrop-filter: blur(10px);
  color:var(--text) !important;
}
html[data-theme="light"] #atlasMap .leaflet-control-layers,
html[data-theme="light"] #atlasMap .leaflet-bar a{
  background:rgba(255,255,255,.78) !important;
  color:var(--text) !important;
}

/* Keep Leaflet controls away from rounded corners */
#atlasMap .leaflet-top{ top:22px; }
#atlasMap .leaflet-left{ left:22px; }
#atlasMap .leaflet-right{ right:22px; }
#atlasMap .leaflet-bottom{ bottom:22px; }

/* Attribution readability */
#atlasMap .leaflet-control-attribution{
  background:rgba(0,0,0,.30) !important;
  border:1px solid var(--line) !important;
  border-radius:12px !important;
  padding:6px 10px !important;
  color:var(--text) !important;
  backdrop-filter: blur(10px);
}
html[data-theme="light"] #atlasMap .leaflet-control-attribution{
  background:rgba(255,255,255,.78) !important;
}

/* Ensure popups don't get clipped by rounded corners */
#atlasMap .leaflet-popup-content-wrapper,
#atlasMap .leaflet-popup-tip{
  background:var(--card) !important;
  color:var(--text) !important;
  border:1px solid var(--line) !important;
}
html[data-theme="light"] #atlasMap .leaflet-popup-content-wrapper,
html[data-theme="light"] #atlasMap .leaflet-popup-tip{
  background:var(--card) !important;
}
#atlasMap .leaflet-popup-content{ margin:12px 14px; }

/* If any generic lightbox exists, respect hidden attribute */
.lightbox[hidden]{ display:none !important; }


/* Toast */
.toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);background:rgba(0,0,0,.55);color:var(--text);border:1px solid var(--line);padding:10px 14px;border-radius:999px;backdrop-filter:blur(10px);box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:opacity .25s ease, transform .25s ease;z-index:9999}
.toast.show{opacity:1;transform:translateX(-50%) translateY(-6px)}
html[data-theme="light"] .toast{background:rgba(255,255,255,.82)}

.btn.is-on{background:linear-gradient(135deg, rgba(93,214,255,.18), rgba(138,123,255,.14)); border-color:rgba(93,214,255,.35)}
