html {
    overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) {
    html { scrollbar-gutter: stable; }
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #000;
    color: #fff;
    font-family: 'Segoe UI', 'Helvetica', sans-serif;
}

.page-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
}

/* ===== Live-WebCam als Seitenkopf ===== */
.webcam-hero {
    position: relative;
    z-index: 1;
    width: calc(100% - 12px);
    max-width: 1428px;
    margin: 5px auto 0;
    padding: 0;
    aspect-ratio: 1428 / 696;
    overflow: hidden;
    border: 1px solid #333;
    border-radius: 5px;
    background: #080808;
    box-shadow: inset 0 2px 4px rgba(255,255,255,.08);
    text-align: center;
    color: #fff;
}

.webcam-hero-image-link,
.webcam-hero-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.webcam-hero-image {
    object-fit: fill;
}

.webcam-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.52) 0%,
        rgba(0,0,0,.25) 24%,
        rgba(0,0,0,.06) 43%,
        rgba(0,0,0,0) 58%
    );
}

.webcam-hero-content {
    position: absolute;
    z-index: 2;
    top: 18px;
    left: 20px;
    right: 20px;
    pointer-events: none;
}

.webcam-hero-content h1,
.webcam-hero-content .header-info,
.webcam-hero-content nav,
.webcam-hero-content .secondary-links,
.webcam-hero-content .menu-toggle {
    pointer-events: auto;
}

.webcam-hero h1 {
    position: relative;
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 2rem);
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 3px 3px 8px rgba(0,0,0,.95);
}

.webcam-hero h1 a {
    color: #fff;
    text-decoration: none;
}

.webcam-hero .header-info {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    padding: 5px 7px 3px;
    border-radius: 5px;
    background: rgba(0,0,0,.38);
    color: #fff;
    font-size: clamp(.8rem, 1.5vw, 1.18rem);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
}

.webcam-hero nav,
.webcam-hero .secondary-links {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    margin-top: 10px;
}

.webcam-hero nav a,
.webcam-hero .secondary-links a {
    color: #fff;
    text-decoration: none;
    font-size: .9rem;
    white-space: nowrap;
    text-shadow: 3px 3px 8px rgba(0,0,0,.95);
}

.webcam-hero nav a:hover,
.webcam-hero nav a:focus-visible,
.webcam-hero .secondary-links a:hover,
.webcam-hero .secondary-links a:focus-visible {
    color: #ffd700;
    outline: none;
}

.webcam-hero .network-label {
    color: rgba(255,255,255,.68);
    font-size: .9rem;
    white-space: nowrap;
    text-shadow: 3px 3px 8px rgba(0,0,0,.95);
    margin-right: 4px;
}

/* ===== 60-Sekunden-Fortschrittsbalken ===== */
.refresh-progress {
    position: relative;
    height: 2px;
    width: 100%;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(255,255,255,.18);
}

.refresh-progress__bar {
    position: absolute;
    inset: 0;
    transform-origin: right center;
    background: linear-gradient(90deg, #ff7a18, #ffd700);
    background-size: 200% 100%;
    animation:
        refreshDrain 60s linear forwards,
        shimmer 5s linear infinite reverse;
}

@keyframes refreshDrain {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@keyframes shimmer {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .refresh-progress__bar {
        animation: refreshDrain 60s linear forwards;
    }
}

/* ===== Thumbnail-Slider ===== */
#webcam-section,
.webcam-section {
    display: block !important;
    visibility: visible !important;
    width: calc(100% - 12px);
    max-width: 1428px;
    height: auto;
    max-height: none;
    margin: 7px auto 0;
    padding: 0;
    border: 0;
    overflow: visible;
    opacity: 1;
    background: #000;
    box-shadow: none;
}

.webcam-thumb-slider {
    position: relative;
    width: 100%;
    max-width: 1428px;
    height: 57px;
    margin: 0;
    box-sizing: border-box;
}

.webcam-thumb-viewport {
    height: 57px;
    margin: 0 31px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #666 #111;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

.webcam-thumb-track {
    display: flex;
    gap: 6px;
    width: max-content;
    height: 51px;
    padding: 0 1px;
}

.webcam-thumb-card {
    position: relative;
    flex: 0 0 80px;
    width: 80px;
    height: 45px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #444;
    border-radius: 3px;
    box-sizing: border-box;
    background: #17191c;
    text-decoration: none;
}

.webcam-thumb-card:hover,
.webcam-thumb-card:focus-visible {
    border-color: #ffd700;
    outline: none;
}

#webcam-section .webcam-thumb-card img {
    display: block;
    width: 80px;
    height: 45px;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    object-fit: cover;
    opacity: 0;
    transition: opacity 180ms ease-out;
}

#webcam-section .webcam-thumb-card img.is-loaded {
    opacity: 1;
}

.webcam-thumb-time {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 3px 1px;
    box-sizing: border-box;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.82));
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}

.webcam-thumb-button {
    position: absolute;
    top: 0;
    z-index: 2;
    width: 27px;
    height: 45px;
    padding: 0;
    border: 1px solid #444;
    border-radius: 3px;
    background: #151515;
    color: #fff;
    font: 700 20px/1 'Segoe UI', sans-serif;
    cursor: pointer;
}

.webcam-thumb-button:hover,
.webcam-thumb-button:focus-visible {
    color: #ffd700;
    border-color: #777;
    outline: none;
}

.webcam-thumb-button:disabled {
    opacity: .28;
    cursor: default;
}

.webcam-thumb-prev { left: 0; }
.webcam-thumb-next { right: 0; }

/* ===== Astronomische Daten ===== */
.astro-section {
    display: block;
    width: calc(100% - 12px);
    max-width: 1428px;
    margin: 2px auto 10px;
    padding: 0;
    font-size: .9rem;
    border: 1px solid #333;
    border-radius: 5px;
    background: #070707;
    box-shadow: inset 0 2px 4px rgba(255,255,255,.08);
}

.astro-section table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}

.astro-section td,
.astro-section th {
    padding: 0;
}

/* ===== Responsivität temporär deaktivieren ===== */
.responsive-toggle {
    display: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 17px;
    margin-left: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    border-radius: 17px;
    background: #ccc;
    transition: .4s;
}

.slider::before {
    position: absolute;
    content: "";
    width: 13px;
    height: 13px;
    left: 2px;
    bottom: 2px;
    border-radius: 50%;
    background: #fff;
    transition: .4s;
}

.switch input:checked + .slider::before {
    transform: translateX(13px);
}

/* ===== Downloads ===== */
.download-section {
    width: calc(100% - 12px);
    max-width: 1428px;
    margin: 10px auto;
    display: grid;
    grid-template-columns: 24% 29% 23% 24%;
    overflow: hidden;
    border: 1px solid #333;
    border-radius: 5px;
    background: #000;
    box-shadow: inset 0 2px 4px rgba(255,255,255,.10);
    font-family: 'Segoe UI', 'Helvetica', sans-serif;
}

.download-card {
    min-width: 0;
    padding: 9px 10px 10px;
    box-sizing: border-box;
}

.download-card + .download-card {
    border-left: 1px solid rgba(255,255,255,.08);
}

.download-title {
    margin: 0 0 2px;
    font-size: 1.13em;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.download-subtitle {
    margin: 0 0 8px;
    color: rgba(255,255,255,.72);
    font-size: .69em;
    font-weight: normal;
    line-height: 1.3;
}

.download-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.download-select,
.download-section button {
    height: 27px;
    box-sizing: border-box;
    border: 1px solid #4a4a4a;
    border-radius: 5px;
    background: #151515;
    color: #fff;
    font-family: 'Segoe UI', 'Helvetica', sans-serif;
    font-size: .75em;
    line-height: 1;
    outline: none;
}

.download-select {
    min-width: 0;
    padding: 0 5px;
}

.download-section button {
    flex: 0 0 auto;
    padding: 0 9px;
    cursor: pointer;
    font-weight: 600;
}

.download-select:hover,
.download-select:focus,
.download-section button:hover,
.download-section button:focus {
    border-color: #ffd700;
}

.download-section button:hover,
.download-section button:focus {
    color: #ffd700;
}

.download-card-2 #wettermessgroesse {
    flex: 1 1 145px;
    min-width: 125px;
}

.download-card-4 #issue {
    flex: 1 1 190px;
    min-width: 165px;
}

/* ===== Hinweis-Bubble für fehlende Zeitrafferfilme ===== */
.movie-message-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    background: rgba(0,0,0,.18);
    opacity: 0;
    transition: opacity 180ms ease-out;
}

.movie-message-overlay[hidden] {
    display: none;
}

.movie-message-overlay.is-visible {
    opacity: 1;
}

.movie-message-bubble {
    width: min(520px, calc(100vw - 36px));
    padding: 18px 20px 16px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px;
    background: rgba(20,20,20,.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 38px rgba(0,0,0,.55);
    color: #fff;
    text-align: center;
    transform: translateY(6px) scale(.985);
    transition: transform 180ms ease-out;
}

.movie-message-overlay.is-visible .movie-message-bubble {
    transform: translateY(0) scale(1);
}

.movie-message-title {
    margin-bottom: 9px;
    font-size: 1.12rem;
    font-weight: 700;
}

.movie-message-text {
    color: rgba(255,255,255,.88);
    font-size: .92rem;
    line-height: 1.45;
}

.movie-message-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.movie-message-button {
    min-height: 32px;
    padding: 5px 14px;
    border: 1px solid #555;
    border-radius: 6px;
    background: rgba(30,30,30,.92);
    color: #fff;
    font: 600 .86rem/1.2 'Segoe UI', 'Helvetica', sans-serif;
    cursor: pointer;
}

.movie-message-button:hover,
.movie-message-button:focus-visible {
    color: #ffd700;
    border-color: #ffd700;
    outline: none;
}

.movie-message-button-primary {
    border-color: rgba(255,215,0,.62);
}

#movie-download-button:disabled {
    opacity: .62;
    cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
    .movie-message-overlay,
    .movie-message-bubble {
        transition: none;
    }
}

/* ===== Wettertabellen ===== */
.responsive-table {
    table-layout: fixed;
    width: auto;
    border-spacing: 0;
    border-collapse: collapse;
    display: block;
}

.responsive-table td,
.responsive-table th {
    text-align: left;
    padding: 0;
}

.responsive-table td img,
.responsive-table th img {
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

.responsive-scale {
    table-layout: fixed;
    width: auto;
    border-collapse: collapse;
    border-spacing: 0;
}

.responsive-scale td {
    padding: 0;
    line-height: 0;
}

.responsive-scale img {
    display: block;
    margin: 0;
    padding: 0 0 0 5px;
    line-height: 0;
    vertical-align: bottom;
}

/* ===== Historischer Temperaturvergleich ohne tv_*.png ===== */
.temp-compare-css {
    width: 100%;
    max-width: 1440px;
    margin: 8px 0 14px;
    color: #ff0000;
    font-size: .70rem;
    font-weight: 700;
}

/*
 * Exakt dieselbe Hauptspalten-Systematik wie die Wettertabelle:
 * 4 x 260 px Messwertspalten + 400 px Historie.
 * Innerhalb jeder 260-px-Spalte bleibt die CSS-Skala bewusst bei 168 px.
 * Dadurch entsteht wieder der sichtbare Zwischenraum der alten PNG-Tabelle.
 */
.temp-compare-css__grid {
    display: grid;
    grid-template-columns: 260fr 260fr 260fr 260fr 400fr;
    gap: 0;
    align-items: start;
}

.temp-compare-css__panel {
    min-width: 0;
    padding: 0 7px;
    box-sizing: border-box;
}

.temp-compare-css__panel + .temp-compare-css__panel {
    border-left: 1px solid rgba(255,255,255,.18);
}

.temp-compare-css__spacer { display: block; }

.temp-compare-css__title {
    min-height: 30px;
    margin: 0 0 2px;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
}

.temp-compare-css__title-note {
    display: block;
    margin-top: 1px;
    color: rgba(255,255,255,.68);
    font-size: .62rem;
    font-weight: 600;
}

/* 70 px Jahr+Wert + exakt 168 px Skala: identisch für Kopf, Zeilen und Fuß. */
.temp-compare-css__direction {
    display: grid;
    grid-template-columns: 70px 168px;
    align-items: end;
    min-height: 20px;
    margin-bottom: 2px;
}

.temp-compare-css__direction-text {
    grid-column: 2;
    position: relative;
    width: 168px;
    height: 18px;
    color: #fff;
    font-size: .67rem;
    font-weight: 700;
    line-height: 1;
}

.temp-compare-css__direction-label {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
    white-space: nowrap;
}
.temp-compare-css__direction-label.is-left  { left: 25%; }
.temp-compare-css__direction-label.is-right { left: 75%; }

.temp-compare-css__direction-center {
    position: absolute;
    top: 1px;
    left: calc(50% + 1px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 18px 1px 18px;
    align-items: center;
    justify-items: center;
    column-gap: 3px;
}

.temp-compare-css__direction-arrow {
    display: block;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1;
}

.temp-compare-css__direction-line {
    display: block;
    width: 1px;
    height: 11px;
    background: #fff;
}

.temp-compare-css__rows {
    position: relative;
    display: grid;
    width: 238px;
    gap: 1px;
}

.temp-compare-css__rows::after {
    content: "";
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 154px;
    width: 1px;
    background: #fff;
}

.temp-compare-css__row {
    display: grid;
    grid-template-columns: 30px 40px 168px;
    align-items: center;
    min-height: 12px;
    line-height: 1;
}

.temp-compare-css__year,
.temp-compare-css__value { white-space: nowrap; }
.temp-compare-css__year { text-align: left; }
.temp-compare-css__value {
    text-align: right;
    padding-right: 5px;
}

.temp-compare-css__scale {
    position: relative;
    width: 168px;
    height: 11px;
    overflow: hidden;
    background: none;
}

.temp-compare-css__scale::after {
    content: none;
}

.temp-compare-css__average .temp-compare-css__scale::after {
    content: "";
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 84px;
    width: 1px;
    background: #fff;
}

.temp-compare-css__bar {
    position: absolute;
    z-index: 2;
    top: 4px;
    height: 2px;
    max-width: 84px;
    overflow: visible;
    background: #ff0000;
}

/* Relative Balken: 84 px je Skalenhälfte, Mittelpunkt bei 84 px. */
.temp-compare-css__bar.is-negative { right: 84px; }
.temp-compare-css__bar.is-positive { left: 84px; }
.temp-compare-css__bar.is-zero {
    left: 83px;
    top: 2px;
    width: 2px;
    height: 6px;
}

.temp-compare-css__average {
    margin-top: 7px;
    padding-top: 5px;
    border-top: 1px solid rgba(255,255,255,.11);
}

.temp-compare-css__average .temp-compare-css__year {
    color: #fff;
    text-align: right;
    padding-right: 4px;
}

.temp-compare-css__footer {
    display: grid;
    grid-template-columns: 70px 168px;
    margin-top: 4px;
}

.temp-compare-css__footer-legend {
    position: relative;
    height: 47px;
    color: #ffffff;
    font-size: .70rem;
    font-weight: 700;
    line-height: 1;
}

.temp-compare-css__footer-legend-label {
    position: absolute;
    left: 0;
    white-space: nowrap;
}

.temp-compare-css__footer-legend-label.is-upper {
    bottom: 25px;
}

.temp-compare-css__footer-legend-label.is-lower {
    bottom: 10px;
}

.temp-compare-css__footer-legend-note {
    position: absolute;
    left: 0;
    bottom: 0;
    color: rgba(255,255,255,.68);
    font-size: .62rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.temp-compare-css__footer-scale {
    position: relative;
    width: 168px;
    height: 47px;
    background: none;
}

/* Nur Minimum, aktuell und Maximum werden markiert. */
.temp-compare-css__footer-mark {
    position: absolute;
    top: 0;
    width: 1px;
    height: 8px;
    background: #fff;
    transform: translateX(-.5px);
}

/* Ein Randwert bei exakt 100 % muss vollständig innerhalb der 168-px-Skala bleiben. */
.temp-compare-css__footer-mark.is-edge-left {
    left: 0 !important;
    transform: none;
}
.temp-compare-css__footer-mark.is-edge-right {
    left: auto !important;
    right: 0;
    transform: none;
}

.temp-compare-css__footer-label {
    position: absolute;
    transform: translateX(-50%);
    color: #fff;
    font-size: .70rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
}

/* Bei engen Werten werden die Labels bewusst auf zwei Zeilen verteilt. */
.temp-compare-css__footer-label.is-upper {
    bottom: 25px;
}
.temp-compare-css__footer-label.is-lower {
    bottom: 10px;
}

.temp-compare-css__footer-label.is-edge-left {
    transform: none;
}
.temp-compare-css__footer-label.is-edge-right {
    transform: translateX(-100%);
}

/* Gleiche Responsive-Spaltenlogik wie bei .responsive-table. */
@media (max-width: 1370px) {
    .temp-compare-css__grid {
        grid-template-columns: repeat(4, minmax(260px, 1fr));
        min-width: 1040px;
    }
    .temp-compare-css__spacer { display: none; }
}

@media (max-width: 1055px) {
    .temp-compare-css__grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        min-width: 780px;
    }
    section.temp-compare-css__panel:nth-of-type(4) { display: none; }
}

@media (max-width: 790px) {
    .temp-compare-css__grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
        min-width: 520px;
    }
    section.temp-compare-css__panel:nth-of-type(3) { display: none; }
}

@media (max-width: 525px) {
    .temp-compare-css__grid {
        grid-template-columns: 260px;
        min-width: 260px;
    }
    section.temp-compare-css__panel:nth-of-type(2) { display: none; }
}


.temp-compare-source {
    display: none !important;
}

/* ===== Historischer Niederschlagsvergleich ohne nv_*.png ===== */
.rain-compare-source {
    display: none !important;
}

.rain-compare-css {
    width: 100%;
    max-width: 1440px;
    margin: 8px 0 14px;
    color: #53A6A6;
    font-size: .70rem;
    font-weight: 700;
}

.rain-compare-css__grid {
    display: grid;
    grid-template-columns: 260fr 260fr 260fr 260fr 400fr;
    gap: 0;
    align-items: start;
}

.rain-compare-css__leading-spacer,
.rain-compare-css__history-spacer {
    display: block;
}

.rain-compare-css__panel {
    min-width: 0;
    padding: 0 7px;
    box-sizing: border-box;
}

.rain-compare-css__panel + .rain-compare-css__panel {
    border-left: 1px solid rgba(255,255,255,.18);
}

.rain-compare-css__title {
    min-height: 30px;
    margin: 0 0 1px;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.22;
}

.rain-compare-css__title-note {
    display: block;
    margin-top: 2px;
    min-height: 15px;
    color: rgba(255,255,255,.68);
    font-size: .62rem;
    font-weight: 600;
    white-space: nowrap;
}

.rain-compare-css__direction {
    display: grid;
    grid-template-columns: 98px 140px;
    align-items: end;
    min-height: 20px;
    margin-bottom: 2px;
}

.rain-compare-css__direction-text,
.rain-compare-css__direction-days {
    grid-column: 2;
    position: relative;
    width: 140px;
    height: 18px;
    color: #fff;
    font-size: .67rem;
    font-weight: 700;
    line-height: 1;
}

.rain-compare-css__direction-label {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.rain-compare-css__direction-label.is-left  { left: 18%; }
.rain-compare-css__direction-label.is-right { left: calc(75% + .55em); }

.rain-compare-css__direction-center {
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 18px 1px 18px;
    align-items: center;
    justify-items: center;
    column-gap: 3px;
}

.rain-compare-css__direction-arrow {
    display: block;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1;
}

.rain-compare-css__direction-line {
    display: block;
    width: 1px;
    height: 11px;
    background: #fff;
}

.rain-compare-css__direction-days .is-zero {
    position: absolute;
    left: 0;
    top: 4px;
}

.rain-compare-css__direction-days .is-more {
    position: absolute;
    right: 0;
    top: 4px;
}

.rain-compare-css__rows {
    position: relative;
    display: grid;
    width: 238px;
    gap: 1px;
}

.rain-compare-css__rows.has-normal::after {
    content: "";
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 168px;
    width: 1px;
    background: #fff;
}

.rain-compare-css__row {
    display: grid;
    grid-template-columns: 30px 68px 140px;
    align-items: center;
    min-height: 12px;
    line-height: 1;
}

.rain-compare-css__year,
.rain-compare-css__value {
    white-space: nowrap;
}

.rain-compare-css__year {
    text-align: left;
}

.rain-compare-css__value {
    text-align: right;
    padding-right: 5px;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.rain-compare-css__scale {
    position: relative;
    width: 140px;
    height: 11px;
    overflow: hidden;
    background: none;
}

.rain-compare-css__bar {
    position: absolute;
    z-index: 2;
    top: 4px;
    height: 2px;
    background: #53A6A6;
}

.rain-compare-css__bar.is-negative { right: 50%; }
.rain-compare-css__bar.is-positive { left: 50%; }

.rain-compare-css__bar.is-zero {
    left: calc(50% - 1px);
    top: 2px;
    width: 2px !important;
    height: 6px;
}

.rain-compare-css__bar.is-days {
    left: 0;
}

.rain-compare-css__footer {
    display: grid;
    grid-template-columns: 98px 140px;
    margin-top: 8px;
}

.rain-compare-css__footer-legend {
    position: relative;
    height: 34px;
    color: #fff;
    font-size: .70rem;
    font-weight: 700;
    line-height: 1;
}

.rain-compare-css__footer-legend-label {
    position: absolute;
    left: 0;
    white-space: nowrap;
}

.rain-compare-css__footer-legend-label.is-upper { bottom: 14px; }
.rain-compare-css__footer-legend-label.is-lower { bottom: 2px; }

.rain-compare-css__footer-scale {
    position: relative;
    width: 140px;
    height: 34px;
}

.rain-compare-css__footer-mark {
    position: absolute;
    top: 0;
    width: 1px;
    height: 8px;
    background: #fff;
    transform: translateX(-.5px);
}

.rain-compare-css__footer-mark.is-edge-left {
    left: 0 !important;
    transform: none;
}

.rain-compare-css__footer-mark.is-edge-right {
    left: auto !important;
    right: 0;
    transform: none;
}

.rain-compare-css__footer-label {
    position: absolute;
    transform: translateX(-50%);
    color: #fff;
    font-size: .70rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.rain-compare-css__footer-label.is-upper { bottom: 14px; }
.rain-compare-css__footer-label.is-lower { bottom: 2px; }

.rain-compare-css__footer-label.is-edge-left {
    transform: none;
}

.rain-compare-css__footer-label.is-edge-right {
    transform: translateX(-100%);
}

@media (max-width: 1370px) {
    .rain-compare-css__grid {
        grid-template-columns: repeat(4, minmax(260px, 1fr));
        min-width: 1040px;
    }

    .rain-compare-css__history-spacer {
        display: none;
    }
}

@media (max-width: 1055px) {
    .rain-compare-css__grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        min-width: 780px;
    }

    section.rain-compare-css__panel:nth-of-type(3) {
        display: none;
    }
}

@media (max-width: 790px) {
    .rain-compare-css__grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
        min-width: 520px;
    }

    section.rain-compare-css__panel:nth-of-type(2) {
        display: none;
    }
}

@media (max-width: 525px) {
    .rain-compare-css {
        display: none;
    }
}



/* ===== Schwülometer als HTML/CSS-Skala ===== */
.humidex {
    width: 248px;
    margin-top: 4px;
    color: #fff;
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
}

.humidex[hidden] {
    display: none;
}

.humidex-scale {
    position: relative;
    height: 26px;
    margin: 0 5px;
}

.humidex-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 11px;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.16) 0%,
            rgba(255,255,255,.16) 13.043%,
            rgba(255,77,248,.28) 13.043%,
            rgba(255,77,248,.28) 30.435%,
            rgba(255,77,248,.42) 30.435%,
            rgba(255,77,248,.42) 47.826%,
            rgba(255,77,248,.58) 47.826%,
            rgba(255,77,248,.58) 65.217%,
            rgba(255,77,248,.76) 65.217%,
            rgba(255,77,248,.76) 82.609%,
            rgba(255,77,248,.96) 82.609%,
            rgba(255,77,248,.96) 100%
        );
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.12),
        0 0 8px rgba(255,77,248,.10);
}

.humidex-tick {
    position: absolute;
    top: 8px;
    width: 1px;
    height: 10px;
    background: rgba(255,255,255,.72);
    transform: translateX(-.5px);
}

.humidex-marker {
    position: absolute;
    z-index: 3;
    top: 4px;
    width: 2px;
    height: 18px;
    border-radius: 2px;
    background: #fff;
    transform: translateX(-1px);
    box-shadow:
        0 0 5px rgba(255,255,255,.85),
        0 0 10px rgba(255,77,248,.55);
}

.humidex-marker::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #fff;
    transform: translateX(-50%);
}

.humidex-labels {
    position: relative;
    height: 31px;
    margin: 0 5px;
    color: rgba(255,255,255,.62);
    font-size: .58rem;
    font-weight: 600;
    line-height: 1.05;
}

.humidex-label {
    position: absolute;
    top: 1px;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
}


/* ===== Windrose im Dashboard-Design ===== */
.windrose-dashboard {
    position: relative;
    width: 132px;
    height: 132px;
    color: #24FF92;
    user-select: none;
}

.windrose-dashboard svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.windrose-dashboard__cardinal {
    fill: #808080;
    font-family: "Inter", "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 34px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    letter-spacing: .02em;
}

#indexWindPointer {
    fill: #24FF92;
    stroke: #24FF92;
    stroke-width: .8;
    stroke-linejoin: round;
    paint-order: stroke fill;
    opacity: .98;
    shape-rendering: geometricPrecision;
}

#indexWindPointerDot {
    fill: #24FF92;
    filter: url(#indexWindLaserGlow);
    shape-rendering: geometricPrecision;
}

.windrose-dashboard__trail-dot {
    fill: #24FF92;
    filter: url(#indexWindTrailGlow);
}

/* ===== Langzeitwerte ===== */
.langzeitwerte-table-container {
    max-width: 100%;
    max-height: 400px;
    overflow-x: auto;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    margin-top: 20px;
    margin-left: 5px;
}

.langzeitwerte-table {
    width: 100%;
    border-collapse: separate;
    table-layout: fixed;
}

.langzeitwerte-table th:first-child,
.langzeitwerte-table td:first-child {
    width: 280px;
}

/* Jahres-Spalten bewusst kompakt halten, damit die Beschriftung links mehr Luft bekommt. */
.langzeitwerte-table th:not(:first-child),
.langzeitwerte-table td:not(:first-child) {
    width: 76px;
}

.langzeitwerte-table th,
.langzeitwerte-table td {
    padding: 5px;
    border: 1px solid #333;
    box-sizing: border-box;
}

.langzeitwerte-table th {
    background: #333;
    color: #fff;
    font-size: .9em;
    text-align: center;
}

.langzeitwerte-table td {
    background: #111;
    white-space: nowrap;
    color: #fff;
    font-size: .7em;
    vertical-align: top;
    text-align: right;
}

.langzeitwerte-table-second {
    margin-top: 12px;
}

/* ===== Responsive Verhalten ===== */
@media (max-width: 1370px) {
    .responsive-table col:nth-child(5),
    .responsive-table col:nth-child(6),
    .responsive-table td:nth-child(5),
    .responsive-table td:nth-child(6),
    .responsive-table th:nth-child(5),
    .responsive-table th:nth-child(6) {
        display: none;
    }
}

@media (max-width: 1350px) {
    .responsive-toggle {
        display: block;
    }
}

@media (max-width: 1250px) {
    .download-section {
        grid-template-columns: 1fr 1fr;
    }

    .download-card:nth-child(3) {
        border-left: 0;
    }

    .download-card:nth-child(n+3) {
        border-top: 1px solid rgba(255,255,255,.08);
    }
}

@media (max-width: 1100px) {
    .astro-section {
        display: none !important;
    }
}

@media (max-width: 1055px) {
    .responsive-table col:nth-child(4),
    .responsive-table td:nth-child(4),
    .responsive-table th:nth-child(4),
    .responsive-scale {
        display: none !important;
    }
}

@media (max-width: 950px) {
    .webcam-hero {
        aspect-ratio: 1428 / 760;
    }

    .webcam-hero-content {
        top: 12px;
        left: 12px;
        right: 12px;
    }

    .webcam-hero .menu-toggle {
        display: block;
        position: absolute;
        top: -6px;
        right: -4px;
    }

    .webcam-hero nav,
    .webcam-hero .secondary-links {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 8px;
        padding: 7px 10px;
        border-radius: 5px;
        background: rgba(0,0,0,.76);
    }

    .webcam-hero nav.active,
    .webcam-hero .secondary-links.active {
        display: flex;
    }

    .webcam-hero nav a,
    .webcam-hero .secondary-links a {
        margin: 4px 0;
    }

    .webcam-hero .secondary-links .network-label {
        margin: 4px 0 2px;
    }

    /* iOS/Firefox: geöffnetes Menü im Webcam-Kopf scrollbar halten. */
    .webcam-hero.menu-open .webcam-hero-content {
        top: 12px;
        bottom: auto;
        height: calc(100% - 20px);
        overflow-y: auto;
        overflow-x: hidden;
        pointer-events: auto;
        touch-action: pan-y;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,.35) transparent;
        padding-right: 4px;
    }

    .webcam-hero.menu-open .webcam-hero-content::-webkit-scrollbar {
        width: 4px;
    }

    .webcam-hero.menu-open .webcam-hero-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .webcam-hero.menu-open .webcam-hero-content::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.35);
        border-radius: 4px;
    }

    .webcam-hero.menu-open nav,
    .webcam-hero.menu-open .secondary-links {
        position: relative;
        overflow: visible;
        touch-action: pan-y;
    }
}

@media (max-width: 790px) {
    .responsive-table col:nth-child(3),
    .responsive-table td:nth-child(3),
    .responsive-table th:nth-child(3) {
        display: none;
    }

    .langzeitwerte-table-container {
        display: none !important;
    }
}

@media (max-width: 740px) {
    .download-section {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .download-card {
        border-left: 0 !important;
        border-top: 1px solid rgba(255,255,255,.08);
    }

    .download-card:first-child {
        border-top: 0;
    }

    .download-controls {
        flex-wrap: wrap;
        white-space: normal;
    }
}

@media (max-width: 525px) {
    .responsive-table col:nth-child(2),
    .responsive-table td:nth-child(2),
    .responsive-table th:nth-child(2) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .webcam-thumb-viewport {
        scroll-behavior: auto;
    }

    #webcam-section .webcam-thumb-card img {
        transition: none;
    }
}
