.meteo-page {
  font-family: Helvetica, Arial, sans-serif;
  color: #edf1ef;
  color-scheme: dark;
}

.meteo-page .globe-wallpaper { filter: brightness(.39) saturate(.78); }
.meteo-shell.globe { max-width: 1360px; padding-top: clamp(23px, 4vw, 54px); }
.meteo-shell .globe-place { margin-bottom: 18px; }
.meteo-page a, .meteo-page a:hover, .meteo-page a:focus { text-decoration: none; }
.globe-weather { min-width: 0; font-family: Helvetica, Arial, sans-serif; }
.meteo-shell button, .meteo-shell select { color: inherit; font: inherit; }
.globe-weather button, .globe-weather select {
  cursor: pointer; background: transparent; border: 1px solid #e6ede73e; border-radius: 5px;
}
.globe-weather :is(button,select,summary,[tabindex]):focus-visible { outline: 2px solid #d7e8e1; outline-offset: 3px; }
#weather-status { margin-block: 8px; color: #d9e2df; font-size: 13px; }
#weather-status:empty { display: none; }

.wx-current {
  display: grid; align-items: center; grid-template-columns: minmax(320px, .9fr) minmax(0, 1.15fr);
  gap: 6px 22px; margin-bottom: clamp(26px, 5vw, 54px);
  padding-bottom: 15px; border-bottom: 1px solid #eef8f133;
}
.wx-current-feature { display: flex; align-items: center; gap: clamp(10px, 2.2vw, 27px); }
.wx-current-feature > svg { width: clamp(74px, 10vw, 108px); flex-shrink: 0; overflow: visible; }
.wx-current-numbers { display: grid; justify-items: start; min-width: 0; }
.wx-condition { color: #e1ebea; font-size: clamp(12px, 1.15vw, 15px); }
.wx-current-temp { color: #fff6e0; font-weight: 400; font-size: clamp(44px, 5.2vw, 74px); line-height: .96; letter-spacing: -.065em; white-space: nowrap; }
.wx-current-temp.wx-cool { color: #bce0fa; }
.wx-feels { color: #dce5e3; font-size: 12px; margin-top: 4px; }
.wx-current-readings { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; align-items: start; }
.wx-stat { min-width: 0; display: grid; gap: 4px; padding: 7px 0; align-content: start; }
.wx-stat span { color: #dfe8e5; font-size: 11px; line-height: 1.3; }
.wx-stat strong { color: #fff; font-size: clamp(14px,1.5vw,19px); font-weight: 500; font-variant-numeric: tabular-nums; }
.wx-stat small { font-size: 10px; color: #cdd9d8; }

.wx-header { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.wx-actions { display: flex; align-items: center; gap: 4px; }
.globe-weather .wx-actions button {
  min-width: 40px; min-height: 35px; padding: 3px 9px; font-size: 13px;
  border: 0; border-radius: 0; background: transparent; color: #c0cdcb;
}
.globe-weather .wx-actions button:hover,
.globe-weather .wx-actions button:focus-visible,
.globe-weather .wx-actions button[aria-pressed="true"] { color: #fff; text-shadow: 0 0 8px #d1ece593; }
.globe-weather .wx-actions button[aria-pressed="true"] { font-weight: 600; }
.globe-weather .wx-actions button:hover svg,
.globe-weather .wx-actions button[aria-pressed="true"] svg { filter: drop-shadow(0 0 3px #d1ece5a0); }
.wx-chart-cursor { stroke: #eff7f280; stroke-width: .7; pointer-events: none; }
.wx-actions button svg { display: block; margin: auto; }
.wx-chart-layout { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr); margin-top: 8px; }
#weather-axis > svg, #weather-chart svg { display: block; }
#weather-axis > svg { width: 34px; height: 354px; overflow: visible; }
#weather-chart { min-width: 0; overflow: clip; }
#weather-chart > svg { width: 100%; cursor: pointer; }
#weather-chart text, #weather-axis text { font-family: Helvetica, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.wx-axis-unit { font-size: 10px; fill: #adbbbb; }
.wx-date { font-size: 12px; fill: #eaf0ed; }
.wx-hour, .wx-number { font-size: 11px; fill: #eef2f0; }
.wx-scale { font-size: 9px; fill: #b6c4c5; }
.wx-agreement-trace { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wx-night { fill: #7393b215; }
.wx-grid { stroke: #fff4; stroke-width: .65; }
.wx-day-line { stroke: #fff5; stroke-width: .7; }
.wx-freeze { stroke: #aed5fa66; stroke-width: .65; stroke-dasharray: 3 4; }
.wx-temperature, .wx-model, .wx-arrow { fill: none; stroke-linecap: round; }
.wx-temperature { stroke-width: 2.35; }
.wx-warm { stroke: #f4c883; }
.wx-cold { stroke: #a2d4fb; }
.wx-minimum { stroke-width: 1.55; opacity: .8; }
.wx-temperature-band { fill: #efca862a; }
.wx-min-band, .wx-rain-band { fill: #81c9f21d; }
.wx-rain { fill: #93cceb; }
.wx-extreme { fill: #ffb391; }
.wx-arrow { stroke: #f6f7f5; stroke-width: 1.1; }
.wx-model { stroke-width: .95; opacity: .47; }
.wx-model-key { display: flex; flex-wrap: wrap; gap: 5px 14px; padding-left: 38px; color: #e0ebe7; font-size: 11px; }
.wx-model-key[hidden] { display: none; }
.wx-model-key span { display: inline-flex; align-items: center; gap: 5px; }

.wx-disclosures { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 16px; }
.wx-disclosures details { min-width: 0; align-self: start; color: #e2ebe8; font-size: 13px; }
.wx-disclosures summary { cursor: pointer; min-height: 26px; align-content: center; }
.wx-disclosures:has(.wx-credits[open]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wx-credits summary { width: max-content; margin-left: auto; }
.wx-disclosure-body { padding-block: 6px 14px; }
#weather-quarter { display: grid; grid-template-columns: repeat(auto-fit,minmax(132px,1fr)); gap: 4px 13px; padding: 0; list-style: none; }
#weather-quarter li { display: grid; grid-template-columns: 1fr auto; gap: 2px; padding: 4px 0; border-bottom: 1px solid #fff3; }
#weather-quarter li small { grid-column: 1/-1; color: #cbd7d6; font-size: 10px; }
.globe .wx-notes { margin: 3px 0; color: #cfdddb; font-size: 11px; line-height: 1.5; opacity: .78; }
.wx-notes > span + span::before { content: ' · '; white-space: pre; }
.wx-notes a { color: #eaf4f1; }
.wx-notes a:hover { color: #fff; }

.wx-dialog {
  color: #f1f5f3; background: #142522dd;
  border: 1px solid #d9ebe068; border-radius: 8px; padding: 13px;
  box-sizing: border-box; width: min(590px,calc(100% - 22px)); max-height: 84dvh;
}
.wx-dialog::backdrop { background: #0b171781; }
.wx-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.wx-dialog select { width: 100%; padding: 6px; margin: 8px 0; }
.wx-dialog select option { background: #18312c; }
.wx-day-range { color: #d9e4e0; font-size: 12px; }
.wx-detail-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(111px,1fr)); gap: 4px; }
.globe-weather .wx-value { display: grid; gap: 4px; text-align: left; padding: 7px; font-size: 12px; }
.globe-weather .wx-value:disabled { cursor: auto; opacity: .6; }
.wx-agreement { font-size: 10px; color: #d0dbd9; }
.wx-value[data-agreement="faible"] .wx-agreement { color: #ffb998; }
#weather-detail-models { margin-top: 14px; font-size: 12px; }
#weather-detail-models h3 { font-size: 14px; margin: 0 0 5px; }
#weather-detail-models p { margin-bottom: 5px; }
.wx-model-row { display: grid; grid-template-columns: 1fr auto 56px; gap: 5px; border-bottom: 1px solid #fff4; padding: 4px 0; }
.wx-model-row span:last-child { text-align: right; }

.wx-icon { overflow: visible; }
.wi-sun { fill: #ffe6ad; stroke: #ffe6ad; stroke-width: 1.5; }
.wi-rays { fill: none; stroke: #ffe4ac; stroke-width: 1.7; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: wi-turn 46s linear infinite; }
.wi-moon { fill: #e7eeff; }
.wi-star { fill: #d5e8fc; animation: wi-twinkle 5s ease-in-out infinite alternate; }
.wi-cloud { fill: #aebfc6; stroke: #e1edf0; stroke-width: 1.4; }
.wi-cloud-back { fill: #7d929d; stroke: #a4b5bc; opacity: .8; }
.wi-storm .wi-cloud { fill: #5f7380; stroke: #b5c8d1; }
.wi-cloud-motion { animation: wi-drift 6s ease-in-out infinite alternate; }
.wi-windy .wi-cloud-motion { animation: wi-wind 2.4s ease-in-out infinite alternate; }
.wi-windy .wi-precip { transform: skewX(-12deg); transform-origin: center; }
.wi-drop { stroke: #a9deff; fill: none; stroke-width: 1.8; stroke-linecap: round; animation: wi-fall 1.8s ease-in infinite; }
.wi-level-2 .wi-drop { animation-duration: 1.38s; }
.wi-level-3 .wi-drop { animation-duration: .94s; }
.wi-delay-1 { animation-delay: -.36s; }
.wi-delay-2 { animation-delay: -.67s; }
.wi-delay-3 { animation-delay: -.24s; }
.wi-delay-4 { animation-delay: -.83s; }
.wi-snow .wi-drop { stroke: #eef6ff; stroke-width: 1.25; animation-name: wi-flake; animation-duration: 2.8s; }
.wi-showers .wi-precip { animation: wi-showers 5s ease-in-out infinite; }
.wi-lightning { fill: #ffe39d; animation: wi-lightning 6s linear infinite; }
.wi-fog-lines, .wi-unknown { fill: none; stroke: #d0e0e5; stroke-width: 1.65; stroke-linecap: round; }
.wi-fog-lines { animation: wi-drift 5s ease-in-out infinite alternate; }

@keyframes wi-turn { to { transform: rotate(360deg); } }
@keyframes wi-twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes wi-drift { from { transform: translateX(-1px); } to { transform: translateX(2.5px); } }
@keyframes wi-wind { from { transform: translateX(-3px); } to { transform: translateX(4px); } }
@keyframes wi-fall { 0%{ transform: translateY(-2px); opacity:.3; } 35%{opacity:1;} 100%{transform:translate(-1px,5px);opacity:.2;} }
@keyframes wi-flake { 0%{transform:translate(-1px,-2px);opacity:.55;} 48%{transform:translate(2px,2px);opacity:1;} 100%{transform:translate(-1px,6px);opacity:.25;} }
@keyframes wi-showers { 0%,48%,100%{opacity:1;} 65%,82%{opacity:.16;} }
@keyframes wi-lightning { 0%,15%,21%,100%{opacity:.32;} 17%,19%{opacity:1;} }

@media (max-width: 850px) {
  .wx-current { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .wx-current-feature { justify-content: center; }
  .wx-current-readings { gap: 5px; }
}
@media (max-width: 600px) {
  .meteo-shell.globe { padding-inline: 12px; }
  .meteo-shell .globe-place { margin-bottom: 7px; }
  .wx-current { margin-bottom: 23px; }
  .wx-current-feature { gap: 12px; justify-content: flex-start; padding-inline: 4px; }
  .wx-current-feature > svg { width: clamp(64px,24vw,91px); }
  .wx-current-readings { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px 7px; }
  .wx-chart-layout { grid-template-columns: 35px minmax(0,1fr); }
  .wx-model-key { padding-left: 35px; }
  .globe-weather .wx-actions button { min-width: 39px; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .wx-icon, .wx-icon * { animation: none !important; }
}
.wx-plot-temperature { font-size: 9px; paint-order: stroke; stroke: #1c292792; stroke-width: 1.7px; }

.wx-metric-icon { fill: none; stroke: currentColor; color: #dce8e7; stroke-width: .95; stroke-linecap: round; stroke-linejoin: round; }
.wx-metric-icon[data-metric="temperature_2m"] { color: #e9c896; }
.wx-metric-icon[data-metric="precipitation"] { color: #a6cfe6; }
.wx-metric-icon[data-metric="relative_humidity_2m"] { color: #b2d6d0; }
.wx-metric-icon[data-metric="pressure_msl"] { color: #d2c6dc; }
.wx-metric-icon[data-metric="agreement"] { color: #bbd4af; }

@media (min-width: 851px) {
  .meteo-shell.globe { padding-block: clamp(8px, 2.5dvh, 22px); }
  .meteo-shell .globe-place { align-items: center; margin-bottom: clamp(2px, 1.2dvh, 10px); }
  .wx-current { gap: 4px 22px; padding-bottom: 6px; margin-bottom: 6px; }
  .wx-current-feature > svg { width: clamp(55px, 11dvh, 91px); }
  .wx-current-temp { font-size: clamp(39px, 8.3dvh, 66px); }
  .globe-weather .wx-actions button { min-height: 30px; }
  .meteo-page { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
  .meteo-shell.globe { width: 100%; max-height: 850px; min-height: 0; display: flex; flex-direction: column; }
  .globe-weather { display: flex; flex: 1; flex-direction: column; min-height: 0; }
  #weather-content:not([hidden]) {
    display: grid; flex: 1; min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto 26px;
  }
  .wx-chart-layout { grid-row: 3; margin-top: 4px; min-height: 0; }
  .wx-model-key { grid-row: 4; }
  .wx-disclosures { grid-row: 5; }
  #weather-axis, #weather-chart { min-height: 0; }
  #weather-axis > svg, #weather-chart > svg { height: 100%; }
}

/* Keep the plot readable on touch screens while its metric axis stays fixed. */
@media (max-width: 850px) {
  #weather-chart {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
  }
  #weather-chart::-webkit-scrollbar { display: none; width: 0; height: 0; }
  #weather-chart > svg { max-width: none; flex-shrink: 0; }
}
