* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #02060f; color: #e6ecf5;
  font: 14px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; color: #9fb3cc; font-size: 15px; }
button { font: inherit; color: inherit; cursor: pointer; }

#head { position: fixed; left: 24px; top: 18px; pointer-events: none; max-width: 640px; }
#head h1 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -0.01em; text-shadow: 0 2px 18px #000; }
#head p { margin: 4px 0 0; color: #a9bad0; font-size: 13.5px; text-shadow: 0 1px 8px #000; }

.glass { background: rgba(8, 14, 28, 0.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(140, 170, 210, 0.16); border-radius: 14px; }
#card { position: fixed; right: 20px; top: 18px; width: 330px; padding: 14px 16px; }
#card, #prov, #foot, #about .box { background: rgba(8, 14, 28, 0.64); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(140, 170, 210, 0.16); border-radius: 14px; }
#card .row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#date { font-size: 20px; font-weight: 600; }
.phase { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 99px; font-weight: 650; }
.phase.nino { background: rgba(255, 90, 50, 0.22); color: #ffb08f; }
.phase.nina { background: rgba(70, 160, 255, 0.22); color: #9fd2ff; }
.phase.neutral { background: rgba(170, 180, 200, 0.16); color: #cfd8e6; }
.num { margin-top: 6px; font-variant-numeric: tabular-nums; }
.dim { color: #93a5bd; font-size: 12.5px; }
#see { margin: 10px 0 12px; color: #d3dceb; font-size: 13.5px; }
.seg { display: flex; background: rgba(255,255,255,0.05); border-radius: 10px; padding: 3px; margin: 8px 0; }
.seg button { flex: 1; border: 0; background: none; padding: 7px 6px; border-radius: 8px; color: #a9b8cc; font-size: 13px; }
.seg button.on { background: rgba(120, 170, 255, 0.22); color: #fff; }
#expBox { display: none; margin: 6px 0 4px; }
body.exp #expBox { display: block; }
#expBox label { font-weight: 600; font-size: 13px; }
input[type=range] { width: 100%; accent-color: #6fb6ff; height: 28px; }
#windNote { margin: 2px 0 6px; }

#legend .bar { height: 10px; border-radius: 5px; margin: 6px 0 2px; }
#legend.temp .bar { background: linear-gradient(90deg, #050a24 0%, #0a2a6b 20%, #0d739e 40%, #4dbdb3 55%, #f5d66a 70%, #fa8a2e 80%, #e2333a 90%, #9e0b57 100%); }
#legend.anom .bar { background: linear-gradient(90deg, #f0faff 0%, #4dc6ff 17%, #2a6bdb 33%, #1a2133 50%, #d96c29 67%, #fa3429 83%, #ffd9bf 100%); }
#legend .ticks { display: flex; justify-content: space-between; font-size: 11px; color: #93a5bd; }
#legend.temp .ticks::before { content: "14"; } #legend.temp .ticks::after { content: "31"; }
#legend.anom .ticks::before { content: "−3"; } #legend.anom .ticks::after { content: "+3"; }
#legendTitle { font-size: 12px; color: #b6c4d6; margin-top: 4px; }

#prov { position: fixed; left: 20px; bottom: 150px; width: 330px; padding: 8px 12px; font-size: 11.5px; color: #a9b8cc; line-height: 1.35; }
#now { position: fixed; left: 20px; top: 232px; width: 400px; cursor: pointer; padding: 12px 14px; font-size: 13px; display: none;
  background: rgba(40, 12, 8, 0.66); backdrop-filter: blur(10px); border: 1px solid rgba(255, 140, 100, 0.35); border-radius: 14px; }
#now.open { display: block; }
#now p { margin: 6px 0; color: #f0dcd2; }
#nowTitle { font-weight: 650; color: #ffcfb5; }
#prov > div { margin: 3px 0; }
#prov b { color: #fff; font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.05em; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,0.1); }
#provTitle { font-weight: 600; color: #e6ecf5; font-size: 12.5px; }
.link { background: none; border: 0; padding: 0; color: #8fc4ff; text-decoration: underline; font-size: 12px; margin-top: 4px; }

#foot { position: fixed; left: 20px; right: 20px; bottom: 16px; padding: 10px 14px 8px; }
#presetsRow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#presetsTitle { color: #93a5bd; font-size: 12.5px; }
#presets { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid rgba(150, 180, 220, 0.25); background: rgba(255,255,255,0.04); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; color: #cfd9e8; }
.chip.on { background: rgba(120, 170, 255, 0.25); border-color: rgba(150, 200, 255, 0.6); color: #fff; }
#tlRow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
#bPlay { border: 1px solid rgba(150, 180, 220, 0.3); background: rgba(255,255,255,0.06); border-radius: 10px; padding: 8px 14px; min-width: 76px; }
#bPlay.on { background: rgba(120, 170, 255, 0.25); }
#tl { flex: 1; height: 64px; cursor: ew-resize; touch-action: none; }
#hintRow { font-size: 11.5px; color: #7f92ab; margin-top: 4px; }

.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; color: #dce6f3; text-shadow: 0 1px 4px #000, 0 0 10px #000; }
.lbl.big { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.lbl.small { font-size: 11px; color: #c8d3e2; }
.lbl.line { font-size: 12px; color: #fff3d6; font-weight: 600; }
.lbl.air { font-size: 13px; color: #cfe3ff; font-style: italic; }
.lbl.depth { font-size: 10.5px; color: #8ea3bf; transform-origin: right; }

#about { position: fixed; inset: 0; display: none; place-items: center; background: rgba(0,0,0,0.5); z-index: 10; }
#about.open { display: grid; }
#about .box { max-width: 640px; margin: 20px; padding: 18px 22px; max-height: 80vh; overflow: auto; }
#about h2 { margin: 0 0 8px; font-size: 18px; }
#about p { color: #c9d4e3; font-size: 13.5px; }
#bClose { border: 1px solid rgba(150, 180, 220, 0.3); background: rgba(255,255,255,0.06); border-radius: 10px; padding: 6px 14px; }

@media (max-width: 760px) {
  #head { left: 14px; top: 10px; right: 14px; }
  #head h1 { font-size: 19px; } #head p { display: none; }
  #card { left: 8px; right: 8px; top: auto; bottom: 150px; width: auto; padding: 8px 10px; }
  #date { font-size: 16px; }
  .num { margin-top: 2px; font-size: 11.5px; }
  #n34 { display: none; }
  #see { font-size: 12px; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  #see.full { -webkit-line-clamp: unset; }
  .seg { margin: 4px 0; } .seg button { padding: 5px 4px; font-size: 12px; }
  #card .segs { display: flex; gap: 6px; } #card .segs .seg { flex: 1; }
  #legend, #windNote { display: none; }
  #prov, #now { display: none !important; }
  #foot { left: 8px; right: 8px; bottom: 8px; padding: 8px 10px 6px; }
  #presets { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .chip { white-space: nowrap; }
  #presetsTitle, #hintRow { display: none; }
  #tl { height: 52px; }
  .lbl.small, .lbl.depth { display: none; }
}

#head { pointer-events: auto; }
#head h1, #head p { pointer-events: none; }
#views { width: 420px; margin-top: 10px; background: rgba(8,14,28,0.6); border: 1px solid rgba(140,170,210,0.16); }
#views button { font-size: 13.5px; padding: 8px; }
#glabels { position: fixed; inset: 0; pointer-events: none; display: none; }
body.world #glabels { display: block; } body.world #labels { display: none; }
.glbl { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; padding: 2px 0 0 12px; font-size: 11.5px; line-height: 1.2;
  color: #e9eef6; text-shadow: 0 1px 4px #000, 0 0 8px #000; white-space: nowrap; }
.glbl b { display: block; font-weight: 600; } .glbl span { color: #cfd8e6; font-size: 11px; }
.glbl.wetter span { color: #8fdcff; } .glbl.drier span { color: #ffc27a; } .glbl.warmer span { color: #ff9a8a; } .glbl.cooler span { color: #c8f3ff; } .glbl.storm span { color: #e2c4ff; }
#worldBox { display: none; } body.world #worldBox { display: block; }
body.world .pacOnly, body.world #expBox, body.world #see, body.world #prov > div:not(#provTitle):not(#wProv), body.world #bAbout { display: none !important; }
#wProv { display: none; } body.world #wProv { display: block; }
#wTitle { font-weight: 650; margin-top: 8px; } #wSee { font-size: 13px; color: #d3dceb; margin: 6px 0; }
#wLegend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; margin: 6px 0; }
.lg::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.lg.wetter::before { background: #37c3ff; } .lg.drier::before { background: #ffa53a; } .lg.warmer::before { background: #ff5a46; } .lg.cooler::before { background: #9be7ff; } .lg.storm::before { background: #d7a6ff; }
#wNote { margin-top: 4px; }
#tip { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 380px; padding: 14px 16px; display: none; z-index: 5;
  background: rgba(8, 14, 28, 0.9); border: 1px solid rgba(140, 170, 210, 0.3); border-radius: 14px; font-size: 13px; }
#tip.open { display: block; } #tip p { color: #c9d4e3; margin: 8px 0; }
@media (max-width: 760px) { #views { width: auto; } #views button { font-size: 12px; padding: 6px; } #wSee, #wNote { display: none; } .glbl span { display: none; } }

#provTitle { cursor: pointer; }
#prov:not(.full) > div:not(#provTitle) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#prov:not(.full) #provLand, #prov:not(.full) #provScale { display: none; }
#prov { bottom: 188px; }

.evt { margin: -4px 0 10px; font-size: 12.5px; color: #d3dceb; border-left: 2px solid rgba(255,150,110,0.5); padding-left: 10px; }
.evt-t { font-weight: 600; color: #ffd2bd; }
.evt ul { margin: 4px 0; padding-left: 16px; } .evt li { margin: 2px 0; }
.evt a { color: #8fc4ff; font-size: 11px; }
body.world #event { display: none; }
@media (max-width: 760px) { #event { display: none; } }

#bTour { display: inline-block; margin-top: 10px; border: 1px solid rgba(255, 190, 120, 0.5); background: linear-gradient(90deg, rgba(255,120,60,0.28), rgba(255,180,90,0.12));
  color: #ffe7d2; border-radius: 99px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
#bTour:hover { background: rgba(255,130,70,0.4); }
#tour { position: fixed; left: 20px; bottom: 188px; width: 440px; padding: 14px 16px 12px; display: none; z-index: 4;
  background: rgba(10, 16, 32, 0.86); backdrop-filter: blur(10px); border: 1px solid rgba(255, 190, 120, 0.4); border-radius: 14px; }
body.touring #tour { display: block; } body.touring #now, body.touring #prov { display: none !important; }
#tourTitle { font-weight: 650; font-size: 16px; color: #ffd9bf; margin-bottom: 6px; padding-right: 20px; }
#tourText { font-size: 13.5px; color: #dfe7f2; line-height: 1.5; } #tourText b { color: #fff; }
.tourNav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.tourNav button { border: 1px solid rgba(150, 180, 220, 0.3); background: rgba(255,255,255,0.06); border-radius: 10px; padding: 6px 14px; }
.tourNav button:disabled { opacity: 0.35; }
#tourNext { background: rgba(255, 140, 80, 0.3); border-color: rgba(255, 180, 120, 0.5); }
#tourDots span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.2); margin: 0 3px; }
#tourDots span.on { background: #ffb98a; }
#tourX { position: absolute; right: 8px; top: 6px; background: none; border: 0; font-size: 20px; color: #9fb0c6; }
@media (max-width: 760px) {
  #bTour { font-size: 12.5px; padding: 6px 12px; margin-top: 6px; }
  #tour { left: 8px; right: 8px; top: auto; bottom: 150px; width: auto; max-height: 52vh; overflow: auto; }
  body.touring #card { display: none; }
}

body.clean #card, body.clean #prov, body.clean #foot, body.clean #now, body.clean #views, body.clean #bTour, body.clean #tour { display: none !important; }

#now:not(.full) #nowBody, #now:not(.full) #nowSrc { display: none; }
#now:not(.full) { width: auto; max-width: 420px; padding: 8px 14px; }
#nowTitle::after { content: " ▸"; } #now.full #nowTitle::after { content: " ▾"; }
#nowTitle b { color: #fff; }
#now.full { max-height: calc(100vh - 440px); overflow: auto; }
#now.full ~ #prov { display: none; }

#probe { position: fixed; left: 0; top: 0; display: none; pointer-events: none; z-index: 6; padding: 6px 10px; font-size: 12.5px; background: rgba(6,10,22,0.88); border: 1px solid rgba(160,190,230,0.3); border-radius: 8px; font-variant-numeric: tabular-nums; }
#probe .dim { font-size: 11px; }

#bLang { position: fixed; right: 362px; top: 22px; z-index: 3; border: 1px solid rgba(150,180,220,0.3); background: rgba(8,14,28,0.6); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; color: #cfd9e8; }
@media (max-width: 760px) { #bLang { right: 10px; top: 12px; } #head h1 { padding-right: 44px; } }

/* телефон, повёрнутый горизонтально: невысокий экран — только главное */
@media (max-height: 520px) and (min-width: 600px) {
  #head { left: 10px; top: 6px; max-width: 46vw; }
  #head h1 { font-size: 17px; } #head p, #prov, #now, #event, #legend, #presetsTitle, #hintRow, #windNote, #n34 { display: none !important; }
  #bTour { font-size: 12px; padding: 4px 10px; margin-top: 4px; }
  #views { width: 300px; margin-top: 4px; } #views button { font-size: 12px; padding: 4px; }
  #bLang { right: 268px; top: 8px; }
  #card { top: 6px; right: 6px; width: 256px; padding: 8px 10px; max-height: calc(100vh - 118px); overflow: auto; }
  #date { font-size: 15px; } .num { font-size: 11.5px; }
  #see { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0; }
  .seg { margin: 4px 0; } .seg button { padding: 4px; font-size: 11.5px; }
  #foot { left: 6px; right: 6px; bottom: 4px; padding: 5px 8px 4px; }
  #presets { flex-wrap: nowrap; overflow-x: auto; } .chip { white-space: nowrap; padding: 3px 8px; font-size: 11.5px; }
  #tlRow { margin-top: 4px; } #tl { height: 40px; } #bPlay { padding: 5px 10px; min-width: 60px; }
  #tour { left: 6px; bottom: 104px; width: 46vw; max-height: calc(100vh - 220px); overflow: auto; padding: 8px 10px; }
  #tourText { font-size: 12px; } #tourTitle { font-size: 13.5px; }
  body.world #wSee, body.world #wNote { display: none; }
}

#bCmp { display: inline-block; margin: 10px 0 0 8px; border: 1px solid rgba(150,190,240,0.4); background: rgba(80,130,220,0.18); color: #dbe8ff; border-radius: 99px; padding: 8px 14px; font-size: 13px; }
#views { display: flex; }
#cmp { position: fixed; inset: 0; display: none; place-items: center; background: rgba(0,0,0,0.55); z-index: 10; }
#cmp.open { display: grid; }
#cmp .box { width: min(760px, 94vw); max-height: 90vh; overflow: auto; padding: 16px 20px; background: rgba(8,14,28,0.92); border: 1px solid rgba(140,170,210,0.25); border-radius: 14px; }
#cmp h2 { margin: 0 0 10px; font-size: 17px; }
.cmpRow { margin: 10px 0; } .cmpRow canvas { width: 100%; height: 110px; display: block; border-radius: 6px; image-rendering: auto; }
.cmpH { font-size: 13.5px; margin-bottom: 4px; } .cmpAx { display: flex; justify-content: space-between; font-size: 10.5px; color: #8ea3bf; }
#cmpClose { border: 1px solid rgba(150,180,220,0.3); background: rgba(255,255,255,0.06); border-radius: 10px; padding: 6px 14px; }
@media (max-width: 760px) { #bCmp { font-size: 12px; padding: 6px 10px; margin-top: 6px; } .cmpRow canvas { height: 80px; } }
@media (max-height: 520px) and (min-width: 600px) { #bCmp { display: none; } }
