/* Погода в Нарве (/pogoda/) */
#tema-portal .tw-main{padding-bottom:64px}
#tema-portal .tw-main *{box-sizing:border-box}
#tema-portal .tw-main a{text-decoration:none!important}
#tema-portal .tw-h1{margin:20px 0 16px!important;font-size:50px!important;line-height:1.04!important;letter-spacing:-.04em!important;color:#252821!important}
#tema-portal .tw-h1 span,#tema-portal .tw-h2 span{color:#e87b17!important}
#tema-portal .tw-h2{margin:40px 0 14px!important;font-size:30px!important;line-height:1.1!important;letter-spacing:-.03em!important;color:#252821!important}
#tema-portal .tw-empty{padding:20px;border-radius:14px;background:#eee9df}

/* ---------- Sky scene ---------- */
#tema-portal .tw-scene{position:relative;min-height:320px;border-radius:22px;overflow:hidden;color:#fff;isolation:isolate}
#tema-portal .tw-scene:before{content:"";position:absolute;left:0;top:0;width:60%;height:85%;z-index:4;pointer-events:none;background:radial-gradient(ellipse at 0 0,rgba(10,20,40,.28),transparent 70%)}
#tema-portal .tw-fx{position:absolute;inset:0;z-index:2;pointer-events:none;-webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.3) 0,rgba(0,0,0,.3) 28%,#000 48%);mask-image:linear-gradient(90deg,rgba(0,0,0,.3) 0,rgba(0,0,0,.3) 28%,#000 48%)}
#tema-portal .tw-fog{position:absolute;inset:0;z-index:4;pointer-events:none}
#tema-portal .tw-now{position:relative;z-index:5;padding:30px 36px 32px;text-shadow:0 2px 14px rgba(0,0,0,.18)}
#tema-portal .tw-now>span{display:block}
#tema-portal .tw-eb{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;opacity:.9}
#tema-portal .tw-temp{margin-top:6px;font-size:104px;font-weight:800;letter-spacing:-.05em;line-height:1}
#tema-portal .tw-cond{margin-top:6px;font-size:24px;font-weight:700}
#tema-portal .tw-meta{margin-top:8px;font-size:14px;opacity:.9}
#tema-portal .tw-chips{position:absolute;right:28px;top:30px;z-index:5;display:flex;flex-direction:column;gap:8px;align-items:flex-end}
#tema-portal .tw-chips span{padding:8px 12px;border-radius:12px;background:rgba(255,255,255,.18);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);font-size:13px;font-weight:700}

#tema-portal .tw-scene{background:linear-gradient(180deg,#3f86d6 0%,#7fb6ea 55%,#cfe5f7 100%)}
#tema-portal .s-day.w-part{background:linear-gradient(180deg,#4f8acb 0%,#8bb6e0 55%,#d3e3f1 100%)}
#tema-portal .s-day.w-cloud{background:linear-gradient(180deg,#7c8fa6 0%,#a7b6c6 60%,#d5dce3 100%)}
#tema-portal .s-day.w-rain{background:linear-gradient(180deg,#56677b 0%,#7d8d9e 60%,#a9b5c1 100%)}
#tema-portal .s-day.w-snow{background:linear-gradient(180deg,#9fb2c7 0%,#c7d4e1 60%,#eef2f6 100%);color:#22303f}
#tema-portal .s-day.w-fog{background:linear-gradient(180deg,#b9bfc4 0%,#cfd3d6 60%,#e3e5e6 100%);color:#2c3136}
#tema-portal .s-day.w-snow:before,#tema-portal .s-day.w-fog:before{background:radial-gradient(ellipse at 0 0,rgba(255,255,255,.55),transparent 70%)}
#tema-portal .s-day.w-snow .tw-chips span,#tema-portal .s-day.w-fog .tw-chips span{background:rgba(255,255,255,.55)}
#tema-portal .tw-scene.s-dusk{background:linear-gradient(180deg,#2d3a6b 0%,#8a5a87 45%,#f0a36b 80%,#f7cf8f 100%);color:#fff}
#tema-portal .s-dusk.w-cloud,#tema-portal .s-dusk.w-rain,#tema-portal .s-dusk.w-fog{background:linear-gradient(180deg,#3a3f5c 0%,#6d5f78 50%,#b38a7f 100%)}
#tema-portal .tw-scene.s-night{background:linear-gradient(180deg,#0d1530 0%,#1b2a52 60%,#2d3f6e 100%);color:#fff}
#tema-portal .s-night.w-cloud,#tema-portal .s-night.w-rain,#tema-portal .s-night.w-fog{background:linear-gradient(180deg,#151a26 0%,#262d3d 60%,#3a4356 100%)}
#tema-portal .s-night.w-snow{background:linear-gradient(180deg,#1b2436 0%,#34415a 60%,#56637c 100%)}
#tema-portal .s-dusk .tw-chips span,#tema-portal .s-night .tw-chips span{background:rgba(255,255,255,.16)}

#tema-portal .tw-sun{position:absolute;right:270px;top:46px;width:92px;height:92px;border-radius:50%;background:radial-gradient(circle at 42% 40%,#fff8dc 0,#ffe27a 40%,#ffc340 100%);box-shadow:0 0 0 14px rgba(255,220,110,.16),0 0 0 34px rgba(255,220,110,.07),0 0 90px 30px rgba(255,210,90,.32);animation:tw-glow 6s ease-in-out infinite}
@keyframes tw-glow{50%{box-shadow:0 0 0 18px rgba(255,220,110,.13),0 0 0 42px rgba(255,220,110,.05),0 0 100px 36px rgba(255,210,90,.36)}}
#tema-portal .s-dusk .tw-sun{top:210px;right:240px;width:116px;height:116px;background:radial-gradient(circle at 45% 42%,#fff1cc 0,#ffbe7a 45%,#ff9459 100%);box-shadow:0 0 0 16px rgba(255,160,90,.14),0 0 100px 36px rgba(255,140,80,.4);animation:none}
#tema-portal .tw-moon{position:absolute;right:280px;top:50px;width:70px;height:70px;border-radius:50%;background:#f3f0e1;box-shadow:0 0 40px 8px rgba(243,240,225,.35)}
#tema-portal .tw-star{position:absolute;width:2px;height:2px;border-radius:50%;background:#fff;animation:tw-tw 3s ease-in-out infinite}
#tema-portal .tw-cl{position:absolute;left:0;aspect-ratio:166/82;background:rgba(255,255,255,.9);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='18 10 166 82'%3E%3Ccircle cx='45' cy='65' r='25'/%3E%3Ccircle cx='95' cy='50' r='38'/%3E%3Ccircle cx='152' cy='60' r='30'/%3E%3Crect x='45' y='60' width='107' height='30'/%3E%3C/svg%3E") center/100% 100% no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='18 10 166 82'%3E%3Ccircle cx='45' cy='65' r='25'/%3E%3Ccircle cx='95' cy='50' r='38'/%3E%3Ccircle cx='152' cy='60' r='30'/%3E%3Crect x='45' y='60' width='107' height='30'/%3E%3C/svg%3E") center/100% 100% no-repeat;animation:tw-drift linear infinite}
#tema-portal .w-rain .tw-cl,#tema-portal .s-dusk .tw-cl{background:rgba(205,212,222,.75)}
#tema-portal .s-night .tw-cl{background:rgba(120,130,150,.6)}
#tema-portal .tw-drop{position:absolute;top:-40px;width:2px;height:22px;border-radius:2px;background:linear-gradient(transparent,rgba(220,235,255,.9));animation:tw-fall linear infinite}
#tema-portal .tw-flake{position:absolute;top:-20px;border-radius:50%;background:#fff;opacity:.9;animation:tw-snow linear infinite}
#tema-portal .tw-band{position:absolute;left:-20%;width:140%;height:60px;border-radius:60px;background:rgba(255,255,255,.55);filter:blur(14px);animation:tw-fogm 18s ease-in-out infinite alternate}
#tema-portal .tw-leaf{position:absolute;top:-20px;width:12px;height:8px;border-radius:12px 0;animation:tw-leaf linear infinite}
@keyframes tw-spin{to{transform:rotate(360deg)}}
@keyframes tw-tw{50%{opacity:.25}}
@keyframes tw-drift{from{transform:translateX(-30vw)}to{transform:translateX(120vw)}}
@keyframes tw-fall{to{transform:translate(-40px,440px)}}
@keyframes tw-snow{0%{transform:translate(0,0)}50%{transform:translate(18px,200px)}100%{transform:translate(-6px,420px)}}
@keyframes tw-fogm{to{transform:translateX(8%)}}
@keyframes tw-leaf{to{transform:translate(-120px,420px) rotate(540deg)}}
@media (prefers-reduced-motion:reduce){#tema-portal .tw-scene *{animation:none!important}}

#tema-portal .tw-warn{margin:14px 0 0!important;padding:12px 16px!important;border-radius:12px;background:#fdf0e0;border-left:4px solid #e87b17;font-size:15px!important;line-height:1.4!important;color:#6b3d0c!important}

/* ---------- Today / tomorrow ---------- */
#tema-portal .tw-tcs{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}
#tema-portal .tw-tc{padding:20px 22px;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(37,40,33,.06)}
#tema-portal .tw-tc:first-child{box-shadow:inset 0 0 0 2px #e87b17}
#tema-portal .tw-tc h2{margin:0!important;font-size:24px!important;line-height:1.15!important;letter-spacing:-.02em!important;color:#252821!important}
#tema-portal .tw-tc h2 small{display:block;margin-top:2px;font-size:13px;font-weight:400;letter-spacing:0;color:#8a8c83}
#tema-portal .tw-tm{display:flex;align-items:center;gap:14px;margin-top:10px}
#tema-portal .tw-tm b{display:block;font-size:56px;line-height:1;letter-spacing:-.04em;color:#252821}
#tema-portal .tw-tm span{font-size:14px;color:#8a8c83}
#tema-portal .tw-tc p{margin:10px 0 12px!important;font-size:15px!important;line-height:1.4!important;color:#3c3e37!important}
#tema-portal .tw-sgs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
#tema-portal .tw-sgs>div{display:flex;flex-direction:column;align-items:center;padding:10px 4px;border-radius:12px;background:#f5f2ec;font-size:12px;color:#6b6d65}
#tema-portal .tw-sgs b{font-size:16px;color:#252821}

/* ---------- Hourly ---------- */
#tema-portal .tw-hrs{display:flex;gap:4px;overflow-x:auto;padding:12px;border-radius:14px;background:#fff;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
#tema-portal .tw-hrs>div{flex:0 0 62px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:12px;color:#6b6d65}
#tema-portal .tw-hrs b{font-size:15px;color:#252821}
#tema-portal .tw-hrs small{min-height:14px;font-size:11px;color:#4a90d9}

/* ---------- 10 days ---------- */
#tema-portal .tw-days{padding:4px 16px;border-radius:14px;background:#fff}
#tema-portal .tw-dr{display:grid;grid-template-columns:110px 40px minmax(0,1fr) 44px minmax(80px,170px) 44px 56px;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #f1eee7;font-size:14px;color:#252821}
#tema-portal .tw-dr:first-child{border-top:0}
#tema-portal .tw-dn{font-size:15px} #tema-portal .tw-dn small{display:block;font-weight:400;font-size:12px;color:#8a8c83}
#tema-portal .tw-ds{color:#55574f} #tema-portal .tw-mn{text-align:right;color:#8a8c83} #tema-portal .tw-mx{font-weight:700}
#tema-portal .tw-pr{text-align:right;font-size:12px;color:#4a90d9}
#tema-portal .tw-bar{position:relative;height:6px;border-radius:3px;background:#eee9df}
#tema-portal .tw-bar i{position:absolute;top:0;bottom:0;border-radius:3px;background:linear-gradient(90deg,#9ec5ef,#e87b17)}
#tema-portal .tw-ind{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:16px}
#tema-portal .tw-ib{display:flex;flex-direction:column;gap:6px;padding:18px 20px;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(37,40,33,.06)}
#tema-portal .tw-ib>span{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8a8c83}
#tema-portal .tw-ib>b{font-size:34px;line-height:1.05;letter-spacing:-.03em;color:#252821}
#tema-portal .tw-ib>b em{font-size:15px;font-style:normal;font-weight:700;letter-spacing:0;color:#6b6d65}
#tema-portal .tw-ib small{margin-top:auto;font-size:13px;line-height:1.35;color:#6b6d65}
#tema-portal .tw-ibar{position:relative;display:block;height:6px;border-radius:6px;background:#eee9df;overflow:visible}
#tema-portal .tw-ibar>i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:#4a90d9}
#tema-portal .tw-uvbar{background:linear-gradient(90deg,#3a9d4f 0,#3a9d4f 24%,#e3b23c 30%,#e3b23c 48%,#e87b17 55%,#e87b17 66%,#d0402b 73%,#d0402b 92%,#8e44ad 100%)}
#tema-portal .tw-uvbar>i{left:0;top:-3px;bottom:auto;width:12px;height:12px;margin-left:-6px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #252821}
#tema-portal .tw-chart{padding:12px 8px 4px;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(37,40,33,.06);overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
#tema-portal .tw-ch-in{position:relative;min-width:640px}
#tema-portal .tw-ch{display:block;width:100%;height:auto;touch-action:pan-x pan-y}
#tema-portal .tw-ch-t{fill:none;stroke:#e87b17;stroke-width:3.5;stroke-linecap:round}
#tema-portal .tw-ch-app{fill:none;stroke:#8a8c83;stroke-width:2;stroke-dasharray:6 6;stroke-linecap:round}
#tema-portal .tw-ch-pt{fill:#fff;stroke:#e87b17;stroke-width:2.5}
#tema-portal .tw-ch-v{font-size:18px;font-weight:700;fill:#252821;text-anchor:middle}
#tema-portal .tw-ch-h{font-size:14px;fill:#8a8c83;text-anchor:middle}
#tema-portal .tw-ch-zero{stroke:#4a90d9;stroke-width:1;stroke-dasharray:3 5;opacity:.6}
#tema-portal .tw-ch-mid{stroke:#d9d4c8;stroke-width:1.5}
#tema-portal .tw-ch-day{font-size:13px;fill:#8a8c83}
#tema-portal .tw-ch-cur,#tema-portal .tw-ch-dot{opacity:0;transition:opacity .15s}
#tema-portal .tw-ch-cur{stroke:#252821;stroke-width:1;stroke-dasharray:3 4}
#tema-portal .tw-ch-dot{fill:#e87b17;stroke:#fff;stroke-width:3}
#tema-portal .tw-ch.on .tw-ch-cur,#tema-portal .tw-ch.on .tw-ch-dot{opacity:1}
#tema-portal .tw-ch-tip{position:absolute;padding:6px 10px;border-radius:10px;background:#252821;color:#f3efe6;font-size:13px;line-height:1.35;white-space:nowrap;pointer-events:none}
#tema-portal .tw-ch-tip[hidden]{display:none!important}
#tema-portal .tw-ch-tip b{color:#fff;font-size:15px}
#tema-portal .tw-chl{display:flex;align-items:center;gap:8px;margin:10px 0 0!important;font-size:13px!important;color:#6b6d65!important}
#tema-portal .tw-chl i{display:inline-block;width:22px;height:0;border-top:3px solid #e87b17}
#tema-portal .tw-chl .tw-chl-a{margin-left:12px;border-top:2px dashed #8a8c83}
#tema-portal .tw-src{margin:22px 0 0!important;font-size:13px!important;line-height:1.5!important;color:#6b6d65!important}
#tema-portal .tw-src a{color:#c25f08!important}

@media(max-width:760px){
  #tema-portal .tw-h1{font-size:36px!important}
  #tema-portal .tw-scene{min-height:300px}
  #tema-portal .tw-now{padding:24px 22px 128px}
  #tema-portal .tw-temp{font-size:80px}
  #tema-portal .tw-chips{left:20px;right:auto;top:auto;bottom:20px;flex-direction:row;flex-wrap:wrap;align-items:flex-start}
  #tema-portal .tw-sun,#tema-portal .tw-moon{right:22px;top:22px;width:58px;height:58px}
  #tema-portal .tw-sun{box-shadow:0 0 0 8px rgba(255,220,110,.16),0 0 0 18px rgba(255,220,110,.07),0 0 50px 16px rgba(255,210,90,.3);animation:none}
  #tema-portal .tw-chips span{padding:7px 10px;font-size:12px}
  #tema-portal .s-dusk .tw-sun{right:30px;top:60px;width:90px;height:90px}
  #tema-portal .tw-tcs{grid-template-columns:1fr}
  #tema-portal .tw-ind{grid-template-columns:1fr 1fr;gap:10px}
  #tema-portal .tw-ib{padding:14px 14px}
  #tema-portal .tw-ib>b{font-size:28px}
  #tema-portal .tw-ch-in{min-width:880px}
  #tema-portal .tw-dr{grid-template-columns:70px 30px 34px 30px minmax(50px,1fr) 32px;gap:6px}
  #tema-portal .tw-dr>svg,#tema-portal .tw-dr>.tw-ic{order:1} #tema-portal .tw-pr{order:2;text-align:left;font-size:12px} #tema-portal .tw-mn{order:3} #tema-portal .tw-bar{order:4} #tema-portal .tw-mx{order:5;text-align:right}
  #tema-portal .tw-ds{display:none}
  #tema-portal .tw-h2{font-size:26px!important}
}

/* Day part with no data yet (passed before the site started storing hours) */
#tema-portal .tw-sgs .tw-sg-na{display:block;width:30px;height:30px}
#tema-portal .tw-sgs .is-na b{color:#b3b5ad}
@media(max-width:680px){#tema-portal .tw-sgs{gap:6px}#tema-portal .tw-sgs>div{padding:9px 2px}}

/* Moon: SVG with soft maria, a crater and fine grain (moon.svg) */
#tema-portal .tw-moon{background:#f4f5f7 url(moon.svg?v=2) center/cover no-repeat;box-shadow:0 0 40px 8px rgba(235,240,250,.35)}
