[data-window-type="weather"] .retro-window { box-sizing: border-box; background: #28323d; box-shadow: 0 8px 22px #10161dcc, inset 1px 1px #6f7b82, inset -1px -1px #10171d; }
[data-window-type="weather"] .title-bar { flex-shrink: 0; background: var(--weather-title, #3c5262); color: #f0f4ef; }
[data-window-type="weather"] .title-bar.inactive { background: #8c979a; }
[data-window-type="weather"] .retro-window.show-content { display: flex; flex-direction: column; height: auto; max-height: calc(100dvh - 65px); }
[data-window-type="weather"] .retro-window.show-content .weather-content { display: block; flex: none; min-height: 0; height: auto; max-height: calc(100dvh - 90px); padding: 0; overflow-y: auto; }
[data-window-type="weather"] .retro-window.show-content .weather-widget { height: auto; }
[data-window-type="weather"] .retro-window.measure-weather { display: block; visibility: hidden; height: auto; }
[data-window-type="weather"] .retro-window.measure-weather .weather-content { display: block; height: auto; padding: 0; overflow: visible; }
[data-window-type="weather"] .retro-window.measure-weather .weather-widget { height: auto; }

.weather-widget { --ink: #e0e8e5; --muted: #9cafb6; --edge: #526772; --paper: #263640; --body: #1d2c35; --hero: #283c47; --accent: #8cb5c2; --track: #364b56; position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--ink); background: var(--body); font: 12px/1.3 "Pixelated MS Sans Serif", Arial, sans-serif; }
.weather-widget *, .weather-widget *::before, .weather-widget *::after { box-sizing: border-box; }
.weather-widget[data-sky="clear"][data-time="day"] { --ink: #f5e6c8; --muted: #c9ad8d; --edge: #695645; --paper: #3c3130; --body: #29252a; --hero: #403531; --accent: #e2ab69; --track: #53423a; }
.weather-widget[data-sky="clear"][data-time="night"] { --ink: #dce9f4; --muted: #a4b8ca; --edge: #4a5b78; --paper: #202b43; --body: #151e34; --hero: #263653; --accent: #a5bcde; --track: #334362; }
.weather-widget[data-sky="cloudy"] { --ink: #e1ebed; --muted: #b3c2c9; --edge: #61737c; --paper: #34414a; --body: #242f38; --hero: #3b4c56; --accent: #a2b8c1; --track: #4a5b65; }
.weather-widget[data-sky="rain"] { --ink: #dbeaf0; --muted: #9cb9c9; --edge: #4b6e82; --paper: #223848; --body: #162a39; --hero: #29485b; --accent: #76b6d1; --track: #33566b; }
.weather-widget[data-sky="snow"] { --ink: #e9f2f2; --muted: #b0c7d0; --edge: #62808f; --paper: #314451; --body: #263642; --hero: #395665; --accent: #c6dce4; --track: #506977; }
.weather-widget[data-sky="fog"] { --ink: #e2ece8; --muted: #b1c2bc; --edge: #667c79; --paper: #34423f; --body: #253430; --hero: #405550; --accent: #a9c3b8; --track: #52665f; }
.weather-widget[data-sky="storm"] { --ink: #e8e6f3; --muted: #b6b4cf; --edge: #5b6285; --paper: #292e48; --body: #191e34; --hero: #303a5a; --accent: #abb4e0; --track: #404b6a; }
.weather-widget::before { content: ""; position: absolute; z-index: 2; inset: 27px 0 21px; pointer-events: none; opacity: .23; }
.weather-widget[data-sky="rain"]::before { opacity: .43; background: repeating-linear-gradient(110deg, transparent 0 18px, #8ac5de 18px 20px, transparent 20px 31px); background-size: 57px 65px; animation: weather-rain 2.5s linear infinite; }
.weather-widget[data-sky="snow"]::before { opacity: .65; background: radial-gradient(circle, #eff9fb 2px, transparent 2.3px) 0 0 / 29px 33px, radial-gradient(circle, #d8e8ee 1.5px, transparent 2px) 14px 18px / 37px 41px; animation: weather-snow 10s linear infinite; }
.weather-widget[data-sky="fog"]::before { opacity: .28; background: repeating-linear-gradient(to bottom, #d2e4df 0 11px, transparent 11px 29px); animation: weather-fog 14s ease-in-out infinite alternate; }
.weather-widget[data-sky="storm"]::before { opacity: .48; background: repeating-linear-gradient(110deg, transparent 0 18px, #abb8e5 18px 20px, transparent 20px 31px); background-size: 57px 65px; animation: weather-rain 2s linear infinite, weather-flash 11s step-end infinite; }
.weather-widget[data-sky="clear"][data-time="day"]::before { opacity: var(--clear-glow-opacity, .3); background: radial-gradient(circle at 84% 8%, #e8b66e 0 28px, transparent 95px); }
.weather-widget[data-sky="clear"][data-time="night"]::before { opacity: .25; background: linear-gradient(180deg, #a9c1e622, transparent 60%); }
.weather-widget[data-sky="cloudy"]::before { z-index: 0; opacity: var(--cloud-effect-opacity, .54); background: repeating-linear-gradient(176deg, transparent 0 23px, #bdd0da55 23px 35px, transparent 35px 73px), linear-gradient(145deg, transparent 15%, #9eafbc33 50%, transparent 85%); animation: weather-clouds 18s ease-in-out infinite alternate; }
.weather-widget > * { position: relative; z-index: 1; }
.weather-widget > .weather-stars { position: absolute; z-index: 3; inset: 27px 0 21px; overflow: hidden; opacity: var(--stars-opacity, 0); pointer-events: none; }
.weather-stars i { position: absolute; display: block; background: #e4eef8; opacity: .25; animation: weather-twinkle 4s ease-in-out infinite; }
.weather-topline { flex: 0 0 27px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--edge); font-size: 12px; font-weight: bold; letter-spacing: .3px; }
.weather-date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-onair { white-space: nowrap; font-size: 11px; font-weight: normal; }
.weather-onair b { display: inline-block; width: 5px; height: 5px; margin-right: 4px; background: #8acba4; vertical-align: 1px; }
.weather-main { display: grid; grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); align-items: center; gap: 10px; min-height: 132px; padding: 10px 14px; background: var(--hero); border-bottom: 2px solid var(--edge); }
.weather-widget[data-sky="cloudy"] .weather-main { background: color-mix(in srgb, var(--hero) 66%, transparent); }
.weather-current { min-width: 0; }
.weather-widget button.weather-city { display: block; max-width: 100%; width: auto; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); font: bold 14px/1.2 "Pixelated MS Sans Serif", Arial, sans-serif; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-widget button.weather-city:is(:hover, :focus-visible) { color: #fff; text-decoration: none; }
.weather-widget button.weather-city:focus-visible { outline: 1px dotted currentColor; outline-offset: 3px; }
.weather-condition { margin: 5px 0 2px; color: var(--muted); font-size: 14px; }
.weather-temp { color: var(--ink); font: bold 50px/.95 "Pixelated MS Sans Serif", Arial, sans-serif; letter-spacing: -2px; }
.weather-temp small { font-size: 17px; letter-spacing: 0; vertical-align: 18px; }
.weather-feels { margin-top: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.weather-feels b { color: var(--ink); }
.weather-feels span { padding: 0 3px; }
.weather-trend { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 105px; padding: 7px 9px 5px; border: 1px solid var(--edge); background: var(--paper); box-shadow: inset 1px 1px #ffffff25, 2px 2px #10151e77; color: var(--ink); }
.weather-trend-heading, .weather-trend-times { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.weather-trend-heading { font-size: 11px; font-weight: bold; white-space: nowrap; }
.weather-trend-heading b { color: var(--accent); font-size: 11px; }
.weather-trend svg { display: block; width: 100%; height: 64px; background: repeating-linear-gradient(to bottom, transparent 0 15px, var(--edge) 15px 16px); }
.weather-trend-area { fill: var(--accent); opacity: .17; }
.weather-trend-line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: miter; }
.weather-trend-points circle { fill: var(--ink); stroke: var(--accent); stroke-width: 1.5; }
.weather-trend-times { color: var(--muted); font-size: 11px; }
.weather-data { flex: none; padding: 8px 12px 6px; background: transparent; }
.weather-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.weather-stat { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; min-width: 0; min-height: 47px; padding: 6px; border: 1px solid var(--edge); background: var(--paper); box-shadow: inset 1px 1px #ffffff25; }
.weather-stat span { color: var(--muted); font-size: 11px; }
.weather-stat b { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.weather-insight { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 7px; min-height: 35px; padding: 6px 10px; border: 1px solid var(--edge); background: var(--paper); }
.weather-insight > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.weather-insight > b { min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.weather-insight strong { color: var(--ink); font-size: 11px; }
.weather-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 7px; }
.weather-detail { min-width: 0; min-height: 113px; padding: 7px 10px 6px; border: 1px solid var(--edge); background: var(--paper); box-shadow: inset 1px 1px #ffffff25; }
.weather-detail-heading, .weather-detail-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.weather-detail-heading { color: var(--ink); font-size: 12px; }
.weather-detail-heading span, .weather-detail-foot { color: var(--muted); font-size: 11px; }
.weather-detail-foot { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--edge); }
.weather-detail-foot b { color: var(--ink); font-size: 11px; }
.weather-sun svg { display: block; width: 100%; height: 48px; margin-top: 1px; overflow: visible; }
.weather-sun-path, .weather-sun-progress { fill: none; stroke-width: 3; stroke-linecap: square; }
.weather-sun-path { stroke: var(--edge); stroke-dasharray: 3 3; }
.weather-sun-progress { stroke: var(--accent); stroke-dasharray: 0 100; }
.weather-sun-marker { fill: var(--ink); stroke: var(--accent); stroke-width: 2; }
.weather-sun-times { display: flex; justify-content: space-between; gap: 8px; margin-top: -5px; color: var(--muted); font-size: 11px; }
.weather-sun-times b { color: var(--ink); }
.weather-cloud-row { display: grid; grid-template-columns: 29px minmax(0, 1fr) 35px; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.weather-cloud-row b { color: var(--ink); font-size: 10px; text-align: right; }
.weather-cloud-track { height: 8px; border: 1px solid var(--edge); background: var(--track); }
.weather-cloud-track i { display: block; width: 0; height: 100%; background: var(--accent); }
.weather-cloud-detail .weather-detail-foot { margin-top: 7px; }
.weather-forecast { margin-top: 7px; padding: 7px 9px 6px; border: 1px solid var(--edge); background: var(--paper); box-shadow: inset 1px 1px #ffffff25; }
.weather-forecast-heading { display: flex; justify-content: space-between; gap: 6px; color: var(--ink); font-size: 12px; font-weight: bold; }
.weather-forecast-heading span { color: var(--muted); font-size: 11px; font-weight: normal; }
.weather-hours { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin-top: 5px; }
.weather-hour { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 3px; border-right: 1px solid var(--edge); text-align: center; }
.weather-hour:last-child { border-right: 0; }
.weather-hour b { color: var(--ink); font-size: 15px; }
.weather-hour span, .weather-hour small { color: var(--muted); font-size: 11px; }
.weather-hour-track { display: flex; align-items: end; height: 32px; border: 1px solid var(--edge); background: repeating-linear-gradient(to top, var(--edge) 0 1px, var(--track) 1px 11px); }
.weather-hour-bar { display: block; width: 100%; min-height: 3px; background: var(--accent); }
.weather-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 23px; color: var(--muted); font-size: 11px; }
.weather-note { min-width: 0; }
.weather-updated { white-space: nowrap; }
.weather-credit { flex: 0 0 21px; padding: 3px 12px; color: var(--ink); background: var(--paper); font-size: 11px; text-decoration: none; }
.weather-credit:hover, .weather-credit:focus-visible { text-decoration: underline; }
.weather-picker { position: absolute; z-index: 5; inset: 27px 0 21px; display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 20px; background: var(--body); box-shadow: inset 0 1px var(--edge); }
.weather-picker[hidden] { display: none; }
.weather-picker label, .weather-picker p { color: var(--ink); font-weight: bold; }
.weather-picker input { width: 100%; padding: 8px; border: 1px solid var(--edge); border-radius: 0; background: var(--paper); color: var(--ink); font: 12px monospace; }
.weather-picker > div { display: flex; gap: 8px; }
.weather-picker button { padding: 5px 7px; border: 1px solid var(--edge); border-radius: 0; background: var(--paper); color: var(--ink); font: bold 11px monospace; cursor: pointer; }
.weather-picker button:disabled { opacity: .5; }
.weather-picker p { min-height: 14px; font-size: 11px; }
@keyframes weather-rain { to { background-position: -57px 65px; } }
@keyframes weather-snow { to { background-position: 29px 99px, -37px 82px; } }
@keyframes weather-fog { to { transform: translateX(12px); } }
@keyframes weather-clouds { to { transform: translateX(16px); } }
@keyframes weather-flash { 0%, 96%, 98%, 100% { opacity: .23; } 97% { opacity: .5; } }
@keyframes weather-twinkle { 0%, 100% { opacity: .18; transform: scale(.7); } 50% { opacity: var(--twinkle-peak, .8); transform: scale(1.25); } }
@media (max-width: 600px) { .weather-main { grid-template-columns: 1fr; min-height: 0; padding: 10px; } .weather-temp { font-size: 42px; } .weather-feels { white-space: normal; } .weather-trend { min-height: 100px; } .weather-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .weather-insight { grid-template-columns: auto minmax(0, 1fr); } .weather-insight > span:last-child { grid-column: 1 / -1; } .weather-details { grid-template-columns: 1fr; } .weather-forecast-heading span { display: none; } }
@media (prefers-reduced-motion: reduce) { .weather-widget::before, .weather-stars i { animation: none !important; } .weather-stars i { opacity: .6; } }
