:root {
    --loc-ink: #102b42;
    --loc-blue: #0f568c;
    --loc-teal: #116b64;
    --loc-line: #cbdce8;
    --loc-paper: #fff;
    --loc-muted: #48627a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--loc-ink); font: 16px/1.45 "Trebuchet MS", Verdana, sans-serif; background: radial-gradient(ellipse at top, #f8fcff, #e8f0f6 65%); }
a { color: var(--loc-blue); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #147869; outline-offset: 2px; }
.location-page { width: min(1100px, calc(100% - 28px)); margin: 15px auto; }
.location-hero { color: #fff; border-radius: 0 0 15px 15px; padding: 20px 23px; background: linear-gradient(120deg, var(--loc-blue), var(--loc-teal)); }
.location-hero p { margin: 0 0 4px; letter-spacing: .12em; font-size: .69rem; font-weight: bold; }
.location-hero h1 { margin: 0 0 6px; line-height: 1.05; font-size: clamp(1.75rem, 5vw, 2.7rem); }
.location-board, .location-results { padding: 14px; margin-top: 13px; background: var(--loc-paper); border: 1px solid var(--loc-line); border-radius: 14px; }
.location-tools { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.location-search { flex: 1 1 290px; min-width: 0; }
.location-search label { display: block; margin-bottom: 5px; color: var(--loc-muted); font-size: .875rem; font-weight: bold; }
.location-search > div { display: flex; gap: 7px; }
.location-search input { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid #a8c0d3; border-radius: 8px; }
.location-tools button, .location-map-note button { border: 0; color: white; background: var(--loc-blue); border-radius: 8px; padding: 8px 13px; min-height: 42px; font-size: .9rem; font-weight: bold; }
button.location-secondary { color: var(--loc-ink); background: #e3edf5; }
#locationMatches { margin: 9px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; }
#locationMatches button { color: var(--loc-ink); border: 1px solid var(--loc-line); padding: 6px 9px; border-radius: 8px; background: #f6fafc; min-height: 38px; text-align: left; }
#locationMap { min-height: 240px; height: clamp(275px, 41vh, 420px); border: 1px solid var(--loc-line); border-radius: 10px; margin-top: 12px; background: #acd2de; }
.location-map-note { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; color: var(--loc-muted); font-size: .85rem; }
.location-status { margin: 10px 0; color: var(--loc-muted); font-size: .9rem; }
.location-results h2 { margin: 0; line-height: 1.15; }
#locationRun, .location-note, .location-footer { color: var(--loc-muted); font-size: .85rem; }
.location-windows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.location-windows article { background: #f5f9fc; border: 1px solid var(--loc-line); border-top: 3px solid var(--loc-blue); padding: 12px; border-radius: 9px; }
.location-windows h3 { margin: 0 0 5px; font-size: 1rem; }
.location-dates, .location-peak, .location-duration { margin: 0; font-size: .85rem; color: var(--loc-muted); }
.location-duration { color: var(--loc-teal); font-weight: bold; margin-top: 4px; }
.location-gust-edge { margin: 4px 0 0; color: #694319; font-size: .8rem; }
.location-windows dl { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; }
.location-windows dt { color: var(--loc-muted); font-size: .8rem; }
.location-windows dd { color: var(--loc-blue); margin: 0; font-size: 1.35rem; font-weight: bold; font-variant-numeric: tabular-nums; }
.location-note { margin-bottom: 0; }
.location-ensemble { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--loc-line); }
#locationEnsembleRun { margin: 5px 0 10px; color: var(--loc-muted); font-size: .85rem; }
.location-ensemble-windows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.location-ensemble-windows article { border-top-color: var(--loc-teal); }
.location-ensemble-windows dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.location-ensemble-windows dd { color: var(--loc-teal); }
#locationFreezingDays { grid-template-columns: 1fr; gap: 6px; }
#locationFreezingDays article {
    display: grid;
    grid-template-columns: minmax(105px, 130px) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-top: 1px solid var(--loc-line);
    border-left: 3px solid var(--loc-teal);
}
#locationFreezingDays h3 { margin: 0; font-size: .9rem; }
#locationFreezingDays dl {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
}
#locationFreezingDays dt { font-size: .74rem; }
#locationFreezingDays dd { font-size: 1.05rem; line-height: 1.2; }
.share-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 16px; color: var(--loc-muted); font-size: .82rem; }
.share-tools button { min-height: 42px; padding: 9px 15px; border: 0; border-radius: 9px; color: #fff; background: var(--loc-blue); font-weight: bold; }
.share-tools select { min-height: 42px; padding: 8px 10px; border: 1px solid #b5d0dc; border-radius: 9px; color: #123f62; background: #fff; font: inherit; }
.share-forecast { overflow: hidden; margin: 0 0 20px; border: 1px solid #b5d0dc; border-radius: 14px; background: #f4f8f7; box-shadow: 0 12px 32px rgba(20, 62, 77, .13); }
.share-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 34%); min-height: 190px; background: linear-gradient(115deg, #103e62, #0b7069); color: #fff; }
.share-heading { padding: 22px 24px; min-width: 0; }
.share-kicker, .share-eyebrow { margin: 0; font-size: .67rem; font-weight: bold; letter-spacing: .13em; }
.share-kicker { color: #d4eee8; }
.share-kicker span { color: #7fc9bb; }
.share-forecast .share-heading h2 { margin: 10px 0 2px; font-size: clamp(1.45rem, 3.2vw, 2.35rem); line-height: 1.04; overflow-wrap: anywhere; }
.share-coordinates { margin: 0; color: #c5e4e2; font-size: .75rem; font-variant-numeric: tabular-nums; }
.share-window { margin: 14px 0 0; font-size: .82rem; line-height: 1.35; color: #e7f5f2; }
.share-window strong { color: #fff; font-size: 1rem; }
.share-map { min-width: 0; min-height: 190px; background: #acd2de; border-left: 2px solid rgba(255, 255, 255, .6); }
.share-map .leaflet-control-attribution { font-size: 8px; line-height: 1.3; }
.share-content { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.share-panel { min-width: 0; padding: 14px; background: #fff; border: 1px solid #d6e6e6; border-radius: 10px; }
.share-panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid #e1eceb; }
.share-eyebrow { color: #477b79; font-size: .61rem; }
.share-panel h3 { margin: 3px 0 0; color: #12384a; font-size: 1rem; line-height: 1.15; }
.share-unit { color: #53807f; font-size: .72rem; font-weight: bold; }
.share-bars { display: grid; gap: 11px; padding: 13px 0 3px; }
.share-bar-row { display: grid; grid-template-columns: minmax(83px, 1fr) minmax(36px, 1.35fr) auto; align-items: center; gap: 8px; }
.share-bar-label, .share-model { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.share-bar-label strong, .share-model strong { color: #173c4f; font-size: .76rem; }
.share-bar-label small, .share-model small { color: #5c7a85; font-size: .65rem; }
.share-bar-track { height: 8px; overflow: hidden; background: #e9f0f1; border-radius: 99px; }
.share-bar-fill { display: block; height: 100%; border-radius: inherit; background: #167b83; }
.share-bar-fill.ukv { background: #397db1; }
.share-bar-fill.arome { background: #d2744d; }
.share-bar-value { min-width: 3ch; color: #123e57; text-align: right; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.share-chance-grid { display: grid; grid-template-columns: minmax(92px, 1fr) repeat(3, minmax(39px, .55fr)); gap: 7px 5px; align-items: center; padding: 10px 0 3px; }
.share-grid-heading { color: #688388; font-size: .62rem; font-weight: bold; letter-spacing: .04em; }
.share-grid-number { text-align: center; letter-spacing: 0; }
.share-probability { display: block; padding: 5px 2px; border-radius: 6px; color: #536e78; background: #eef3f4; text-align: center; font-size: .87rem; font-weight: bold; font-variant-numeric: tabular-nums; }
.share-probability.has-chance { color: #075f61; background: #def2ec; }
.share-caption { margin: 8px 0 0; color: #527078; font-size: .68rem; line-height: 1.3; }
.share-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; color: #d9eeeb; background: #123f52; font-size: .68rem; line-height: 1.3; }
.share-footer strong { flex: none; color: #fff; font-size: .72rem; letter-spacing: .06em; }
.share-credits { margin: 0; padding: 8px 16px 10px; color: #567078; font-size: .63rem; line-height: 1.3; }
@media (max-width: 700px) {
    .share-top { grid-template-columns: minmax(0, 1fr) 37%; min-height: 145px; }
    .share-heading { padding: 15px; }
    .share-forecast .share-heading h2 { font-size: 1.45rem; }
    .share-map { min-height: 145px; }
    .share-window { margin-top: 9px; font-size: .75rem; }
    .share-content { grid-template-columns: 1fr; gap: 7px; padding: 8px; }
    .share-panel { padding: 10px; }
    .share-bars { gap: 7px; padding-top: 9px; }
    .share-bar-row { grid-template-columns: minmax(100px, 1fr) minmax(45px, 1.5fr) auto; }
    .share-chance-grid { padding-top: 8px; }
    .share-footer, .share-credits { padding-left: 11px; padding-right: 11px; }
}
.location-footer { margin: 15px 0; }
@media (max-width: 700px) {
    .location-page { width: calc(100% - 16px); margin: 8px auto; }
    .location-hero { padding: 15px; }
    .location-board, .location-results { padding: 9px; }
    .location-windows { grid-template-columns: 1fr; }
    #locationFreezingDays article { grid-template-columns: 1fr; gap: 5px; }
    #locationFreezingDays dl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 5px; }
}
