/*
 * weather — full-screen, signage-friendly weather dashboard.
 *
 * No CSS Grid, no custom properties (var()), no @supports gating: every
 * style is plain CSS so older signage browsers render the same layout
 * as modern desktops. Flexbox is used (it works back to IE 10 with the
 * -ms-flex- prefixes that are included below).
 */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #0b1a2a;
    color: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    text-rendering: optimizeLegibility;
}

/* -------------------------------------------------------------------------
 * Stage / atmospheric backdrop
 * --------------------------------------------------------------------- */

#wxStage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

#wxSky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1f4a7a;
    background-image:
        -webkit-linear-gradient(top, #6fb9e8 0%, #1f4a7a 70%, #0b1a2a 100%);
    background-image:
        linear-gradient(to bottom, #6fb9e8 0%, #1f4a7a 70%, #0b1a2a 100%);
    -webkit-transition: background 1500ms ease;
    -moz-transition: background 1500ms ease;
    -o-transition: background 1500ms ease;
    transition: background 1500ms ease;
}

/* Theme overrides — applied as classes on body. */

body.wxTheme-clear-day #wxSky {
    background-image:
        -webkit-linear-gradient(top, #6cc1f5 0%, #2a6fb0 60%, #143552 100%);
    background-image:
        linear-gradient(to bottom, #6cc1f5 0%, #2a6fb0 60%, #143552 100%);
}

body.wxTheme-clear-night #wxSky {
    background-image:
        -webkit-linear-gradient(top, #1d2a52 0%, #0d1530 60%, #050814 100%);
    background-image:
        linear-gradient(to bottom, #1d2a52 0%, #0d1530 60%, #050814 100%);
}

body.wxTheme-cloudy-day #wxSky {
    background-image:
        -webkit-linear-gradient(top, #9fb6c8 0%, #5a7790 60%, #2c3a4a 100%);
    background-image:
        linear-gradient(to bottom, #9fb6c8 0%, #5a7790 60%, #2c3a4a 100%);
}

body.wxTheme-cloudy-night #wxSky {
    background-image:
        -webkit-linear-gradient(top, #2a3548 0%, #18202e 60%, #080c14 100%);
    background-image:
        linear-gradient(to bottom, #2a3548 0%, #18202e 60%, #080c14 100%);
}

body.wxTheme-rain #wxSky {
    background-image:
        -webkit-linear-gradient(top, #4a5b71 0%, #2c394a 60%, #121821 100%);
    background-image:
        linear-gradient(to bottom, #4a5b71 0%, #2c394a 60%, #121821 100%);
}

body.wxTheme-snow #wxSky {
    background-image:
        -webkit-linear-gradient(top, #aebccd 0%, #6c7d92 60%, #2c3848 100%);
    background-image:
        linear-gradient(to bottom, #aebccd 0%, #6c7d92 60%, #2c3848 100%);
}

body.wxTheme-thunder #wxSky {
    background-image:
        -webkit-linear-gradient(top, #2a2738 0%, #161422 60%, #060510 100%);
    background-image:
        linear-gradient(to bottom, #2a2738 0%, #161422 60%, #060510 100%);
}

body.wxTheme-fog #wxSky {
    background-image:
        -webkit-linear-gradient(top, #8090a0 0%, #5a6878 60%, #2c343c 100%);
    background-image:
        linear-gradient(to bottom, #8090a0 0%, #5a6878 60%, #2c343c 100%);
}

#wxVignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 8;
    background-image:
        -webkit-linear-gradient(top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);
}

/* -------- Sun + Moon ---------------------------------------------------- */

#wxSun, #wxMoon {
    position: absolute;
    top: 12%;
    right: 18%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    -webkit-transition: opacity 1200ms ease;
    -moz-transition: opacity 1200ms ease;
    -o-transition: opacity 1200ms ease;
    transition: opacity 1200ms ease;
    pointer-events: none;
}

#wxSun {
    background-image:
        -webkit-radial-gradient(center, #fff7c2 0%, #ffd56b 28%, #ff9b3d 60%, rgba(255, 155, 61, 0) 75%);
    background-image:
        radial-gradient(circle at center, #fff7c2 0%, #ffd56b 28%, #ff9b3d 60%, rgba(255, 155, 61, 0) 75%);
    box-shadow: 0 0 80px 30px rgba(255, 200, 90, 0.45);
    -webkit-animation: wxSunPulse 8s ease-in-out infinite;
    -moz-animation: wxSunPulse 8s ease-in-out infinite;
    -o-animation: wxSunPulse 8s ease-in-out infinite;
    animation: wxSunPulse 8s ease-in-out infinite;
}

#wxMoon {
    background-image:
        -webkit-radial-gradient(center, #f4f4f8 0%, #d4d4dc 40%, #8a8a96 65%, rgba(138, 138, 150, 0) 75%);
    background-image:
        radial-gradient(circle at center, #f4f4f8 0%, #d4d4dc 40%, #8a8a96 65%, rgba(138, 138, 150, 0) 75%);
    box-shadow: 0 0 60px 20px rgba(220, 220, 240, 0.18);
    width: 200px;
    height: 200px;
    top: 14%;
    right: 20%;
}

body.wxTheme-clear-day #wxSun,
body.wxTheme-cloudy-day #wxSun {
    opacity: 1;
}

body.wxTheme-clear-night #wxMoon,
body.wxTheme-cloudy-night #wxMoon {
    opacity: 1;
}

/* The pulse animation only animates `transform` — opacity is intentionally
 * left out so the static, theme-controlled opacity (1 by day, 0 by night)
 * still wins. Including opacity in the keyframes would force the sun to
 * appear at night because a running animation overrides static property
 * values. All four prefixed @keyframes blocks for compatibility. */
@-webkit-keyframes wxSunPulse {
    0%, 100% { -webkit-transform: scale(1); }
    50%      { -webkit-transform: scale(1.04); }
}
@-moz-keyframes wxSunPulse {
    0%, 100% { -moz-transform: scale(1); }
    50%      { -moz-transform: scale(1.04); }
}
@-o-keyframes wxSunPulse {
    0%, 100% { -o-transform: scale(1); }
    50%      { -o-transform: scale(1.04); }
}
@keyframes wxSunPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* -------- Stars (clear night) ------------------------------------------ */

#wxStars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    z-index: 2;
    opacity: 0;
    -webkit-transition: opacity 1500ms ease;
    -moz-transition: opacity 1500ms ease;
    -o-transition: opacity 1500ms ease;
    transition: opacity 1500ms ease;
    pointer-events: none;
    /* A static starfield drawn with multiple radial-gradients. Cheap and
       resolution independent. */
    background-image:
        -webkit-radial-gradient(2px 2px at 5% 14%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 12% 30%, #fff, transparent),
        -webkit-radial-gradient(2px 2px at 22% 9%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 30% 22%, #d6e5ff, transparent),
        -webkit-radial-gradient(1px 1px at 38% 6%, #fff, transparent),
        -webkit-radial-gradient(2px 2px at 47% 25%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 55% 12%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 64% 18%, #d6e5ff, transparent),
        -webkit-radial-gradient(2px 2px at 73% 4%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 81% 28%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 90% 11%, #fff, transparent),
        -webkit-radial-gradient(2px 2px at 96% 21%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 8% 45%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 19% 55%, #d6e5ff, transparent),
        -webkit-radial-gradient(2px 2px at 33% 62%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 49% 50%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 60% 64%, #fff, transparent),
        -webkit-radial-gradient(2px 2px at 70% 48%, #fff, transparent),
        -webkit-radial-gradient(1px 1px at 84% 60%, #d6e5ff, transparent),
        -webkit-radial-gradient(1px 1px at 92% 52%, #fff, transparent);
    background-image:
        radial-gradient(2px 2px at 5% 14%, #fff, transparent),
        radial-gradient(1px 1px at 12% 30%, #fff, transparent),
        radial-gradient(2px 2px at 22% 9%, #fff, transparent),
        radial-gradient(1px 1px at 30% 22%, #d6e5ff, transparent),
        radial-gradient(1px 1px at 38% 6%, #fff, transparent),
        radial-gradient(2px 2px at 47% 25%, #fff, transparent),
        radial-gradient(1px 1px at 55% 12%, #fff, transparent),
        radial-gradient(1px 1px at 64% 18%, #d6e5ff, transparent),
        radial-gradient(2px 2px at 73% 4%, #fff, transparent),
        radial-gradient(1px 1px at 81% 28%, #fff, transparent),
        radial-gradient(1px 1px at 90% 11%, #fff, transparent),
        radial-gradient(2px 2px at 96% 21%, #fff, transparent),
        radial-gradient(1px 1px at 8% 45%, #fff, transparent),
        radial-gradient(1px 1px at 19% 55%, #d6e5ff, transparent),
        radial-gradient(2px 2px at 33% 62%, #fff, transparent),
        radial-gradient(1px 1px at 49% 50%, #fff, transparent),
        radial-gradient(1px 1px at 60% 64%, #fff, transparent),
        radial-gradient(2px 2px at 70% 48%, #fff, transparent),
        radial-gradient(1px 1px at 84% 60%, #d6e5ff, transparent),
        radial-gradient(1px 1px at 92% 52%, #fff, transparent);
    /* No animation here — the twinkle runs only when stars are visible
     * (clear-night theme). Otherwise the running animation would force
     * the stars to be visible on day themes. */
}

body.wxTheme-clear-night #wxStars {
    opacity: 1;
    -webkit-animation: wxStarTwinkle 6s ease-in-out infinite;
    -moz-animation: wxStarTwinkle 6s ease-in-out infinite;
    -o-animation: wxStarTwinkle 6s ease-in-out infinite;
    animation: wxStarTwinkle 6s ease-in-out infinite;
}

/* The twinkle animates between two visible opacity values; it can do that
 * safely now because the rule only runs while the stars are themed-visible. */
@-webkit-keyframes wxStarTwinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}
@-moz-keyframes wxStarTwinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}
@-o-keyframes wxStarTwinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}
@keyframes wxStarTwinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}

/* -------- Clouds -------------------------------------------------------- */

#wxClouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.wxCloud {
    position: absolute;
    border-radius: 80px;
    background-color: #fff;
    opacity: 0;
    -webkit-transition: opacity 1500ms ease;
    -moz-transition: opacity 1500ms ease;
    -o-transition: opacity 1500ms ease;
    transition: opacity 1500ms ease;
    box-shadow:
        80px 0 0 -10px #fff,
        -90px 6px 0 -16px #fff,
        160px -10px 0 -20px #fff;
}

.wxCloud1 { top: 8%;  left: -200px; width: 220px; height: 60px;
    -webkit-animation: wxDriftA 90s linear infinite;
    -moz-animation: wxDriftA 90s linear infinite;
    -o-animation: wxDriftA 90s linear infinite;
    animation: wxDriftA 90s linear infinite; }
.wxCloud2 { top: 24%; left: -260px; width: 280px; height: 70px;
    -webkit-animation: wxDriftB 130s linear infinite;
    -moz-animation: wxDriftB 130s linear infinite;
    -o-animation: wxDriftB 130s linear infinite;
    animation: wxDriftB 130s linear infinite; }
.wxCloud3 { top: 40%; left: -200px; width: 200px; height: 55px;
    -webkit-animation: wxDriftA 110s linear infinite;
    -moz-animation: wxDriftA 110s linear infinite;
    -o-animation: wxDriftA 110s linear infinite;
    animation: wxDriftA 110s linear infinite; }
.wxCloud4 { top: 16%; left: -240px; width: 250px; height: 65px;
    -webkit-animation: wxDriftB 160s linear infinite;
    -moz-animation: wxDriftB 160s linear infinite;
    -o-animation: wxDriftB 160s linear infinite;
    animation: wxDriftB 160s linear infinite; }

body.wxTheme-clear-day .wxCloud,
body.wxTheme-clear-night .wxCloud { opacity: 0; }

body.wxTheme-cloudy-day .wxCloud,
body.wxTheme-cloudy-night .wxCloud,
body.wxTheme-rain .wxCloud,
body.wxTheme-snow .wxCloud,
body.wxTheme-thunder .wxCloud {
    opacity: 0.85;
}

body.wxTheme-cloudy-night .wxCloud,
body.wxTheme-rain .wxCloud,
body.wxTheme-snow .wxCloud,
body.wxTheme-thunder .wxCloud {
    background-color: #c4ccd8;
    box-shadow:
        80px 0 0 -10px #c4ccd8,
        -90px 6px 0 -16px #c4ccd8,
        160px -10px 0 -20px #c4ccd8;
    opacity: 0.7;
}

/* Cloud drifts animate `left` (a percentage) instead of `translateX(vw)`
 * so they work on older browsers that don't support vw units (IE 9, Safari <6,
 * Firefox <19, older Android). All four prefixed @keyframes blocks are
 * present so Presto Opera and Firefox 5-15 also pick up the animation. */
@-webkit-keyframes wxDriftA {
    0%   { left: -300px; }
    100% { left: 110%; }
}
@-moz-keyframes wxDriftA {
    0%   { left: -300px; }
    100% { left: 110%; }
}
@-o-keyframes wxDriftA {
    0%   { left: -300px; }
    100% { left: 110%; }
}
@keyframes wxDriftA {
    0%   { left: -300px; }
    100% { left: 110%; }
}

@-webkit-keyframes wxDriftB {
    0%   { left: -350px; }
    100% { left: 110%; }
}
@-moz-keyframes wxDriftB {
    0%   { left: -350px; }
    100% { left: 110%; }
}
@-o-keyframes wxDriftB {
    0%   { left: -350px; }
    100% { left: 110%; }
}
@keyframes wxDriftB {
    0%   { left: -350px; }
    100% { left: 110%; }
}

/* -------- Precipitation / Fog overlays --------------------------------- */

#wxPrecip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    opacity: 0;
    -webkit-transition: opacity 1500ms ease;
    -moz-transition: opacity 1500ms ease;
    -o-transition: opacity 1500ms ease;
    transition: opacity 1500ms ease;
    pointer-events: none;
}

body.wxTheme-rain #wxPrecip,
body.wxTheme-thunder #wxPrecip {
    opacity: 0.55;
    background-image:
        -webkit-repeating-linear-gradient(
            100deg,
            rgba(180, 210, 245, 0)   0px,
            rgba(180, 210, 245, 0)   8px,
            rgba(180, 210, 245, 0.7) 9px,
            rgba(180, 210, 245, 0)   12px
        );
    background-image:
        repeating-linear-gradient(
            -10deg,
            rgba(180, 210, 245, 0)   0px,
            rgba(180, 210, 245, 0)   8px,
            rgba(180, 210, 245, 0.7) 9px,
            rgba(180, 210, 245, 0)   12px
        );
    background-size: 100px 100px;
    -webkit-animation: wxRain 0.8s linear infinite;
    -moz-animation: wxRain 0.8s linear infinite;
    -o-animation: wxRain 0.8s linear infinite;
    animation: wxRain 0.8s linear infinite;
}

body.wxTheme-snow #wxPrecip {
    opacity: 0.75;
    background-image:
        -webkit-radial-gradient(2px 2px at 10% 0%,  #fff, transparent),
        -webkit-radial-gradient(2px 2px at 25% 0%,  #fff, transparent),
        -webkit-radial-gradient(3px 3px at 40% 0%,  #fff, transparent),
        -webkit-radial-gradient(2px 2px at 60% 0%,  #fff, transparent),
        -webkit-radial-gradient(2px 2px at 75% 0%,  #fff, transparent),
        -webkit-radial-gradient(3px 3px at 90% 0%,  #fff, transparent);
    background-image:
        radial-gradient(2px 2px at 10% 0%,  #fff, transparent),
        radial-gradient(2px 2px at 25% 0%,  #fff, transparent),
        radial-gradient(3px 3px at 40% 0%,  #fff, transparent),
        radial-gradient(2px 2px at 60% 0%,  #fff, transparent),
        radial-gradient(2px 2px at 75% 0%,  #fff, transparent),
        radial-gradient(3px 3px at 90% 0%,  #fff, transparent);
    background-size: 100% 200px;
    background-repeat: repeat;
    -webkit-animation: wxSnow 9s linear infinite;
    -moz-animation: wxSnow 9s linear infinite;
    -o-animation: wxSnow 9s linear infinite;
    animation: wxSnow 9s linear infinite;
}

@-webkit-keyframes wxRain {
    0%   { background-position: 0 0; }
    100% { background-position: -25px 100px; }
}
@keyframes wxRain {
    0%   { background-position: 0 0; }
    100% { background-position: -25px 100px; }
}
@-webkit-keyframes wxSnow {
    0%   { background-position: 0 -200px; }
    100% { background-position: 50px 100%; }
}
@keyframes wxSnow {
    0%   { background-position: 0 -200px; }
    100% { background-position: 50px 100%; }
}

#wxFog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    opacity: 0;
    -webkit-transition: opacity 1500ms ease;
    -moz-transition: opacity 1500ms ease;
    -o-transition: opacity 1500ms ease;
    transition: opacity 1500ms ease;
    pointer-events: none;
    background-image:
        -webkit-linear-gradient(top,
            rgba(220, 230, 240, 0)   0%,
            rgba(220, 230, 240, 0.4) 35%,
            rgba(220, 230, 240, 0.55) 60%,
            rgba(220, 230, 240, 0)   100%);
    background-image:
        linear-gradient(to bottom,
            rgba(220, 230, 240, 0)   0%,
            rgba(220, 230, 240, 0.4) 35%,
            rgba(220, 230, 240, 0.55) 60%,
            rgba(220, 230, 240, 0)   100%);
}

body.wxTheme-fog #wxFog {
    opacity: 1;
}

/* -------------------------------------------------------------------------
 * Header
 * --------------------------------------------------------------------- */

#wxHeader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 28px 56px 0 56px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

#wxLocation {
    line-height: 1.2;
}

#wxLocName {
    display: block;
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 1px;
}

#wxLocCountry {
    display: block;
    font-size: 16px;
    font-weight: 300;
    color: #cbe2f5;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}

#wxClock {
    text-align: right;
    line-height: 1.2;
}

#wxTime {
    display: block;
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 2px;
}

#wxDate {
    display: block;
    font-size: 14px;
    color: #cbe2f5;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* -------------------------------------------------------------------------
 * Pages container
 * --------------------------------------------------------------------- */

#wxPages {
    position: absolute;
    top: 130px;
    left: 0;
    right: 0;
    bottom: 80px;
    z-index: 15;
    overflow: hidden; /* never let a page push the viewport into scrolling */
}

.wxPage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 56px;
    box-sizing: border-box;
    opacity: 0;
    -webkit-transform: translateY(28px);
    -ms-transform: translateY(28px);
    transform: translateY(28px);
    -webkit-transition: opacity 700ms ease, -webkit-transform 700ms ease;
    -moz-transition: opacity 700ms ease, transform 700ms ease;
    -o-transition: opacity 700ms ease, transform 700ms ease;
    transition: opacity 700ms ease, transform 700ms ease;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.wxPage.wxPageActive {
    opacity: 1;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

.wxPageTitle {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #cbe2f5;
    margin: 0 0 24px 0;
}

/* -------- Page: Now ---------------------------------------------------- */

.wxPageNow {
    text-align: center;
}

.wxNowMain {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-top: 40px;
}

.wxNowIcon {
    width: 220px;
    height: 220px;
    margin-right: 36px;
    -webkit-animation: wxIconBob 5s ease-in-out infinite;
    -moz-animation: wxIconBob 5s ease-in-out infinite;
    -o-animation: wxIconBob 5s ease-in-out infinite;
    animation: wxIconBob 5s ease-in-out infinite;
}

.wxNowIcon svg {
    width: 100%;
    height: 100%;
}

@-webkit-keyframes wxIconBob {
    0%, 100% { -webkit-transform: translateY(0); }
    50%      { -webkit-transform: translateY(-10px); }
}
@keyframes wxIconBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.wxNowTemp {
    font-size: 240px;
    font-weight: 100;
    line-height: 1;
    letter-spacing: -6px;
    color: #fff;
}

.wxNowTempUnit {
    font-size: 80px;
    vertical-align: top;
    margin-left: 8px;
    color: #cbe2f5;
}

.wxNowCond {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 4px;
    margin-top: -20px;
    color: #fff;
}

.wxNowMeta {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-top: 50px;
}

.wxNowMetaItem {
    margin: 0 28px;
    text-align: center;
    padding: 18px 28px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.10);
    min-width: 130px;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.wxNowMetaLabel {
    font-size: 12px;
    color: #cbe2f5;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.wxNowMetaVal {
    font-size: 32px;
    font-weight: 300;
}

.wxNowMetaUnit {
    font-size: 14px;
    color: #cbe2f5;
    margin-left: 4px;
    letter-spacing: 1px;
}

.wxDeg {
    color: #cbe2f5;
}

/* -------- Page: Hourly ------------------------------------------------- */

.wxHourly {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    height: 70%;
    padding: 0 8px;
}

.wxHourCol {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 0;
    flex: 1 1 0;
    text-align: center;
    padding: 6px 4px;
    margin: 0 2px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-transition: background-color 250ms ease;
    -moz-transition: background-color 250ms ease;
    -o-transition: background-color 250ms ease;
    transition: background-color 250ms ease;
}

.wxHourCol.wxHourNow {
    background-color: rgba(255, 200, 90, 0.18);
    border-color: rgba(255, 200, 90, 0.45);
}

.wxHourTime {
    font-size: 13px;
    color: #cbe2f5;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.wxHourIcon {
    width: 40px;
    height: 40px;
    margin: 4px auto 6px auto;
}

.wxHourIcon svg {
    width: 100%;
    height: 100%;
}

.wxHourTemp {
    font-size: 22px;
    font-weight: 300;
    margin-top: 4px;
}

.wxHourPrecip {
    margin-top: 8px;
    font-size: 11px;
    color: #8ec8ff;
    letter-spacing: 1px;
}

.wxHourPrecipBarTrack {
    width: 70%;
    margin: 4px auto 0 auto;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.10);
    border-radius: 2px;
    overflow: hidden;
}

.wxHourPrecipBar {
    height: 100%;
    background-color: #6cb8ff;
    width: 0;
    -webkit-transition: width 600ms ease;
    -moz-transition: width 600ms ease;
    -o-transition: width 600ms ease;
    transition: width 600ms ease;
}

/* -------- Page: 7-day forecast ----------------------------------------- */

.wxForecast {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.wxDay {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.wxDay.wxDayToday {
    background-color: rgba(255, 200, 90, 0.16);
    border-color: rgba(255, 200, 90, 0.40);
}

.wxDayName {
    width: 130px;
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 1px;
}

.wxDayIcon {
    width: 56px;
    height: 56px;
    margin: 0 18px 0 6px;
}

.wxDayIcon svg {
    width: 100%;
    height: 100%;
}

.wxDayCond {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    font-size: 16px;
    color: #d8e7f5;
    letter-spacing: 1px;
}

.wxDayPrecip {
    width: 100px;
    text-align: right;
    font-size: 14px;
    color: #8ec8ff;
    margin-right: 24px;
    letter-spacing: 1px;
}

.wxDayRange {
    width: 280px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.wxDayLow {
    width: 50px;
    text-align: right;
    color: #8ec8ff;
    font-size: 18px;
    margin-right: 10px;
}

.wxDayHigh {
    width: 50px;
    text-align: left;
    color: #ff9f6c;
    font-size: 18px;
    margin-left: 10px;
}

.wxDayBarTrack {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.10);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.wxDayBar {
    position: absolute;
    height: 100%;
    background-image:
        -webkit-linear-gradient(left, #6cb8ff 0%, #ffd56b 60%, #ff7a4a 100%);
    background-image:
        linear-gradient(to right, #6cb8ff 0%, #ffd56b 60%, #ff7a4a 100%);
    border-radius: 3px;
}

/* -------- Page: Details ------------------------------------------------ */

.wxDetails {
    /* 4 columns x 2 rows = 8 cells. Plain floats so the grid wraps reliably
       on every browser, including older signage devices that don't fully
       support flex-wrap. The :after rule below acts as a clearfix. */
    width: 100%;
    zoom: 1; /* IE6/7 hasLayout */
}

.wxDetails:before,
.wxDetails:after {
    content: " ";
    display: table;
}

.wxDetails:after {
    clear: both;
}

.wxStat {
    /* Four equal columns with a thin gutter. 4 cards + 3 gutters = 100% */
    float: left;
    width: 23.5%;
    margin-right: 2%;
    margin-bottom: 18px;
    box-sizing: border-box;
    padding: 18px 22px;
    background-color: rgba(12, 22, 38, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    /* Fixed height for visual consistency across the grid. */
    height: 140px;
    position: relative;
}

/* Right-most card in each row gets no right margin so the row fits exactly. */
.wxStat:nth-of-type(4n) {
    margin-right: 0;
}

.wxStatLabel {
    font-size: 12px;
    color: #cbe2f5;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.wxStatValueRow {
    margin-bottom: 10px;
}

.wxStatValue {
    font-size: 38px;
    font-weight: 300;
    line-height: 1;
}

.wxStatUnit {
    font-size: 15px;
    color: #cbe2f5;
    margin-left: 4px;
    letter-spacing: 1px;
}

.wxStatBarTrack {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.10);
    border-radius: 3px;
    overflow: hidden;
}

.wxStatBar {
    height: 100%;
    width: 0;
    background-color: #6cb8ff;
    -webkit-transition: width 700ms ease;
    -moz-transition: width 700ms ease;
    -o-transition: width 700ms ease;
    transition: width 700ms ease;
}

.wxStatBarUv {
    background-image:
        -webkit-linear-gradient(left, #6cd56b 0%, #ffd56b 30%, #ff8a3d 60%, #d83d6c 80%, #9d3dd8 100%);
    background-image:
        linear-gradient(to right, #6cd56b 0%, #ffd56b 30%, #ff8a3d 60%, #d83d6c 80%, #9d3dd8 100%);
}

/* -- Wind panel internals -- */

.wxStat.wxStatWind {
    width: 23.5%;
}

.wxStatWindMeta {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 14px;
    line-height: 34px; /* match the arrow badge height for vertical centring */
}

.wxWindArrowWrap {
    display: inline-block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 213, 107, 0.45);
    background-color: rgba(255, 213, 107, 0.10);
    color: #ffd56b;
    font-size: 18px;
    line-height: 30px; /* vertically centres the arrow glyph */
    text-align: center;
    margin-right: 12px;
    vertical-align: middle;
    -webkit-transition: -webkit-transform 600ms ease;
    -moz-transition: transform 600ms ease;
    -o-transition: transform 600ms ease;
    transition: transform 600ms ease;
    box-shadow: 0 0 8px rgba(255, 213, 107, 0.20);
    box-sizing: border-box;
}

.wxWindArrow {
    display: inline-block;
    /* Rotation is set inline via JS on the wrapper. */
}

.wxStatWindDir {
    color: #ffd56b;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: 3px;
    vertical-align: middle;
}

/* -------- Page: Sun ---------------------------------------------------- */

.wxSunCard {
    margin-top: 20px;
}

.wxSunArcWrap {
    position: relative;
    margin-bottom: 32px;
    padding-top: 12px;
}

.wxSunSvg {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: block;
    height: auto;
}

.wxSunArcTrack {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 4;
    stroke-linecap: round;
}

.wxSunArc {
    fill: none;
    stroke: url(#wxArcGrad);
    stroke-width: 6;
    stroke-linecap: round;
}

.wxSunHorizon {
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1;
    stroke-dasharray: 4 6;
}

.wxSunDot {
    fill: #ffd56b;
    -webkit-filter: drop-shadow(0 0 8px rgba(255, 213, 107, 0.8));
    filter: drop-shadow(0 0 8px rgba(255, 213, 107, 0.8));
}

.wxSunTimes {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    max-width: 720px;
    margin: -16px auto 0 auto;
    padding: 0 24px;
}

.wxSunTimeLabel {
    font-size: 12px;
    color: #cbe2f5;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.wxSunTimeVal {
    font-size: 32px;
    font-weight: 300;
    color: #ffd56b;
}

.wxSunMeta {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-top: 20px;
}

.wxSunMetaItem {
    margin: 0 24px;
    text-align: center;
    padding: 18px 26px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    min-width: 160px;
}

.wxSunMetaLabel {
    font-size: 12px;
    color: #cbe2f5;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.wxSunMetaVal {
    font-size: 26px;
    font-weight: 300;
}

/* -------------------------------------------------------------------------
 * Page indicator dots
 * --------------------------------------------------------------------- */

#wxPager {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 30;
}

.wxPagerDot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    -webkit-transition: background-color 350ms ease, -webkit-transform 350ms ease;
    -moz-transition: background-color 350ms ease, transform 350ms ease;
    -o-transition: background-color 350ms ease, transform 350ms ease;
    transition: background-color 350ms ease, transform 350ms ease;
    vertical-align: middle;
}

.wxPagerDot.wxPagerDotActive {
    background-color: #ffd56b;
    -webkit-transform: scale(1.4);
    -ms-transform: scale(1.4);
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(255, 213, 107, 0.8);
}

/* -------------------------------------------------------------------------
 * QR code + help
 * --------------------------------------------------------------------- */

#wxQrCode {
    display: block;
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 30;
    width: 96px;
    height: 96px;
    padding: 6px;
    box-sizing: content-box;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    opacity: 0.92;
}

/* The QRCode library generates a fixed-size <img>/<canvas>/<table>; force
 * it to scale down with our responsive container so narrow viewports
 * don't see the QR overflow its bordered tile. */
#wxQrCode > img,
#wxQrCode > canvas,
#wxQrCode > table {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

#wxStatus {
    position: absolute;
    bottom: 6px;
    right: 12px;
    z-index: 35;
    color: #888;
    font-size: 11px;
    text-shadow: 0 1px 2px #000;
}

#wxAttribution {
    position: absolute;
    bottom: 6px;
    left: 16px;
    z-index: 35;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    letter-spacing: 1px;
}

#wxAttribution span {
    color: rgba(255, 255, 255, 0.7);
}

/* -------- Loading state ------------------------------------------------ */

body.wxLoading #wxLocName { font-style: italic; color: #cbe2f5; }

/* -------------------------------------------------------------------------
 * Responsive tweaks (keeps the layout sane on smaller signage screens)
 * --------------------------------------------------------------------- */

@media (max-width: 1280px) {
    #wxHeader { padding: 24px 36px 0 36px; }
    .wxPage { padding: 12px 36px; }
    .wxNowTemp { font-size: 200px; }
    .wxNowIcon { width: 180px; height: 180px; }
    .wxStat,
    .wxStat.wxStatWind { width: 32%; margin-right: 2%; }
    .wxStat:nth-of-type(4n) { margin-right: 2%; }   /* reset the 4-up rule */
    .wxStat:nth-of-type(3n) { margin-right: 0; }    /* row break at every 3 */
    .wxStatValue { font-size: 34px; }
}

@media (max-width: 960px) {
    #wxLocName { font-size: 26px; }
    #wxTime    { font-size: 26px; }
    .wxNowTemp { font-size: 150px; }
    .wxNowTempUnit { font-size: 56px; }
    .wxNowIcon { width: 140px; height: 140px; margin-right: 16px; }
    .wxNowMetaItem { margin: 0 8px; min-width: 90px; padding: 12px 14px; }
    .wxNowMetaVal { font-size: 22px; }
    .wxStat,
    .wxStat.wxStatWind { width: 49%; margin-right: 2%; }
    .wxStat:nth-of-type(3n) { margin-right: 2%; }   /* reset the 3-up rule */
    .wxStat:nth-of-type(4n) { margin-right: 2%; }   /* reset the 4-up rule */
    .wxStat:nth-of-type(2n) { margin-right: 0; }    /* row break at every 2 */
    .wxNowMetaItem { margin: 4px 6px; min-width: 80px; padding: 10px 12px; }
    .wxStatValue { font-size: 30px; }
    .wxNowMeta { -ms-flex-wrap: wrap; flex-wrap: wrap; }
    /* Sun page: smaller arc, wrap meta on tablet */
    .wxSunMetaItem { padding: 14px 18px; min-width: 120px; margin: 6px; }
    .wxSunMeta { -ms-flex-wrap: wrap; flex-wrap: wrap; }
}

/* -------------------------------------------------------------------------
 * Phone / portrait — aggressively compact so nothing overflows or scrolls.
 * --------------------------------------------------------------------- */

@media (max-width: 640px) {
    /* Page chrome */
    #wxHeader { padding: 12px 14px 0 14px; }
    .wxPage   { padding: 8px 14px; }
    #wxPages  { top: 92px; bottom: 56px; }
    .wxPageTitle { font-size: 14px; letter-spacing: 3px; margin-bottom: 12px; }

    /* Header — let it wrap and drop the country label if it's too long */
    #wxLocName { font-size: 20px; letter-spacing: 0.5px; }
    #wxLocCountry { font-size: 10px; letter-spacing: 1.5px; }
    #wxTime    { font-size: 22px; letter-spacing: 1px; }
    #wxDate    { font-size: 10px; letter-spacing: 1.5px; }

    /* Decorative sun/moon — much smaller so they don't dominate the screen */
    #wxSun  { width: 140px; height: 140px; top: 6%; right: 8%;
              box-shadow: 0 0 36px 12px rgba(255, 200, 90, 0.40); }
    #wxMoon { width: 100px; height: 100px; top: 7%; right: 10%;
              box-shadow: 0 0 28px 8px rgba(220, 220, 240, 0.18); }

    /* Now page — vertical stack */
    .wxNowMain { -ms-flex-direction: column; -webkit-box-orient: vertical; flex-direction: column; }
    .wxNowIcon { margin: 0 0 4px 0; width: 96px; height: 96px; }
    .wxNowTemp { font-size: 96px; letter-spacing: -3px; }
    .wxNowTempUnit { font-size: 36px; }
    .wxNowCond { font-size: 18px; letter-spacing: 2px; margin-top: 0; }
    .wxNowMeta { -ms-flex-wrap: wrap; flex-wrap: wrap; margin-top: 18px; }
    .wxNowMetaItem { margin: 4px; min-width: 70px; padding: 8px 10px; }
    .wxNowMetaLabel { font-size: 10px; letter-spacing: 1px; margin-bottom: 4px; }
    .wxNowMetaVal { font-size: 18px; }

    /* Hourly — fewer cards (JS drops to 6). Cards sit right under the
       title (no 70%-height bottom alignment) so the page doesn't leave a
       big empty gap on portrait. */
    .wxHourly { height: auto;
        -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
    .wxHourCol { padding: 6px 4px; margin: 0 2px;
                 -webkit-box-flex: 1; -ms-flex: 1 1 0; flex: 1 1 0; }
    .wxHourTime  { font-size: 11px; letter-spacing: 0.5px; }
    .wxHourTemp  { font-size: 18px; }
    .wxHourIcon  { width: 32px; height: 32px; }
    .wxHourPrecip{ font-size: 10px; margin-top: 4px; }
    .wxHourPrecipBarTrack { width: 80%; }

    /* Forecast — drop condition column, tighten everything */
    .wxDay      { padding: 8px 10px; margin-bottom: 6px; }
    .wxDayName  { width: 60px; font-size: 13px; }
    .wxDayIcon  { width: 32px; height: 32px; margin: 0 8px 0 4px; }
    .wxDayCond  { display: none; }
    .wxDayPrecip{ width: 50px; font-size: 11px; margin-right: 6px; letter-spacing: 0.5px; }
    .wxDayRange { width: 130px; }
    .wxDayLow, .wxDayHigh { font-size: 13px; width: 30px; }

    /* Conditions — full-width single column */
    .wxStat,
    .wxStat.wxStatWind { width: 100%; margin-right: 0; height: auto; min-height: 100px; padding: 12px 14px; }
    .wxStat:nth-of-type(2n),
    .wxStat:nth-of-type(3n),
    .wxStat:nth-of-type(4n) { margin-right: 0; }
    .wxStatValue { font-size: 26px; }
    .wxStatBarTrack { left: 14px; right: 14px; bottom: 12px; }
    .wxStatWindMeta { left: 14px; right: 14px; bottom: 10px; }

    /* Sun page — stack meta vertically, scale the arc */
    .wxSunArcWrap { margin-bottom: 16px; padding-top: 4px; }
    .wxSunSvg     { max-width: 100%; }
    .wxSunTimes   { padding: 0 10px; margin-top: -10px; }
    .wxSunTimeVal { font-size: 20px; }
    .wxSunTimeLabel { font-size: 10px; letter-spacing: 2px; }
    .wxSunMeta {
        -webkit-box-orient: vertical; -webkit-box-direction: normal;
        -ms-flex-direction: column; flex-direction: column;
        -ms-flex-wrap: nowrap; flex-wrap: nowrap;
        margin-top: 12px;
    }
    .wxSunMetaItem {
        margin: 4px 0;
        padding: 8px 12px;
        min-width: 0;
        text-align: left;
        display: -webkit-box; display: -ms-flexbox; display: flex;
        -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
        -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    }
    .wxSunMetaLabel { font-size: 10px; margin-bottom: 0; letter-spacing: 1.5px; }
    .wxSunMetaVal   { font-size: 16px; }

    /* QR code: smaller, hide the help label */
    #wxQrCode { width: 64px; height: 64px; padding: 4px; bottom: 16px; right: 12px; }

    #wxAttribution { font-size: 9px; left: 8px; bottom: 4px; }
    #wxStatus      { font-size: 9px; right: 8px; bottom: 4px; }
}

/* Very narrow / older phones — squeeze everything one more notch */
@media (max-width: 380px) {
    #wxLocName { font-size: 16px; }
    #wxTime    { font-size: 18px; }
    .wxNowTemp { font-size: 80px; }
    .wxNowTempUnit { font-size: 28px; }
    .wxNowIcon { width: 80px; height: 80px; }
    .wxNowMetaVal { font-size: 16px; }
    .wxNowMetaItem { min-width: 60px; padding: 6px 8px; }
    .wxHourTemp { font-size: 16px; }
    .wxHourIcon { width: 26px; height: 26px; }
    .wxDayName  { width: 52px; font-size: 12px; }
    .wxDayRange { width: 110px; }
    .wxDayPrecip{ width: 42px; font-size: 10px; }
    .wxStatValue { font-size: 22px; }
    #wxQrCode { width: 56px; height: 56px; }
}

/* Landscape phone — keep the sun/moon decoratives small to avoid overlap */
@media (max-width: 900px) and (orientation: landscape) {
    #wxSun  { width: 140px; height: 140px; }
    #wxMoon { width: 100px; height: 100px; }
    #wxPages { top: 80px; bottom: 50px; }
}
