/* Floating weather lenses. Refraction affects the backdrop, never the text. */
body:has(#weather-modal.open) > .absolute.inset-0.z-10,
body:has(#weather-modal.open) #toast-container,
body:has(#weather-modal.open) #rain-alert-box,
body:has(#weather-modal.open) #radar-data-notice { visibility: hidden; }
#weather-modal {
    --wi-text: #eef5ff;
    --wi-text-secondary: #c2d0df;
    --wi-card-border: rgba(230, 244, 255, .16);
    --wi-lens-tint: rgba(12, 29, 46, .65);
    --wi-lens-edge: rgba(221, 243, 255, .46);
    --wi-lens-glint: rgba(255, 255, 255, .17);
    --wi-glass-bg: transparent;
    --wi-card-bg: transparent;
    --wi-pop-color: #8dddff;
    margin: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: 0;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: transparent;
    overscroll-behavior: contain;
}
#weather-modal::backdrop { background: rgba(4, 15, 27, .24); }
[data-theme='light'] #weather-modal {
    --wi-text: #102b45;
    --wi-text-secondary: #415d76;
    --wi-card-border: rgba(77, 118, 152, .18);
    --wi-lens-tint: rgba(244, 251, 255, .64);
    --wi-lens-edge: rgba(255, 255, 255, .92);
    --wi-lens-glint: rgba(255, 255, 255, .46);
    --wi-pop-color: #087fae;
    background: transparent;
}
[data-theme='light'] #weather-modal::backdrop { background: rgba(44, 65, 82, .10); }
#weather-modal .wi-container {
    width: min(1040px, 100%);
    height: auto;
    max-width: 1040px;
    max-height: none;
    overflow: visible;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
    color: var(--wi-text);
}
#weather-modal .wi-header {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: none;
    padding: 14px 18px;
    margin: 0 0 16px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    z-index: 50;
}
#weather-modal .wi-header-info { gap: 7px 16px; }
#weather-modal .wi-header h1 span { color: var(--wi-text); font-size: 14px; font-weight: 600; }
#weather-modal .wi-location-badge { font-size: 12px; font-weight: 500; color: var(--wi-text-secondary); }
#weather-modal .wi-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(128, 164, 195, .13);
    color: var(--wi-text);
    border: 1px solid var(--wi-card-border);
    backdrop-filter: none;
    transition: background 160ms ease-out;
}
#weather-modal .wi-close-btn:focus-visible { outline: 2px solid var(--wi-accent-blue); outline-offset: 4px; }
#weather-modal :is(.wi-card, .wi-glass) {
    position: relative;
    min-width: 0;
    background: transparent;
    border: 0;
    border-radius: 24px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    transition: none;
}
#weather-modal :is(.wi-card, .wi-glass):hover { transform: none; box-shadow: none; }
#weather-modal :is(.wi-header, .wi-card, .wi-glass)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(145deg, var(--wi-lens-glint), transparent 38%), var(--wi-lens-tint);
    border: 1px solid var(--wi-lens-edge);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .55), inset 1px 0 1px rgba(255, 255, 255, .20), inset 0 -1px 2px rgba(11, 44, 68, .13), 0 8px 24px rgba(12, 37, 55, .10);
    -webkit-backdrop-filter: blur(5px) saturate(1.16);
    backdrop-filter: var(--wi-refraction, blur(5px)) saturate(1.16);
}
#weather-modal :is(.wi-header, .wi-card, .wi-glass) > * { position: relative; z-index: 1; }
#weather-modal .wi-hero.wi-artwork-enabled::before {
    background: linear-gradient(145deg, var(--wi-lens-glint), transparent 38%), var(--wi-lens-tint);
}
#weather-modal .wi-overview { grid-template-columns: 280px minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
#weather-modal .wi-hero {
    background-image: none !important;
    color: var(--wi-text) !important;
    min-height: 238px;
    padding: 24px;
    align-items: flex-start !important;
    isolation: auto;
}
#weather-modal .wi-hero-eyebrow { color: var(--wi-text-secondary); font-size: 11px; margin-bottom: 12px; }
#weather-modal .wi-hero-city { font-size: 21px; line-height: 1.3; text-wrap: balance; }
#weather-modal .wi-hero-condition i { color: var(--wi-accent-blue) !important; }
[data-theme='light'] #weather-modal .wi-h-icon[style*='e2e8f0'] { color: #5f82a1 !important; }
#weather-modal .wi-hero-condition span { font-size: 13px !important; }
#weather-modal .wi-hero-temp { font-size: 58px !important; margin: 14px 0 !important; font-variant-numeric: tabular-nums; }
#weather-modal .wi-hero-highlow { color: var(--wi-text-secondary) !important; font-size: 12px !important; }
#weather-modal .wi-hourly-wrap { padding: 18px 16px; }
#weather-modal .wi-hourly-header, #weather-modal .wi-daily-header { font-size: 12px; color: var(--wi-text); }
#weather-modal .wi-h-item { min-width: 64px; padding: 10px 7px; }
#weather-modal .wi-h-item-now { background: rgba(72, 154, 241, .13); border-color: rgba(72, 154, 241, .25); }
#weather-modal :is(.wi-h-pop, .wi-d-pop) { color: var(--wi-pop-color); }
#weather-modal .wi-h-temp, #weather-modal .wi-d-temps, #weather-modal .wi-big-val { font-variant-numeric: tabular-nums; }
#weather-modal .wi-daily-wrap { padding: 18px; margin-bottom: 24px; }
#weather-modal .wi-daily-list { gap: 0; padding-bottom: 0; }
#weather-modal .wi-daily-item {
    flex: 1 0 100px;
    min-width: 100px;
    padding: 12px 9px;
    gap: 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: none;
}
#weather-modal .wi-daily-item + .wi-daily-item { border-left: 1px solid var(--wi-card-border); }
#weather-modal .wi-daily-item:hover { background: transparent; transform: none; }
#weather-modal .wi-d-temps { flex-wrap: wrap; justify-content: center; gap: 5px; }
#weather-modal .wi-d-temps span { font-size: 13px !important; }
#weather-modal .wi-section-label { margin: 0 0 12px; padding-left: 4px; font-size: 13px; text-wrap: balance; text-shadow: 0 1px 4px var(--wi-lens-tint); }
#weather-modal .wi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
#weather-modal .wi-grid .wi-card { padding: 18px; min-height: 224px; }
#weather-modal .wi-card-label { letter-spacing: normal; text-transform: none; font-size: 11px; font-weight: 500; }
#weather-modal .wi-status-line { font-size: 11px; line-height: 1.5; text-wrap: pretty; }
#weather-modal .wi-desc-line { line-height: 1.5; text-wrap: pretty; }
#weather-modal .wi-loading { padding: 80px 16px; }
@media (max-width: 1000px) {
    #weather-modal .wi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    #weather-modal { padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
    #weather-modal .wi-header { padding: 10px 12px; border-radius: 20px; margin-bottom: 12px; }
    #weather-modal .wi-header-info { gap: 4px; align-items: flex-start; flex-direction: column; }
    #weather-modal .wi-location-badge { font-size: 10px; }
    #weather-modal .wi-overview { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
    #weather-modal .wi-hero { min-height: 206px; padding: 20px; }
    #weather-modal .wi-hero-city { max-width: calc(100% - 130px); font-size: 19px; }
    #weather-modal .wi-hero-temp { position: absolute; right: 20px; top: 48px; margin: 0 !important; font-size: 52px !important; }
    #weather-modal .wi-hero-condition { margin-top: 12px !important; }
    #weather-modal .wi-hero-highlow { margin-top: 18px; }
    #weather-modal .wi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #weather-modal .wi-grid .wi-card { padding: 14px; min-height: 210px; border-radius: 20px; }
    #weather-modal .wi-daily-wrap { padding: 16px 12px; }
    #weather-modal .wi-big-val { font-size: 29px !important; }
    #weather-modal .wi-card-main[style*='flex-direction:row'] { gap: 8px !important; flex-wrap: wrap; }
    #weather-modal .wi-card-main > div, #weather-modal .wi-card-footer > div { min-width: 0; max-width: 100%; }
    #weather-modal .wi-grid .wi-card-main > i { font-size: 34px !important; }
    #weather-modal .wi-big-unit { font-size: 11px !important; }
    #weather-modal .wi-wind-row { flex-wrap: wrap; justify-content: center; }
    #weather-modal .wi-h-item { min-width: 58px; }
}
@media (max-width: 360px) {
    #weather-modal .wi-hero-city { max-width: calc(100% - 120px); font-size: 17px; }
    #weather-modal .wi-hero-temp { font-size: 46px !important; right: 16px; }
    #weather-modal .wi-grid .wi-card { padding: 12px; }
    #weather-modal .wi-card-label, #weather-modal .wi-desc-line { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    #weather-modal *, #weather-modal *::before { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    #weather-modal { --wi-lens-tint: #122338; --wi-lens-glint: transparent; }
    [data-theme='light'] #weather-modal { --wi-lens-tint: #f4f9fd; }
    #weather-modal :is(.wi-header, .wi-card, .wi-glass)::before { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Explicit wind-flow arrow and visible celestial markers on clear glass. */
#weather-modal .wi-wind-flow-arrow { display: inline-block; width: 32px; height: 32px; font-size: 32px; line-height: 32px; text-align: center; color: #2563eb; transform-origin: center; vertical-align: middle; flex-shrink: 0; }
#weather-modal .wi-h-wind .wi-wind-flow-arrow { width: 10px; height: 10px; font-size: 8px; line-height: 10px; }
#weather-modal .wi-wind-no-direction { color: var(--wi-text-secondary); font-size: 16px; }
#weather-modal .wi-wind-toward { color: var(--wi-text); }
#weather-modal .wi-wind-arrow-caption { margin-top: 4px; }
#weather-modal .wi-sky-card .wi-card-label i { margin-right: 4px; color: #6366f1; }
#weather-modal .wi-sky-card[data-sky="sun"] .wi-card-label i { color: #d97706; }
#weather-modal .wi-sky-state { color: var(--wi-text-secondary); font-size: 10px; margin-top: 5px; }
#weather-modal .wi-solar-path-bg { stroke: #71859e; opacity: .38; }
#weather-modal .wi-sky-marker { filter: drop-shadow(0 2px 3px rgba(30,41,59,.3)); }
#weather-modal .wi-moon-disc { fill: #4338ca; stroke: #c7d2fe; stroke-width: 1.3; }
#weather-modal .wi-moon-crescent { fill: #fff; }
#weather-modal .wi-sun-disc { fill: #fbbf24; stroke: #b45309; stroke-width: 1.1; }
#weather-modal .wi-sun-rays { fill: none; stroke: #d97706; stroke-width: 1.5; stroke-linecap: round; }
[data-theme="dark"] #weather-modal .wi-wind-flow-arrow { color: #60a5fa; }
[data-theme="dark"] #weather-modal .wi-solar-path-bg { stroke: #c7d2fe; }
[data-theme="dark"] #weather-modal .wi-sun-rays { stroke: #fbbf24; }
@media (max-width: 599px) {
    #weather-modal .wi-wind-stats { max-width: 100%; }
    #weather-modal .wi-wind-stats > div:first-child { line-height: 1.5; }
    #weather-modal .wi-sky-state { font-size: 9px; }
}
