.sc-weather-card {
    position: relative;
}

.sc-weather-card__open {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    cursor: pointer;
}

.sc-weather-card .sc-weather-card__context :is(a, button) {
    position: relative;
}

.sc-weather-card__open:focus-visible,
.sc-weather-sheet :is(button, select, [tabindex="0"]):focus-visible {
    outline: 2px solid var(--app-text, #172720);
    outline-offset: -3px;
}

.sc-app-sheet.sc-weather-sheet {
    --weather-divider: #e2e8e6;
    background: #fff;
    color: var(--app-text);
    font-size: .875rem;
}

.sc-weather-sheet .sc-app-sheet__handle {
    top: 0;
    width: 64px;
    height: 44px;
    background: transparent;
    box-shadow: none;
}

.sc-weather-sheet .sc-app-sheet__handle::before {
    content: "";
    display: block;
    width: 40px;
    height: 5px;
    margin: 0 auto;
    border-radius: var(--app-radius-pill);
    background: var(--app-primary, #2f6758);
    opacity: .5;
}

.sc-weather-sheet .sc-app-sheet__content {
    display: grid;
    box-sizing: border-box;
    max-width: 600px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(.75rem, 1.5vh, 1rem);
    padding: 2.5rem clamp(.625rem, 3vw, 1.25rem) calc(1rem + env(safe-area-inset-bottom));
}

.sc-weather-sheet h2 {
    margin: 0;
    font-size: clamp(1.15rem, 5.6vw, 1.65rem);
    line-height: 1.15;
    font-weight: var(--app-font-extrabold, 800);
    text-align: center;
}

.sc-weather-sheet :is(h3, p) {
    margin: 0;
}

.sc-weather-sheet [data-weather-sheet-days] {
    justify-self: center;
    box-sizing: border-box;
    width: min(100%, 12.5rem);
    padding-block: 0;
}

.sc-weather-sheet [data-weather-sheet-day] {
    flex: 1 1 0;
    min-height: 44px;
    margin-block: -5px;
    padding: 0 .625rem;
}

.sc-weather-sheet [data-weather-sheet-days]::before {
    inset-block: 3px;
}

.sc-weather-sheet__sector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .25rem clamp(.5rem, 3vw, 1rem);
    min-width: 0;
}

.sc-weather-sheet__sector > h3 {
    border-inline-start: 4px solid var(--app-active);
    padding-inline-start: .625rem;
    border-radius: 3px;
    font-size: clamp(1rem, 4vw, 1.35rem);
    line-height: 1.2;
}

.sc-weather-sheet__summary { flex: 0 1 auto; min-width: 0; text-align: center; }

.sc-weather-sheet__conditions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .125rem .45rem;
}

.sc-weather-sheet__summary img {
    width: 44px;
    height: 44px;
    transform: scale(1.45);
}

.sc-weather-sheet__summary .is-reading {
    font-size: clamp(1.5rem, 6vw, 2.35rem);
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.sc-weather-sheet__conditions img:not([hidden]) + .is-reading {
    border-inline-start: 1px solid var(--weather-divider);
    padding-inline-start: .45rem;
}

.sc-weather-sheet__description,
.sc-weather-sheet__freshness { color: var(--app-text-muted, #4c5753); }

.sc-weather-sheet :is(.sc-weather-sheet__summary p, [data-weather-detail-vigilance-context]):empty,
.sc-weather-sheet__description:not(:has(p:not(:empty))) {
    display: none;
}

.sc-weather-sheet__metrics dl {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: .35rem;
    margin: 0;
}

.sc-weather-sheet__metrics dl > div {
    position: relative;
    min-width: 0;
    padding: .4rem .25rem .4rem 1.65rem;
    border: 1px solid var(--weather-divider);
    border-radius: .8rem;
    background: #fff;
    text-align: start;
}

.sc-weather-sheet__metrics dt {
    font-size: .71rem;
    color: var(--app-text-muted, #4c5753);
    overflow-wrap: anywhere;
}

.sc-weather-sheet__metrics abbr { text-decoration: none; }

.sc-weather-sheet__metrics svg {
    position: absolute;
    inset-inline-start: .28rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--app-primary, #2f6758);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sc-weather-sheet__metrics dd {
    margin: .125rem 0 0;
    font-weight: var(--app-font-bold, 700);
    overflow-wrap: anywhere;
}

.sc-weather-sheet [data-weather-detail-metrics-status] {
    font-size: .75rem;
    margin-bottom: .375rem;
}

.sc-weather-sheet [data-weather-detail-metrics-status]:empty {
    display: none;
}

.sc-weather-sheet .sc-weather-card__vigilance {
    align-items: center;
    border-radius: .85rem;
    border-color: var(--sc-vigilance-border, var(--weather-divider));
    background: var(--sc-vigilance-background, #fff);
    color: var(--sc-vigilance-text, var(--app-text));
}

.sc-weather-sheet .sc-weather-card__vigilance-icon { margin: 0; }
.sc-weather-sheet .sc-weather-card__vigilance-copy {
    border-inline-start: 1px solid var(--sc-vigilance-border, var(--weather-divider));
    padding-inline-start: .625rem;
}

.sc-weather-sheet__freshness {
    font-size: .68rem;
    line-height: 1.2;
}

.sc-weather-sheet__map-frame {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--weather-divider);
    border-radius: 1rem;
    background: #fff;
}

.sc-weather-map {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    overflow: clip;
    aspect-ratio: 1.85;
    max-height: 310px;
    background: #fff;
    border-radius: inherit;
    touch-action: none;
    user-select: none;
    cursor: grab;
}

.sc-weather-map.is-manipulating,
.sc-weather-map.is-manipulating .sc-weather-map__anchor button {
    cursor: grabbing;
}

.sc-weather-map__image {
    position: absolute;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 850.39 / 595.28;
    pointer-events: none;
    transform-origin: left top;
    transition: transform 350ms ease-in-out;
}

.sc-weather-map__image:not([src]) {
    visibility: hidden;
}

.sc-weather-map__anchor {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 350ms ease-in-out;
}

.sc-weather-map__anchor:focus-within {
    z-index: 1;
}

.sc-weather-map__anchor button {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    justify-items: center;
    align-content: center;
    box-sizing: border-box;
    width: 56px;
    height: 72px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #172720;
    cursor: pointer;
    font: inherit;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 3px #fff, 1px 1px 0 #fff, -1px -1px 0 #fff;
    transition: transform 350ms ease-in-out;
}

.sc-weather-map__anchor button::after {
    content: "";
    width: 1.15rem;
    height: 3px;
    margin-top: 3px;
    border-radius: var(--app-radius-pill);
    background: transparent;
}

.sc-weather-map__anchor button[aria-pressed="true"]::after {
    background: var(--app-active);
}

.sc-weather-map__anchor img {
    width: 32px;
    height: 32px;
    transform: scale(1.95) translateY(-1px);
    pointer-events: none;
}

.sc-weather-map__name {
    white-space: nowrap;
    font-size: .68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.sc-weather-map__temperature {
    font-size: 1.375rem;
    font-weight: 700;
    white-space: nowrap;
}

.sc-weather-map__temperature.is-range {
    font-size: .875rem;
}

.sc-weather-map.is-manipulating :is(.sc-weather-map__image, .sc-weather-map__anchor, button) {
    transition: none;
}

.sc-weather-sheet__zoom button,
.sc-weather-sheet [data-weather-detail-retry] {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: .25rem;
    background: transparent;
    color: var(--app-primary, #2f6758);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.sc-weather-sheet__zoom {
    position: absolute;
    inset-inline-end: .5rem;
    inset-block-end: .5rem;
    display: grid;
    border: 1px solid var(--weather-divider);
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 2px 7px rgb(23 39 32 / .14);
}

.sc-weather-sheet__zoom button { font-size: 1.375rem; }
.sc-weather-sheet__zoom button + button { border-block-start: 1px solid var(--weather-divider); }

.sc-weather-sheet__zoom button[aria-disabled="true"],
.sc-weather-sheet [data-weather-detail-retry][aria-disabled="true"] {
    cursor: default;
    opacity: .55;
}

.sc-weather-sheet [data-weather-detail-hours] {
    padding-top: .7rem;
    border-block-start: 1px solid var(--weather-divider);
}

.sc-weather-sheet__hour-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
}

.sc-weather-sheet__hours {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(4.25rem, 23vw, 5.5rem);
    width: max-content;
    margin-block: .375rem 0;
    margin-inline: auto;
    padding: 0 0 .25rem;
    list-style: none;
}

.sc-weather-sheet__hours li {
    display: grid;
    justify-items: center;
    gap: .125rem;
    padding: .375rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.sc-weather-sheet__hours li + li { border-inline-start: 1px solid var(--weather-divider); }
.sc-weather-sheet__hours strong { font-size: 1rem; }
.sc-weather-sheet__hours small { color: var(--app-text-muted, #4c5753); }

.sc-weather-sheet__hours img {
    width: 33px;
    height: 33px;
    transform: scale(1.6);
}

.sc-weather-card__open[hidden],
.sc-weather-sheet [hidden] {
    display: none;
}

@media (max-width: 599px) {
    .sc-weather-map {
        aspect-ratio: 1.45;
        max-height: min(310px, 55dvh);
    }
}

@media (max-width: 365px) {
    .sc-weather-sheet__metrics dl:has([data-weather-detail-humidity-card]:not([hidden])) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sc-weather-map__image,
    .sc-weather-map__anchor,
    .sc-weather-map__anchor button {
        transition: none;
    }
}
