:root{
  --bg:#0b1220; --card:rgba(14,22,36,.82); --card2:rgba(28,40,60,.9);
  --line:rgba(255,255,255,.10); --text:#e8eef7; --muted:#93a3b8;
  --accent:#ff8a3d; --accent2:#2e9bff; --r:14px;
  --font: system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans","Noto Sans Telugu","Noto Sans Devanagari",sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font:14px/1.4 var(--font);overflow:hidden}
#map{position:fixed;inset:0;background:#0a1322}
a{color:#7cc4ff}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
.hidden{display:none!important}
.muted{color:var(--muted)}
.card{background:var(--card);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 6px 24px rgba(0,0,0,.35)}

/* brand */
.brand{position:fixed;top:12px;left:12px;z-index:1000;display:flex;gap:10px;align-items:center;padding:7px 14px 7px 8px}
.brand-name{font-weight:800;font-size:17px;letter-spacing:.2px;background:linear-gradient(90deg,#ffb347,#ff7a45 45%,#2e9bff);-webkit-background-clip:text;background-clip:text;color:transparent}
.brand-tag{font-size:11px;color:var(--muted)}

/* layers */
.layers{position:fixed;top:72px;left:12px;z-index:1000;width:178px;padding:6px}
.layers-toggle{display:none;align-items:center;gap:8px;padding:8px;width:100%}
.layers-toggle svg{width:20px;height:20px}
.layers h4{margin:8px 8px 4px;font-size:10.5px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);font-weight:700}
.layer{display:flex;align-items:center;gap:9px;width:100%;padding:7px 10px;border-radius:10px;color:#c9d4e3;text-align:left}
.layer i{font-style:normal;width:20px;text-align:center}
.layer:hover{background:rgba(255,255,255,.06)}
.layer.on{background:linear-gradient(90deg,rgba(255,138,61,.28),rgba(46,155,255,.18));color:#fff;font-weight:600}
.seg{display:flex;gap:4px;padding:2px 6px 6px}
.seg button{flex:1;padding:5px 0;border-radius:8px;font-size:12px;color:var(--muted);background:rgba(255,255,255,.05)}
.seg button.on{background:rgba(255,255,255,.18);color:#fff}

/* right tools */
.tools{position:fixed;top:12px;right:12px;z-index:1000;display:flex;flex-direction:column;gap:8px;align-items:center}
.round{width:42px;height:42px;border-radius:50%;background:var(--card);border:1px solid var(--line);display:grid;place-items:center;box-shadow:0 4px 16px rgba(0,0,0,.35)}
.round svg{width:20px;height:20px}
.round:hover{background:var(--card2)}
.pill{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:22px;padding:3px;box-shadow:0 4px 16px rgba(0,0,0,.35)}
.ov{width:36px;height:36px;border-radius:50%;font-size:17px;opacity:.38;filter:grayscale(1);transition:.15s}
.ov.on{opacity:1;filter:none}
#zin,#zout{font-size:22px;font-weight:300;filter:none}

/* sheets */
.sheet{position:fixed;top:12px;right:66px;bottom:96px;width:360px;z-index:1100;padding:12px;overflow:auto}
.sheet h4{margin:14px 2px 6px;font-size:10.5px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted)}
.sheet-head{display:flex;gap:8px;align-items:flex-start;justify-content:space-between}
.sheet-head form{flex:1}
.x{font-size:24px;line-height:1;width:32px;height:32px;border-radius:50%;color:var(--muted)}
.x:hover{background:rgba(255,255,255,.08);color:#fff}
#q{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:#fff;font:inherit;outline:none}
#q:focus{border-color:var(--accent2)}
.primary{margin-top:10px;width:100%;padding:9px;border-radius:10px;background:var(--accent2);color:#fff;font-weight:600}
.list .item,#results .item{display:flex;gap:10px;align-items:center;padding:8px;border-radius:10px;width:100%;text-align:left}
.list .item:hover,#results .item:hover{background:rgba(255,255,255,.07)}
.item .dot{width:12px;height:12px;border-radius:50%;flex:none}
.item .sub{font-size:12px;color:var(--muted)}
.badge{margin-left:auto;font-size:11px;padding:2px 7px;border-radius:9px;background:rgba(255,255,255,.1);white-space:nowrap}

/* forecast */
.fc-place{font-weight:700;font-size:16px}
.fc-coords{font-size:12px}
.fc-now{display:flex;align-items:center;gap:12px;margin:10px 0}
.fc-now .big{font-size:40px;font-weight:300}
.fc-now .ico{font-size:40px}
.fc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;font-size:12px}
.fc-grid div{background:rgba(255,255,255,.05);border-radius:8px;padding:6px}
.fc-grid b{display:block;font-size:14px}
.hours{display:flex;overflow-x:auto;gap:2px;padding-bottom:6px;scrollbar-width:thin}
.hour{flex:none;width:52px;text-align:center;font-size:11.5px;padding:6px 2px;border-radius:8px}
.hour:nth-child(odd){background:rgba(255,255,255,.04)}
.hour .t{color:var(--muted)} .hour .i{font-size:18px} .hour .v{font-weight:700;font-size:13px}
.hour .p{color:#7cc4ff} .hour .w{color:#c9d4e3}
.hour .arr{display:inline-block}
.days .day span:last-child{text-align:right;white-space:nowrap}
.days .day{display:grid;grid-template-columns:64px 26px 1fr 78px;align-items:center;gap:6px;padding:5px 4px;border-bottom:1px solid var(--line);font-size:13px}
.days .bar{height:6px;border-radius:3px;background:linear-gradient(90deg,#2e9bff,#ffb347,#ff5a3d)}
.chart{width:100%;height:90px;display:block}

/* legend */
.legend{position:fixed;right:12px;bottom:92px;z-index:1000;padding:7px 10px;min-width:230px;font-size:11px}
.legend .ttl{font-weight:600;margin-bottom:4px;display:flex;justify-content:space-between}
.legend .ramp{height:9px;border-radius:5px}
.legend .ticks{display:flex;justify-content:space-between;color:var(--muted);margin-top:2px}
.legend .src{color:var(--muted);margin-top:4px}

body.sheet-open .legend{right:438px}
/* timeline */
.timeline{position:fixed;left:50%;transform:translateX(-50%);bottom:12px;z-index:1000;display:flex;align-items:center;gap:6px;padding:8px 12px;width:min(820px,calc(100% - 24px))}
.tl-btn{width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.07);font-size:13px;flex:none}
.tl-btn.play{width:42px;height:42px;background:var(--accent);color:#fff;font-size:16px}
.tl-btn.now{width:auto;padding:0 12px;border-radius:17px;font-size:12px;font-weight:600}
.tl-main{flex:1;min-width:0;padding:0 6px}
.tl-label{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-kind{font-weight:400;color:var(--muted);font-size:11px;margin-left:6px}
.tl-track{position:relative}
#tlRange{width:100%;margin:6px 0 0;accent-color:var(--accent);height:18px}
.tl-ticks{position:relative;height:14px;font-size:10px;color:var(--muted)}
.tl-ticks span{position:absolute;transform:translateX(-50%);white-space:nowrap}

/* modal */
.modal{position:fixed;inset:0;z-index:2000;background:rgba(0,0,0,.5);display:grid;place-items:center;padding:16px}
.modal-box{position:relative;max-width:520px;width:100%;padding:18px 22px;max-height:90vh;overflow:auto;background:rgba(14,22,36,.96)}
.modal-box .x{position:absolute;top:10px;right:10px}
.modal-box h2{margin:0 0 4px}
.modal-box h3{margin:16px 0 6px;font-size:14px}
.sources{padding-left:18px;margin:0;color:#c9d4e3}
.sources li{margin:3px 0}
.warn{background:rgba(255,138,61,.12);border:1px solid rgba(255,138,61,.35);padding:8px 10px;border-radius:10px;font-size:13px}
.keys{font-size:12.5px;color:var(--muted)}
.social{display:flex;gap:10px;margin-top:12px}
.social a{display:flex;align-items:center;gap:6px;padding:7px 12px;border-radius:10px;background:rgba(255,255,255,.08);color:#fff;text-decoration:none}
.social svg{width:16px;height:16px}
.social-mini{position:fixed;left:12px;bottom:12px;z-index:900;display:flex;gap:6px}
.social-mini a{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--card);border:1px solid var(--line);color:#fff;text-decoration:none;font-weight:700;font-size:13px}

.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:100px;z-index:3000;background:rgba(0,0,0,.8);padding:8px 14px;border-radius:10px;font-size:13px}

/* leaflet tweaks */
.leaflet-control-attribution{background:rgba(10,18,32,.7)!important;color:#93a3b8!important;font-size:10px!important;max-width:300px;border-radius:6px}
.leaflet-control-attribution a{color:#b5c7dd!important}
.leaflet-bottom.leaflet-left{bottom:44px}
.leaflet-bottom.leaflet-right{bottom:170px}
.leaflet-container{font-family:var(--font)}
.storm-ico{font-size:24px;line-height:24px;text-align:center;filter:drop-shadow(0 0 4px rgba(0,0,0,.8));animation:spin 4s linear infinite}
@keyframes spin{to{transform:rotate(-360deg)}}
.storm-label{background:rgba(10,18,32,.85);color:#fff;border:0;border-radius:6px;font-weight:600;box-shadow:none}
.storm-label:before{display:none}
.pin{width:14px;height:14px;border-radius:50%;background:var(--accent);border:3px solid #fff;box-shadow:0 0 0 4px rgba(255,138,61,.35)}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#0e1624;color:var(--text)}
.leaflet-tooltip.tip{background:rgba(10,18,32,.9);color:#fff;border:1px solid var(--line)}

/* mobile */
@media (max-width:720px){
  .brand{padding:5px 10px 5px 6px}.brand img{width:28px;height:28px}.brand-tag{display:none}
  .layers{top:64px;width:auto;padding:2px}
  .layers-toggle{display:flex}
  .layers.collapsed .layers-body{display:none}
  .layers.collapsed{width:auto}
  .layers:not(.collapsed){width:170px}
  .sheet{left:8px;right:8px;top:auto;bottom:86px;width:auto;max-height:62vh;background:rgba(14,22,36,.97)}
  .legend{left:8px;right:8px;bottom:84px;min-width:0}
  body.sheet-open .legend{display:none}
  .timeline{bottom:8px;width:calc(100% - 16px);padding:6px 8px}
  .tl-btn{width:30px;height:30px}.tl-btn.play{width:38px;height:38px}
  #tlPrev,#tlNext{display:none}
  .leaflet-bottom.leaflet-left,.leaflet-bottom.leaflet-right{bottom:160px}
  .leaflet-control-attribution{max-width:96vw}
  .social-mini{display:none}
  .round{width:38px;height:38px}.ov{width:32px;height:32px;font-size:15px}
}
