:root {
    --blue: #0969c7;
    --blue-dark: #064d96;
    --blue-light: #eaf5ff;
    --text: #13233b;
    --muted: #64748b;
    --border: #dbe5ef;
    --background: #f5f8fb;
    --orange: #f5a000;
    --green: #28ad45;
    --red: #e21c21;
    --shadow: 0 2px 8px rgba(20, 50, 80, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
}

body {
    margin: 0;
    min-width: 320px;
}

/* =========================================================
   HEADER
========================================================= */

.hero {
    min-height: 155px;
    color: white;
    background:
        linear-gradient(
            90deg,
            rgba(0, 83, 160, 0.96),
            rgba(0, 103, 190, 0.76)
        ),
        linear-gradient(#1479ca, #075ba5);
}

.hero-overlay {
    min-height: 155px;
    max-width: 1800px;
    margin: auto;
    padding: 25px 38px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.hero-title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-weather-icon {
    font-size: 58px;
    line-height: 1;
}

.hero h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
}

.hero p {
    margin: 7px 0 0;
    font-size: 20px;
}

.update-status {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 4px;
}

.update-status div:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.update-status span,
.update-status small {
    font-size: 14px;
}

.update-status strong {
    font-size: 19px;
}

.update-clock {
    font-size: 36px;
}

.status-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #9ca3af;
    margin-left: 8px;
}

.status-dot.online {
    background: #37d24c;
    box-shadow: 0 0 8px rgba(55, 210, 76, .6);
}

.status-dot.offline {
    background: #e53935;
}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    max-width: 1800px;
    margin: 0 auto;
    padding: 18px;

    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.card h2 {
    margin: 0 0 20px;
    color: #075eb8;
    font-size: 22px;
}

.current-card {
    grid-column: span 6;
}

.wind-card {
    grid-column: span 3;
}

.sun-position-card {
    grid-column: span 3;
}

.solar-card {
    grid-column: span 4;
}

.rain-card {
    grid-column: span 5;
}

.information-card {
    grid-column: 1 / -1;
}

/* =========================================================
   WETTERWERTE
========================================================= */

.current-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
}

.wind-grid,
.solar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.rain-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.weather-value {
    text-align: center;
    padding: 8px 14px;
    min-width: 0;
}

.weather-value + .weather-value {
    border-left: 1px solid var(--border);
}

.label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.reading {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 27px;
}

.reading strong {
    font-size: 29px;
}

.reading span {
    font-size: 15px;
    white-space: nowrap;
}

.main-reading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 85px;
    font-size: 38px;
}

.main-reading strong {
    color: #0866c6;
    font-size: clamp(48px, 5vw, 72px);
    line-height: 1;
}

.main-reading span {
    font-size: 32px;
}

.minmax {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #41546e;
    font-size: 12px;
}

.minmax b {
    font-weight: 600;
}

.weather-value small {
    display: block;
    min-height: 18px;
    margin-top: 8px;
    color: var(--muted);
}

/* =========================================================
   WIND
========================================================= */

.compass {
    font-size: 38px;
    color: var(--blue);
    transform: rotate(-45deg);
}

.direction-reading {
    margin-top: 5px;
}

.direction-reading strong {
    font-size: 29px;
}

.direction-reading span {
    font-size: 17px;
}

.direction-text {
    margin-top: 5px;
    font-weight: 700;
    color: #42566f;
}

.compass-scale {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 14px;

    display: flex;
    justify-content: space-between;

    color: #183c68;
    font-weight: bold;
    font-size: 13px;
}

/* =========================================================
   SONNENSTAND
========================================================= */

.sun-position-card {
    position: relative;
}

.sun-arc {
    width: 100%;
}

.sun-arc svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.sun-path-background {
    fill: none;
    stroke: #b8bec5;
    stroke-width: 3;
}

.sun-path-active {
    fill: none;
    stroke: var(--orange);
    stroke-width: 4;
}

.horizon {
    stroke: #59616b;
    stroke-width: 2;
}

.sun-marker {
    fill: #ffb000;
    stroke: #ff9500;
    stroke-width: 3;
}

.sun-arc text {
    font-size: 16px;
    font-weight: bold;
    fill: #263443;
}

.sun-height {
    margin-top: -30px;
    text-align: center;
    font-size: 13px;
}

.sun-height strong {
    display: block;
    font-size: 25px;
    margin-top: 3px;
}

.sun-times {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 25px;
}

.sun-times div {
    text-align: center;
}

.sun-times span {
    display: block;
    font-size: 11px;
    color: #41546e;
    margin-bottom: 5px;
}

.sun-times strong {
    font-size: 18px;
}

/* =========================================================
   DIAGRAMME
========================================================= */

/* Zeitraum-Auswahl */

.charts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 5px 0 14px;
}

.charts-header h2 {
    margin: 0;
    color: #075eb8;
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.period-selector > span {
    margin-right: 8px;
    color: #52657b;
    font-size: 13px;
    font-weight: 700;
}

.period-selector button {
    min-width: 54px;
    padding: 7px 12px;

    border: 1px solid #c8d6e5;
    border-radius: 6px;

    background: white;
    color: #31516f;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color .15s ease,
        color .15s ease,
        border-color .15s ease;
}

.period-selector button:hover {
    background: #edf6ff;
    border-color: #87b9e8;
}

.period-selector button.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.charts-section {
    grid-column: 1 / -1;
}

.charts-section > h2 {
    margin: 5px 0 12px;
    color: #075eb8;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.chart-card {
    min-height: 250px;
    position: relative;
}

.chart-card h3 {
    margin: 0 0 12px;
    color: #075eb8;
    font-size: 16px;
}

.chart-card canvas {
    width: 100% !important;
    height: 170px !important;
}

.chart-placeholder {
    position: absolute;
    inset: 60px 15px 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    color: #8391a2;
    font-size: 13px;
    border: 1px dashed #c9d3de;
    border-radius: 8px;
    background: #fafcfe;
}

/* =========================================================
   STANDORT
========================================================= */

.location-card {
    grid-column: span 6;
}

.location-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.map-wrapper {
    min-height: 280px;
    position: relative;
}

.weather-map {
    width: 100%;
    height: 280px;
    border-radius: 8px;
    overflow: hidden;
    background: #edf2f6;
    border: 1px solid #d6dee6;
}

.map-placeholder {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #7d8b99;
}

.map-switch {
    position: absolute;
    top: 10px;
    right: 10px;

    display: flex;

    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,.2);
}

.map-switch button {
    border: 0;
    padding: 9px 16px;
    cursor: pointer;
    background: white;
    color: #24364b;
}

.map-switch button.active {
    background: var(--blue);
    color: white;
}

.station-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
}

.station-details div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.station-details span {
    color: #46617e;
    font-size: 13px;
}

.station-details strong {
    font-size: 17px;
}

.station-details small {
    color: var(--muted);
}

/* =========================================================
   WEBCAM
========================================================= */

.webcam-card {
    grid-column: span 6;
}

.webcam-container {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(145deg, #edf1f4, #dfe4e8);
}

.webcam-placeholder {
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;

    color: #687789;
    text-align: center;
}

.camera-icon {
    font-size: 58px;
    filter: grayscale(1);
    opacity: .45;
}

.webcam-placeholder strong {
    font-size: 19px;
}

.webcam-placeholder span {
    font-size: 13px;
}

.webcam-buttons {
    position: absolute;
    z-index: 10;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.webcam-control-button,
.fullscreen-button {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(20, 42, 60, .82);
    color: white;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.webcam-control-button:hover,
.fullscreen-button:hover {
    background: rgba(20, 42, 60, .96);
}

.webcam-container:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #111;
}

.webcam-container:fullscreen .webcam-placeholder {
    color: white;
}

/* =========================================================
   INFORMATIONEN
========================================================= */

.information-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.information-list div {
    text-align: center;
}

.information-list div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.information-list span {
    color: #46617e;
    font-size: 13px;
}

.information-list strong {
    font-size: 16px;
}

.information-list small {
    color: var(--muted);
}

/* =========================================================
   FOOTER
========================================================= */

footer {
    min-height: 60px;
    padding: 20px 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    background: linear-gradient(90deg, #07508f, #006bb6);
    color: white;

    font-size: 13px;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1300px) {

    .current-card {
        grid-column: span 12;
    }

    .wind-card,
    .sun-position-card {
        grid-column: span 6;
    }

    .solar-card {
        grid-column: span 5;
    }

    .rain-card {
        grid-column: span 7;
    }

    .information-card {
        grid-column: span 12;
    }

    .information-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid .chart-card:last-child {
        grid-column: span 2;
    }

    .location-card,
    .webcam-card {
        grid-column: span 6;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

    .charts-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .period-selector {
        width: 100%;
        flex-wrap: wrap;
    }

    .period-selector > span {
        width: 100%;
        margin-bottom: 3px;
    }

    .period-selector button {
        flex: 1;
        min-width: 55px;
    }


    .hero-overlay {
        padding: 20px;
        flex-direction: column;
    }

    .hero-weather-icon {
        font-size: 42px;
    }

    .hero p {
        font-size: 16px;
    }

    .dashboard {
        display: block;
        padding: 10px;
    }

    .card,
    .charts-section {
        margin-bottom: 12px;
    }

    .current-grid,
    .wind-grid,
    .solar-grid,
    .rain-grid {
        grid-template-columns: 1fr;
    }

    .weather-value + .weather-value {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .weather-value {
        padding: 18px 5px;
    }

    .sun-times {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid .chart-card:last-child {
        grid-column: auto;
    }

    .location-content {
        grid-template-columns: 1fr;
    }

    .information-list {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .information-list div {
        text-align: left;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================================
   LEAFLET-STANDORTKARTE
========================================================= */

.weather-map .leaflet-control-container {
    font-family: Arial, Helvetica, sans-serif;
}

.weather-map .leaflet-popup-content {
    line-height: 1.45;
}

.weather-map .leaflet-control-attribution {
    font-size: 10px;
}

.map-switch {
    z-index: 1000;
}

.map-switch button:hover {
    background: #edf6ff;
}

.map-switch button.active:hover {
    background: var(--blue);
}

@media (max-width: 800px) {
    .weather-map,
    .map-wrapper {
        min-height: 320px;
        height: 320px;
    }

    .map-switch button {
        padding: 8px 12px;
    }
}


/* =========================================================
   HEADER / HERO MIT ALPENPANORAMA
========================================================= */

.hero {
    position: relative;
    min-height: 220px;
    background:
        linear-gradient(90deg,
            rgba(0, 78, 145, 0.88) 0%,
            rgba(0, 98, 178, 0.68) 48%,
            rgba(0, 68, 125, 0.72) 100%),
        url("../images/karlsfeld-alpen-header.png") center center / cover no-repeat;
}

.hero-overlay {
    min-height: 220px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.hero-left {
    max-width: 650px;
}

.hero-left p {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.hero-right {
    margin-left: auto;
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.current-clock,
.hero-right .update-status {
    min-width: 225px;
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 12px;
    background: rgba(0,48,91,0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 5px 18px rgba(0,0,0,0.12);
}

.current-clock {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.clock-icon {
    padding-top: 2px;
    font-size: 24px;
}

.clock-text {
    display: flex;
    flex-direction: column;
}

.clock-text span,
.hero-right .update-status span {
    font-size: 12px;
}

.clock-text strong {
    margin-top: 2px;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: 0.5px;
}

.clock-text small {
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.9;
}

@media (max-width: 1100px) {
    .hero-overlay {
        align-items: flex-start;
        gap: 18px;
    }

    .hero-right {
        flex-direction: column;
        gap: 8px;
    }

    .current-clock,
    .hero-right .update-status {
        min-width: 250px;
    }
}

@media (max-width: 800px) {
    .hero {
        min-height: 0;
        background-position: center center;
    }

    .hero-overlay {
        min-height: 0;
        flex-direction: column;
    }

    .hero-right {
        width: 100%;
        margin-left: 0;
        flex-direction: row;
    }

    .current-clock,
    .hero-right .update-status {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .hero-right {
        flex-direction: column;
    }

    .clock-text strong {
        font-size: 26px;
    }
}


/* =========================================================
   MONDSTAND
========================================================= */

.moon-position-card {
    grid-column: span 3;
}

.moon-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin: 2px 0 18px;
}

.moon-disc {
    position: relative;
    width: 92px;
    height: 92px;
    overflow: hidden;
    border-radius: 50%;
    background: #f5f2d8;
    border: 1px solid #d8d5bd;
    box-shadow:
        inset -7px -7px 14px rgba(0, 0, 0, 0.10),
        0 3px 12px rgba(0, 0, 0, 0.12);
}

.moon-shadow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #17243a;
    transform-origin: center;
}

.moon-display strong {
    color: #163f70;
    font-size: 17px;
    text-align: center;
}

.moon-display span {
    color: var(--muted);
    font-size: 13px;
}

.moon-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.moon-values div,
.moon-times div {
    padding: 10px 8px;
    border-radius: 9px;
    background: #f7faff;
    text-align: center;
}

.moon-values span,
.moon-times span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.moon-values strong,
.moon-times strong {
    color: #163f70;
    font-size: 16px;
}

.moon-times {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 1300px) {
    .moon-position-card {
        grid-column: span 6;
    }
}

@media (max-width: 800px) {
    .moon-position-card {
        grid-column: auto;
    }
}


/* =========================================================
   HAUPTNAVIGATION
========================================================= */
.main-navigation {
    background: #07508f;
    border-top: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 3px 10px rgba(0,0,0,0.10);
}
.main-navigation-inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.main-navigation a {
    display: block;
    padding: 14px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}
.main-navigation a:hover {
    background: rgba(255,255,255,0.10);
}
.main-navigation a.active {
    background: rgba(255,255,255,0.14);
    border-bottom-color: #fff;
}

.page-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 22px 18px 30px;
}
.page-heading {
    margin-bottom: 18px;
}
.page-heading h1 {
    margin: 0 0 5px;
    color: #163f70;
    font-size: 27px;
}
.page-heading p {
    margin: 0;
    color: var(--muted);
}

.data-table-card {
    overflow: hidden;
}
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.table-periods {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.table-periods button {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}
.table-periods button.active {
    background: #07508f;
    color: #fff;
    border-color: #07508f;
}
.weather-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.weather-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 13px;
}
.weather-table th,
.weather-table td {
    padding: 10px 9px;
    border-bottom: 1px solid var(--border);
    text-align: right;
}
.weather-table th {
    position: sticky;
    top: 0;
    background: #eef5fb;
    color: #163f70;
    font-weight: 700;
}
.weather-table th:first-child,
.weather-table td:first-child {
    text-align: left;
}
.weather-table tbody tr:hover {
    background: #f7fbff;
}
.table-note {
    margin-top: 13px;
    color: var(--muted);
    font-size: 12px;
}
.placeholder-page-card {
    min-height: 220px;
}
.placeholder-page-card h2 {
    color: #163f70;
}

@media (max-width: 800px) {
    .main-navigation-inner {
        overflow-x: auto;
        padding: 0 8px;
    }
    .main-navigation a {
        flex: 0 0 auto;
        padding: 12px 13px;
        font-size: 13px;
    }
    .page-content {
        padding: 14px 10px 24px;
    }
}

.subpage-header {
    background: linear-gradient(90deg, #07508f, #006bb6);
    color: #fff;
}
.subpage-header-inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 16px 18px;
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.subpage-header-inner strong {
    font-size: 22px;
}
.subpage-header-inner span {
    font-size: 14px;
    opacity: .9;
}
@media (max-width: 600px) {
    .subpage-header-inner {
        flex-direction: column;
        gap: 3px;
    }
}


/* =========================================================
   MESSWERTTABELLE – ERWEITERTE BEDIENUNG
========================================================= */

.table-actions,
.custom-period,
.table-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table-actions label,
.custom-period label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.table-actions select,
.custom-period input {
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
}

.table-actions button,
.custom-period button,
.table-pagination button {
    padding: 8px 12px;
    border: 1px solid #07508f;
    border-radius: 7px;
    background: #07508f;
    color: #fff;
    cursor: pointer;
}

.table-pagination button:disabled {
    opacity: .45;
    cursor: default;
}

.custom-period {
    margin: 0 0 16px;
    padding: 12px;
    border-radius: 9px;
    background: #f5f9fd;
}

.custom-period[hidden] {
    display: none;
}

.table-pagination {
    justify-content: center;
    margin-top: 16px;
}

.table-pagination span {
    min-width: 110px;
    text-align: center;
    color: #163f70;
    font-weight: 600;
}

.weather-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.weather-table th.sortable:hover {
    background: #e2eef8;
}

.sort-mark {
    display: inline-block;
    min-width: 13px;
    font-size: 10px;
}

@media (max-width: 800px) {
    .table-actions {
        width: 100%;
    }

    .custom-period {
        align-items: stretch;
        flex-direction: column;
    }

    .custom-period label {
        justify-content: space-between;
    }
}


/* =========================================================
   MESSWERTTABELLE – ABWECHSELNDE ZEILENFARBEN
========================================================= */

.weather-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.weather-table tbody tr:nth-child(even) {
    background: #f2f7fb;
}

.weather-table tbody tr:hover {
    background: #e4f1fb;
}


/* =========================================================
   DETAILDIAGRAMME
========================================================= */

.charts-detail-controls {
    margin-bottom: 18px;
}

.charts-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

#charts-detail-status {
    color: var(--muted);
    font-size: 12px;
}

.charts-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.chart-detail-card h2 {
    margin-bottom: 14px;
}

.chart-detail-canvas {
    position: relative;
    height: 330px;
}

.chart-help {
    margin-top: 16px;
    padding: 12px 15px;
    border-radius: 9px;
    background: #eef5fb;
    color: #36536d;
    font-size: 13px;
}

@media (max-width: 900px) {
    .charts-detail-grid {
        grid-template-columns: 1fr;
    }

    .chart-detail-canvas {
        height: 300px;
    }
}


/* =========================================================
   STATISTIK
========================================================= */

.statistics-controls {
    margin-bottom: 18px;
}

#statistics-status {
    color: var(--muted);
    font-size: 12px;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.statistics-card h2,
.records-card h2 {
    margin-bottom: 16px;
}

.statistics-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.statistics-values > div {
    padding: 14px 8px;
    border-radius: 9px;
    background: #f7faff;
    text-align: center;
}

.statistics-values span,
.records-grid span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.statistics-values strong {
    display: block;
    color: #163f70;
    font-size: 20px;
}

.statistics-values small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.records-card {
    margin-top: 18px;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.records-grid > div {
    padding: 15px;
    border-radius: 9px;
    background: #eef5fb;
}

.records-grid strong {
    color: #163f70;
    font-size: 14px;
}

@media (max-width: 900px) {
    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .records-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .statistics-values,
    .records-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   WETTERSTATION
========================================================= */

.station-intro-grid,
.station-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.station-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.station-main-card,
.station-location-card,
.station-section,
.station-note {
    height: auto;
}

.station-main-card h2,
.station-location-card h2,
.station-section h2,
.station-note h2 {
    margin-bottom: 14px;
}

.station-name {
    margin-bottom: 12px;
    color: #163f70;
    font-size: 26px;
    font-weight: 700;
}

.station-main-card p,
.station-section p,
.station-note p {
    margin: 0;
    line-height: 1.65;
    color: #435b70;
}

.station-facts {
    margin: 0;
}

.station-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.station-facts > div:last-child {
    border-bottom: 0;
}

.station-facts dt {
    color: var(--muted);
}

.station-facts dd {
    margin: 0;
    color: #163f70;
    font-weight: 600;
    text-align: right;
}

.sensor-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.sensor-item {
    min-height: 125px;
    padding: 14px 12px;
    border: 1px solid #e0eaf3;
    border-radius: 10px;
    background: #f7faff;
    text-align: center;
}

.sensor-icon {
    display: block;
    margin-bottom: 7px;
    font-size: 25px;
}

.sensor-item strong {
    display: block;
    margin-bottom: 5px;
    color: #163f70;
}

.sensor-item > span:last-child {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.station-list {
    margin: 0;
    padding-left: 21px;
    color: #435b70;
    line-height: 1.9;
}

.station-note {
    margin-top: 18px;
    border-left: 4px solid #07508f;
}

@media (max-width: 1100px) {
    .sensor-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .station-intro-grid,
    .station-info-grid {
        grid-template-columns: 1fr;
    }

    .sensor-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .sensor-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   KORREKTUR AUSSENTEMPERATUR – EINHEIT VOR TRENNLINIE
   ========================================================= */
.current-grid .weather-value:first-child .main-reading {
    gap: 5px;
}

.current-grid .weather-value:first-child .main-reading span {
    font-size: 27px;
    margin-left: -2px;
    white-space: nowrap;
}



/* FIX: Außentemperatur vollständig vor der Trennlinie */
@media (min-width: 901px) {
  .current-grid { grid-template-columns: 1.65fr repeat(4, 1fr); }
  .temperature-main .main-reading { gap: 4px; padding: 0 4px; }
  .temperature-main .main-reading strong { font-size: clamp(48px, 4.6vw, 68px); }
  .temperature-main .main-reading .temperature-unit {
    flex: 0 0 auto; font-size: 27px; margin-left: 0; white-space: nowrap;
  }
}

/* Barometer-Symbol */
.pressure-icon {
  width:31px; height:31px; flex:0 0 31px;
  display:inline-flex; align-items:center; justify-content:center;
  color:#2f80c9;
}
.pressure-icon svg {
  width:31px; height:31px; display:block; fill:none;
  stroke:currentColor; stroke-width:2.6;
  stroke-linecap:round; stroke-linejoin:round;
}


/* Thermometer-Symbol Außentemperatur */
.temperature-icon {
  width: 38px;
  height: 48px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b67c7;
}
.temperature-icon svg {
  width: 32px;
  height: 48px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.temperature-icon svg circle {
  fill: currentColor;
  stroke: currentColor;
}

/* ===== Feinanpassungen Temperatur und Wind ===== */

/* Thermometer vor Außentemperatur rot */
.temperature-main .temperature-icon {
    color: #e53935;
}

/* Wind: erste Spalte etwas breiter, damit "Geschwindigkeit" Abstand zur Linie hat */
.wind-grid {
    grid-template-columns: 1.15fr 1fr 1fr;
}

/* etwas Innenabstand an den Wind-Spalten */
.wind-grid .weather-value {
    padding-left: 10px;
    padding-right: 10px;
}

/* schönes Wind-Symbol in der Überschrift */
.wind-title-icon {
    display: inline-flex;
    width: 27px;
    height: 27px;
    margin-right: 7px;
    vertical-align: middle;
    color: #0b67c7;
}

.wind-title-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* =========================================================
   Aktuelles Wetter in der Regen-Kachel
   ========================================================= */

.rain-grid .current-weather {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    margin: 0 0 18px 0;
    padding: 14px 20px;

    background: #f7faff;
    border: 1px solid #d8e5f2;
    border-radius: 12px;
}

.current-weather-icon {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.current-weather-icon svg {
    width: 68px;
    height: 68px;
    display: block;
}

.current-weather-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.current-weather-label {
    font-size: 13px;
    color: #6c7c8f;
}

#current-weather-text {
    font-size: 22px;
    color: #102542;
    font-weight: 600;
}

@media (max-width: 700px) {
    .rain-grid .current-weather {
        padding: 12px;
        gap: 12px;
    }

    .current-weather-icon {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .current-weather-icon svg {
        width: 54px;
        height: 54px;
    }

    #current-weather-text {
        font-size: 19px;
    }
}


/* Dynamische Wettersymbole Regen-Kachel */

.current-weather-icon svg {
    width: 64px;
    height: 64px;
    overflow: visible;
}

.current-weather-icon svg path,
.current-weather-icon svg circle {
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Sonne */
.current-weather-icon svg > circle,
.current-weather-icon .weather-sun {
    fill: #ffb300;
    stroke: #f59b00;
    stroke-width: 2;
}

.current-weather-icon svg g {
    fill: none;
    stroke: #f59b00;
    stroke-width: 3;
}

/* Wolke */
.current-weather-icon .weather-cloud {
    fill: #d9e2ec;
    stroke: #7890a8;
    stroke-width: 2;
}

/* Regen */
.current-weather-icon .weather-rain {
    fill: none;
    stroke: #1683d8;
    stroke-width: 4;
}

/* Mond */
.current-weather-icon .weather-moon {
    fill: #ffd45c;
    stroke: #e6a800;
    stroke-width: 2;
}



/* =========================================================
   Aktuelles Wetter – große Infokachel
   ========================================================= */

.rain-grid .current-weather {
    grid-column: 1 / -1;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 24px;

    min-height: 120px;
    margin: 0 0 18px 0;
    padding: 18px 28px;

    background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
    border: 1px solid #cfe0f2;
    border-radius: 10px;
    box-sizing: border-box;
}

/* großes Wettersymbol */

.rain-grid .current-weather-icon {
    width: 92px;
    height: 92px;
    flex: 0 0 92px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.rain-grid .current-weather-icon svg {
    width: 88px;
    height: 88px;
    overflow: visible;
}

/* Textbereich */

.rain-grid .current-weather-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
}

/* kleine Überschrift */

.rain-grid .current-weather-label {
    font-size: 13px;
    font-weight: 500;
    color: #68788c;
}

/* Wetterzustand */

.rain-grid #current-weather-text {
    font-size: 23px;
    line-height: 1.15;
    font-weight: 700;
    color: #102542;
}

/* Beschreibung unter dem Wetterzustand */

.rain-grid .current-weather-description {
    margin-top: 6px;

    font-size: 13px;
    line-height: 1.45;
    color: #6c7c8f;
    max-width: 330px;
}

/* Smartphone */

@media (max-width: 700px) {

    .rain-grid .current-weather {
        min-height: 105px;
        padding: 14px 18px;
        gap: 16px;
    }

    .rain-grid .current-weather-icon {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .rain-grid .current-weather-icon svg {
        width: 70px;
        height: 70px;
    }

    .rain-grid #current-weather-text {
        font-size: 20px;
    }

    .rain-grid .current-weather-description {
        font-size: 12px;
    }
}


/* =========================================================
   Symbole für Regen-Zeiträume
   ========================================================= */

.rain-grid .rain-period-icon {
    width: 42px;
    height: 42px;
    margin: 10px auto 7px auto;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #1674d1;
}

.rain-grid .rain-period-icon svg {
    width: 38px;
    height: 38px;
    display: block;
    overflow: visible;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rain-grid .rain-period-icon svg text {
    fill: currentColor;
    stroke: none;
    font-size: 17px;
    font-weight: 600;
    font-family: Arial, sans-serif;
}

.rain-grid .rain-period-icon svg circle {
    fill: currentColor;
    stroke: none;
}

/* Tropfen/Uhr */
.rain-grid .rain-hour-icon svg path:first-child {
    fill: none;
    stroke: currentColor;
}

/* Regenwerte unter den Symbolen */
.rain-grid .weather-value > .reading {
    margin-top: 2px;
}

/* =========================================================
   HEADER – finales Panorama-Setup
   ========================================================= */
.hero {
    min-height: 220px;
    background-image: url("../images/karlsfeld-header.png") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 100% 100% !important;
}

.hero-overlay {
    min-height: 220px;
}


/* =========================================================
   HEADER – Feinschliff
   Panorama bleibt unverändert skaliert.
   ========================================================= */

.hero {
    background-position: center -10px !important;
}

/* Dezente Abdunklung für bessere Lesbarkeit von Titel und Statusboxen */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(0, 45, 85, 0.18) 0%,
        rgba(0, 45, 85, 0.08) 42%,
        rgba(0, 45, 85, 0.10) 68%,
        rgba(0, 45, 85, 0.14) 100%
    );
}

.hero-overlay {
    position: relative;
    z-index: 1;
}

/* Taupunkt-Information – ohne JavaScript */
.dewpoint-info {
    position: relative;
    margin: 18px auto 0;
    width: 34px;
}
.dewpoint-info > summary {
    list-style: none;
}
.dewpoint-info > summary::-webkit-details-marker {
    display: none;
}
.dewpoint-info-button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8d7f3;
    border-radius: 9px;
    background: #eef7ff;
    color: #0969c7;
    box-shadow: 0 2px 6px rgba(9,105,199,.12);
    cursor: pointer;
    box-sizing: border-box;
}
.dewpoint-info-symbol {
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
}
.dewpoint-info-button:hover {
    background: #dceeff;
    border-color: #7db8e8;
    box-shadow: 0 3px 9px rgba(9,105,199,.18);
}
.dewpoint-info-box {
    position: absolute;
    z-index: 1000;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: 330px;
    padding: 16px 18px;
    border: 1px solid #cfe0ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(19,35,59,.22);
    color: #13233b;
    text-align: left;
    font-size: 13px;
    line-height: 1.45;
}
.dewpoint-info-box::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #cfe0ef;
    border-top: 1px solid #cfe0ef;
    transform: translateX(-50%) rotate(45deg);
}
.dewpoint-info-box strong {
    display: block;
    margin-bottom: 7px;
    color: #0867c4;
    font-size: 15px;
}
.dewpoint-info-box p {
    margin: 0 0 8px;
}
.dewpoint-info-box p:last-child {
    margin-bottom: 0;
}


/* Taupunkt-Info: Unterkante bündig zum unteren Ende der Trennlinie */
.dewpoint-info-button {
    position: relative !important;
    top: 22px !important;
    margin-top: 0 !important;
}


/* Taupunkt-Info: Unterkante des Symbols bündig mit Unterkante der Trennlinie */
.dewpoint-info-button {
    position: relative !important;
    top: 7px !important;
    margin-top: 0 !important;
}


/* =========================================================
   TAUPUNKT – MODALFENSTER
   Ergänzung: vorhandene Button-Position bleibt unverändert
   ========================================================= */

.dewpoint-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dewpoint-modal.open {
    display: flex;
}

.dewpoint-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 35, 55, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.dewpoint-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 40px));
    padding: 24px 26px;
    border: 1px solid #cfe0ef;
    border-radius: 14px;
    background: #ffffff;
    color: #13233b;
    box-shadow: 0 18px 55px rgba(15, 35, 55, 0.30);
    text-align: left;
}

.dewpoint-modal-dialog h3 {
    margin: 0 42px 14px 0;
    color: #0867c4;
    font-size: 21px;
}

.dewpoint-modal-dialog p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.dewpoint-modal-dialog p:last-child {
    margin-bottom: 0;
}

.dewpoint-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #cfe0ef;
    border-radius: 8px;
    background: #f4f9fd;
    color: #0969c7;
    font: 700 21px/1 Arial, sans-serif;
    cursor: pointer;
}

.dewpoint-modal-close:hover {
    background: #e5f2fc;
    border-color: #8ebfe7;
}

@media (max-width: 560px) {
    .dewpoint-modal-dialog {
        padding: 21px 20px;
    }
}


/* =========================================================
   SONNE – INFO-SYMBOLE
   UV-Index, Solarstrahlung, Beleuchtungsstärke
   Oberkante Symbol = Unterkante der senkrechten Trennlinie
   ========================================================= */

.solar-grid .weather-value {
    position: relative;
}

.solar-info-button {
    position: relative;
    top: 16px;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8d7f3;
    border-radius: 9px;
    background: #eef7ff;
    color: #0969c7;
    box-shadow: 0 2px 6px rgba(9,105,199,.12);
    cursor: pointer;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
}

.solar-info-button:hover,
.solar-info-button:focus-visible {
    background: #dceeff;
    border-color: #7db8e8;
    box-shadow: 0 3px 9px rgba(9,105,199,.18);
    outline: none;
}


/* Taupunkt-Info: Fragezeichen optisch wie bei den Sonnen-Info-Symbolen */
.dewpoint-info-button {
    font-family: Arial, sans-serif !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}


/* =========================================================
   SCHWEBENDER "NACH OBEN"-SCHALTER
   ========================================================= */
.scroll-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8d7f3;
    border-radius: 50%;
    background: #ffffff;
    color: #0969c7;
    box-shadow: 0 4px 14px rgba(9, 105, 199, .22);
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover,
.scroll-to-top:focus-visible {
    background: #eef7ff;
    border-color: #7db8e8;
    outline: none;
}

@media (max-width: 700px) {
    .scroll-to-top {
        right: 14px;
        bottom: 14px;
        width: 44px;
        height: 44px;
        font-size: 25px;
    }
}


/* =========================================================
   ÖFFENTLICHE SEITE – AUSSENBEREICH VARIANTE 1
   Dezenter Himmelblau-Verlauf, der den Inhalt hervorhebt.
   ========================================================= */

body {
    background:
        linear-gradient(
            90deg,
            #dceefb 0%,
            #eaf5fc 12%,
            #f7fbfe 24%,
            #ffffff 34%,
            #ffffff 66%,
            #f7fbfe 76%,
            #eaf5fc 88%,
            #dceefb 100%
        );
}

/* Der zentrale Inhaltsbereich hebt sich dezent vom Außenbereich ab. */
.dashboard {
    position: relative;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        -16px 0 28px -24px rgba(25, 91, 138, 0.28),
         16px 0 28px -24px rgba(25, 91, 138, 0.28);
}

/* Auf kleinen Displays keine unnötigen Außenränder erzeugen. */
@media (max-width: 900px) {
    body {
        background: #f7fbfe;
    }

    .dashboard {
        box-shadow: none;
    }
}


/* =========================================================
   HEADER – WEISSE SCHRIFT BESSER VOM BILDMOTIV ABHEBEN
   ========================================================= */

.hero-title h1 {
    color: #ffffff !important;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.85),
        0 0 10px rgba(0, 0, 0, 0.45);
}

.hero-title p {
    color: #ffffff !important;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.80),
        0 0 8px rgba(0, 0, 0, 0.38);
}


/* Gefühlte Temperatur – Info-Symbol wie beim Taupunkt */
.feels-info-button {
    position: relative !important;
    top: 7px !important;
    margin-top: 0 !important;
    width: 32px;
    height: 32px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8d7f3;
    border-radius: 9px;
    background: #eef7ff;
    color: #0969c7;
    box-shadow: 0 2px 6px rgba(9,105,199,.12);
    cursor: pointer;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.feels-info-button:hover,
.feels-info-button:focus-visible {
    background: #dceeff;
    border-color: #7db8e8;
    box-shadow: 0 3px 9px rgba(9,105,199,.18);
    outline: none;
}


/* =========================================================
   REGEN – INFO ZUR EINHEIT mm
   rechter Rand des Schalters bündig zur Innenkante der Karte
   ========================================================= */
.rain-card {
    position: relative;
}

.rain-info-button {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8d7f3;
    border-radius: 9px;
    background: #eef7ff;
    color: #0969c7;
    box-shadow: 0 2px 6px rgba(9,105,199,.12);
    cursor: pointer;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
}

.rain-info-button:hover,
.rain-info-button:focus-visible {
    background: #dceeff;
    border-color: #7db8e8;
    box-shadow: 0 3px 9px rgba(9,105,199,.18);
    outline: none;
}

@media (max-width: 800px) {
    .rain-info-button {
        top: 14px;
        right: 20px;
    }
}

/* Regen-Info: sicher sichtbar und rechts am Innenrand der Regenkarte */
.rain-card { position: relative; }
.rain-card .rain-info-button {
    position: absolute !important; top: 15px !important; right: 20px !important;
    z-index: 20 !important; display: flex !important; visibility: visible !important; opacity: 1 !important;
}


/* INFO-SCHALTER – verbindliche Endregeln */
.feels-info-button,
.solar-info-button,
.rain-info-button {
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    z-index:30 !important;
}
.feels-info-button {
    position:relative !important;
    top:7px !important;
    margin:0 auto !important;
}
.solar-grid .weather-value { position:relative !important; }
.solar-info-button {
    position:relative !important;
    top:16px !important;
    margin:0 auto !important;
}
.rain-card { position:relative !important; }
.rain-card .rain-info-button {
    position:absolute !important;
    top:20px !important;
    right:20px !important;
    margin:0 !important;
}


/* =========================================================
   MONDSTAND V15 – Darstellung analog zum Sonnenstand
   ========================================================= */
.moon-position-card .moon-arc {
    position: relative;
    height: 190px;
    margin: 8px 14px 0;
}
.moon-position-card .moon-arc-curve {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 16px;
    height: 122px;
    border: 4px solid #7f91ad;
    border-bottom: 0;
    border-radius: 180px 180px 0 0;
}
.moon-position-card .moon-arc-baseline {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 138px;
    height: 2px;
    background: #536273;
}
.moon-position-card .moon-east,
.moon-position-card .moon-west {
    position: absolute;
    top: 145px;
    color: #102846;
    font-size: 13px;
    font-weight: 700;
}
.moon-position-card .moon-east { left: 7%; }
.moon-position-card .moon-west { right: 7%; }

.moon-position-card .moon-arc .moon-display {
    position: absolute;
    left: 50%;
    top: 28px;
    transform: translateX(-50%);
    width: 180px;
    margin: 0;
    gap: 4px;
    z-index: 3;
}
.moon-position-card .moon-arc .moon-disc {
    width: 76px;
    height: 76px;
}
.moon-position-card .moon-arc .moon-display strong {
    font-size: 15px;
    line-height: 1.15;
}
.moon-position-card .moon-arc .moon-display span {
    font-size: 12px;
}

.moon-height-center {
    margin: -24px auto 14px;
    text-align: center;
}
.moon-height-center span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 2px;
}
.moon-height-center strong {
    display: block;
    color: #163f70;
    font-size: 22px;
}

.moon-position-card .moon-times-three {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.moon-position-card .moon-times-three div {
    padding: 9px 5px;
}
.moon-position-card .moon-times-three span {
    white-space: nowrap;
}

@media (max-width: 500px) {
    .moon-position-card .moon-arc { margin-left: 2px; margin-right: 2px; }
    .moon-position-card .moon-times-three { gap: 4px; }
    .moon-position-card .moon-times-three span { font-size: 10px; }
    .moon-position-card .moon-times-three strong { font-size: 14px; }
}


/* =========================================================
   MONDSTAND V16 – geometrisch echter Halbkreis
   ========================================================= */
.moon-position-card .moon-arc {
    position: relative;
    height: 205px;
    margin: 8px 14px 0;
}

.moon-position-card .moon-arc-curve {
    position: absolute !important;
    left: 8% !important;
    right: 8% !important;
    top: 16px !important;
    height: auto !important;
    aspect-ratio: 2 / 1 !important;
    border: 4px solid #7f91ad !important;
    border-bottom: 0 !important;
    border-radius: 999px 999px 0 0 !important;
    box-sizing: border-box !important;
}

.moon-position-card .moon-arc-baseline {
    left: 8% !important;
    right: 8% !important;
    top: auto !important;
    bottom: 31px !important;
}

/* O und W auf Höhe der Grundlinie */
.moon-position-card .moon-east,
.moon-position-card .moon-west {
    top: auto !important;
    bottom: 11px !important;
}

/* Mond + Bezeichnung mittig im Halbkreis */
.moon-position-card .moon-arc .moon-display {
    top: 31px !important;
}

/* Mondhöhe direkt unter dem Bogen */
.moon-height-center {
    margin: -10px auto 14px !important;
}


/* =========================================================
   MONDSTAND V17 – kleiner Realmond als Positionsmarker
   ========================================================= */
.moon-position-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    z-index: 8;
    display: none;
    pointer-events: none;
}
.moon-marker-disc {
    position: relative;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
    background:
        radial-gradient(circle at 65% 35%, rgba(255,255,255,.55) 0 5%, transparent 6%),
        radial-gradient(circle at 35% 65%, rgba(173,157,112,.18) 0 8%, transparent 9%),
        radial-gradient(circle at 60% 68%, rgba(173,157,112,.16) 0 7%, transparent 8%),
        linear-gradient(135deg,#fffdf0,#e8dfb9);
    border: 1px solid #c8bb82;
    box-shadow: 0 2px 5px rgba(15,35,60,.28);
}
.moon-marker-shadow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #10223d;
}


/* =========================================================
   MONDSTAND V18 – reale Mondoberfläche + korrekte Bogenposition
   NASA LRO Moon Mosaic, Scientific Visualization Studio
   ========================================================= */
.moon-position-card .moon-disc,
.moon-position-card .moon-marker-disc {
    background-color: #d9d9d9 !important;
    background-image:
        url("https://svs.gsfc.nasa.gov/vis/a000000/a005000/a005001/moon_mosaic_print.jpg") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    filter: contrast(1.08) brightness(1.06);
}

/* Der kleine Positionsmond soll den Bogen klar überdecken. */
.moon-position-card .moon-position-marker {
    width: 28px !important;
    height: 28px !important;
    z-index: 12 !important;
}
.moon-position-card .moon-marker-disc {
    width: 28px !important;
    height: 28px !important;
}


/* =========================================================
   V19 – Taupunkt-Info exakt horizontal zentrieren
   ========================================================= */
.dewpoint-info-button {
    display: flex !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto !important;
    right: auto !important;
}


/* =========================================================
   UV-INDEX – DYNAMISCHE SCHUTZWARNUNG
   ========================================================= */
.uv-warning {
    width: calc(100% - 18px);
    margin: 10px auto 0;
    padding: 7px 8px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.35;
    text-align: left;
}

.uv-warning-icon {
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.05;
}

.uv-warning-low { background: #edf8ef; border-color: #b9dfbf; color: #247333; }
.uv-warning-moderate { background: #fff8df; border-color: #efd57a; color: #775b00; }
.uv-warning-high { background: #fff1df; border-color: #efb66f; color: #914d00; }
.uv-warning-very-high { background: #ffebeb; border-color: #efa0a0; color: #a32121; }
.uv-warning-extreme { background: #f5eafa; border-color: #cf9be2; color: #72278c; }
.uv-warning-unknown { background: #eef4f9; border-color: #c9d8e5; color: #526779; }

@media (max-width: 560px) {
    .uv-warning { font-size: 10.5px; }
}


/* =========================================================
   UV-WARNUNG – POSITION UNTER INFO-SCHALTER + SYMBOL-BADGE
   ========================================================= */
.uv-warning {
    width: calc(100% - 18px);
    margin: 12px auto 0;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
}

.uv-warning-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,.16);
}

.uv-warning-low,
.uv-warning-moderate,
.uv-warning-high,
.uv-warning-very-high,
.uv-warning-extreme,
.uv-warning-unknown {
    background: transparent;
    border-color: transparent;
}

.uv-warning-low { color: #237a3b; }
.uv-warning-low .uv-warning-icon { background: #2e9d50; }

.uv-warning-moderate { color: #806300; }
.uv-warning-moderate .uv-warning-icon { background: #d5a800; }

.uv-warning-high { color: #a65300; }
.uv-warning-high .uv-warning-icon { background: #ef8b16; }

.uv-warning-very-high { color: #a52a2a; }
.uv-warning-very-high .uv-warning-icon { background: #d83b3b; }

.uv-warning-extreme { color: #76298e; }
.uv-warning-extreme .uv-warning-icon { background: #8c3ba8; }

.uv-warning-unknown { color: #526779; }
.uv-warning-unknown .uv-warning-icon { background: #70869a; }


/* =========================================================
   UV-BEREICH – ENDKORREKTUR
   Warnung wirklich UNTER dem Info-Schalter
   ========================================================= */
.solar-grid .weather-value .solar-info-button {
    position: relative !important;
    top: 0 !important;
    margin: 16px auto 0 !important;
}

.solar-grid .weather-value #uv-warning {
    position: relative !important;
    top: 0 !important;
    clear: both !important;
    width: calc(100% - 12px) !important;
    margin: 10px auto 0 !important;
    padding: 4px 4px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: 0 !important;
    text-align: center !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
}

.solar-grid .weather-value #uv-warning .uv-warning-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,.16) !important;
}

#uv-warning.uv-warning-low .uv-warning-icon { background: #2e9d50 !important; }
#uv-warning.uv-warning-moderate .uv-warning-icon { background: #d5a800 !important; }
#uv-warning.uv-warning-high .uv-warning-icon { background: #ef8b16 !important; }
#uv-warning.uv-warning-very-high .uv-warning-icon { background: #d83b3b !important; }
#uv-warning.uv-warning-extreme .uv-warning-icon { background: #8c3ba8 !important; }
#uv-warning.uv-warning-unknown .uv-warning-icon { background: #70869a !important; }


/* Wetterlage auf einen Blick / automatische Warnungen */
.weather-summary-card{grid-column:1/-1;padding:18px 20px}
.weather-summary-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.weather-summary-head h2{margin-bottom:7px}
.weather-summary-head p{margin:0;color:#40566a;font-size:15px;line-height:1.5}
.weather-summary-symbol{font-size:38px;line-height:1}
.weather-alerts{display:grid;gap:8px;margin-top:14px}
.weather-alert{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:9px;border:1px solid #e2b35d;background:#fff5dc;color:#754900;font-size:13px;line-height:1.4}
.weather-alert.danger{border-color:#e39a9a;background:#fff0f0;color:#972b2b}
.weather-alert.info{border-color:#b8d2e8;background:#eef6fc;color:#285f88}
.weather-alert-icon{font-size:18px;line-height:1.2}
@media(max-width:650px){.weather-summary-head{align-items:flex-start}.weather-summary-symbol{font-size:30px}.weather-summary-head p{font-size:14px}}

/* 24-Stunden-Trend */
.weather-trend24{margin-top:16px;padding-top:14px;border-top:1px solid #dce7ef}
.weather-trend24-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}
.weather-trend24-title strong{color:#17476f;font-size:14px}
.weather-trend24-title span{color:#6a7f91;font-size:12px}
.weather-trend24-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.weather-trend24-item{background:#f2f7fb;border:1px solid #dce8f1;border-radius:10px;padding:11px 12px}
.weather-trend24-label,.weather-trend24-main,.weather-trend24-detail{display:block}
.weather-trend24-label{font-size:12px;color:#60758a;margin-bottom:5px}
.weather-trend24-main{font-size:16px;font-weight:700;color:#123f68}
.weather-trend24-detail{font-size:11px;color:#6b7f91;margin-top:4px}
.weather-trend-up{color:#b45a16}.weather-trend-down{color:#176f9e}.weather-trend-flat{color:#60758a}
.weather-trend24-comment{margin:10px 0 0!important;color:#4d6477!important;font-size:13px!important}
@media(max-width:700px){.weather-trend24-grid{grid-template-columns:1fr}.weather-trend24-title{align-items:flex-start;flex-direction:column;gap:3px}}

/* v25: kompaktere Trend-Kacheln */
.weather-trend24{margin-top:16px;padding-top:15px;border-top:1px solid #dce7ef}
.weather-trend24-title{margin-bottom:12px}
.weather-trend24-grid{gap:12px}
.weather-trend24-item{padding:13px 14px;background:#f6f9fc;border:1px solid #d9e6ef;box-shadow:0 1px 2px rgba(15,62,99,.03)}
.weather-trend24-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}
.weather-trend24-label{margin:0;font-size:13px;font-weight:700;color:#17476f}
.weather-trend24-direction{font-size:13px;font-weight:700;padding:4px 8px;border-radius:999px;background:#eaf2f8;white-space:nowrap}
.weather-trend24-values{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.weather-trend24-values>div{background:#fff;border:1px solid #e2ebf2;border-radius:8px;padding:8px 9px}
.weather-trend24-values small{display:block;color:#7a8d9d;font-size:10px;margin-bottom:3px}
.weather-trend24-values strong{display:block;color:#123f68;font-size:14px}
.weather-trend24-comment{margin-top:12px;padding:9px 11px;border-radius:8px;background:#eef5fa;color:#4d6477;font-size:12px;line-height:1.45}
.weather-trend24-direction.weather-trend-up{background:#fff0df}
.weather-trend24-direction.weather-trend-down{background:#e8f4fb}
.weather-trend24-direction.weather-trend-flat{background:#eef2f5}
@media(max-width:700px){.weather-trend24-values{grid-template-columns:1fr 1fr}}

/* Heute auf einen Blick */
.today-summary-card{grid-column:1/-1;padding:18px 20px}
.today-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.today-summary-head h2{margin:0 0 6px}.today-summary-head p{margin:0;color:#52697c;font-size:13px;line-height:1.45}
.today-summary-icon{font-size:30px}
.today-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.today-summary-item{background:#f5f9fc;border:1px solid #dce8f1;border-radius:10px;padding:11px 12px;min-width:0}
.today-summary-item span,.today-summary-item strong,.today-summary-item small{display:block}
.today-summary-item span{font-size:11px;color:#657b8e;margin-bottom:5px}
.today-summary-item strong{font-size:15px;color:#123f68;line-height:1.3}
.today-summary-item small{font-size:10px;color:#7a8d9d;margin-top:4px}
@media(max-width:1100px){.today-summary-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.today-summary-grid{grid-template-columns:repeat(2,1fr)}}


/* Windrose */
.windrose-intro{color:#60758a;margin-top:-4px}.windrose-periods{display:flex;gap:7px;flex-wrap:wrap;margin:14px 0 18px}.windrose-periods button{border:1px solid #cbdce9;background:#eef5fb;color:#17476f;border-radius:8px;padding:8px 13px;font:inherit;cursor:pointer}.windrose-periods button.active{background:#0864ad;color:#fff;border-color:#0864ad}.windrose-layout{display:grid;grid-template-columns:minmax(360px,680px) minmax(230px,1fr);gap:28px;align-items:center}.windrose-canvas-wrap{position:relative;max-width:680px;aspect-ratio:1/1;background:radial-gradient(circle,#ffffff 0%,#f7fbfe 72%,#edf5fa 100%);border:1px solid #d1e1ec;border-radius:50%;box-shadow:0 4px 16px rgba(20,70,105,.10)}.windrose-canvas-wrap canvas{width:100%;height:100%}.windrose-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#60758a;text-align:center}.windrose-empty[hidden]{display:none}.windrose-kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px}.windrose-kpis div{background:#eef5fb;border-radius:10px;padding:13px}.windrose-kpis span{display:block;color:#60758a;font-size:12px}.windrose-kpis strong{display:block;color:#073d70;font-size:20px;margin-top:4px}.windrose-legend{margin-top:16px;padding:14px;border:1px solid #d8e5ef;border-radius:10px}.windrose-legend h3{margin:0 0 10px;color:#0a5fa8;font-size:15px}.windrose-legend div{display:flex;align-items:center;gap:8px;margin:6px 0;color:#526b80;font-size:13px}.windrose-legend i{width:22px;height:10px;border-radius:3px;display:inline-block}.wr-l1{background:#38BDF8}.wr-l2{background:#14B8A6}.wr-l3{background:#22C55E}.wr-l4{background:#F59E0B}.wr-l5{background:#EF4444}.windrose-detail{margin-top:16px;background:#f7fafc;border-left:4px solid #17aaff;padding:12px 14px;border-radius:6px;color:#496276;min-height:54px}.windrose-status{margin-top:12px;color:#60758a;font-size:12px}@media(max-width:900px){.windrose-layout{grid-template-columns:1fr}.windrose-canvas-wrap{margin:auto;width:100%;max-width:580px}}@media(max-width:520px){.windrose-kpis{grid-template-columns:1fr 1fr}.windrose-periods button{padding:7px 10px}.windrose-layout{gap:14px}}

/* v24: Wettervorhersage + Satellit/Regenradar */
.forecast-card,.weather-map-card{grid-column:1/-1}.forecast-head,.weather-map-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.forecast-head h2,.weather-map-head h2{margin:0 0 6px}.forecast-head p,.weather-map-head p{margin:0;color:#60758a;font-size:13px}.forecast-updated{color:#6c8192;font-size:12px;white-space:nowrap}.forecast-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}.forecast-day{padding:12px 9px;border:1px solid #d8e6f0;border-radius:11px;background:#f7fafc;text-align:center;min-width:0}.forecast-day.today{background:#eaf6ff;border-color:#8bcdf3;box-shadow:0 2px 8px rgba(23,170,255,.12)}.forecast-day strong,.forecast-day small,.forecast-day b,.forecast-day span,.forecast-day div{display:block}.forecast-day strong{color:#0d548b;font-size:14px}.forecast-day small{color:#7a8e9e;font-size:10px;margin-top:2px}.forecast-day .forecast-icon{font-size:30px;margin:7px 0 4px}.forecast-day b{font-size:17px;color:#183e5e}.forecast-day b em{font-style:normal;color:#648096;font-weight:600}.forecast-day>span:not(.forecast-icon){font-size:11px;color:#536d80;min-height:28px}.forecast-day div{font-size:10px;color:#5e7485;margin-top:5px;white-space:nowrap}.forecast-hourly-head{margin:18px 0 9px;border-top:1px solid #e0e9ef;padding-top:14px}.forecast-hourly-head h3{margin:0;color:#17476f;font-size:14px}.forecast-hours{display:flex;gap:7px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:thin}.forecast-hour{flex:0 0 76px;text-align:center;padding:9px 6px;background:#f5f9fc;border:1px solid #dce7ef;border-radius:9px}.forecast-hour strong,.forecast-hour span,.forecast-hour b,.forecast-hour small{display:block}.forecast-hour strong{font-size:11px;color:#47657c}.forecast-hour span{font-size:23px;margin:5px 0}.forecast-hour b{font-size:14px;color:#153f61}.forecast-hour small{font-size:9px;color:#6a8193;margin-top:4px}.forecast-source,.weather-map-foot{font-size:10px;color:#7a8d9d;margin-top:9px}.forecast-source a,.weather-map-foot a{color:#2876ad}.forecast-error{padding:14px;background:#fff2f2;color:#9c3434;border-radius:8px}.weather-map-switch{display:flex;gap:5px;background:#edf4f8;padding:4px;border-radius:9px}.weather-map-switch button{border:0;background:transparent;color:#315f7e;padding:8px 13px;border-radius:7px;cursor:pointer;font:inherit;font-size:12px;font-weight:700}.weather-map-switch button.active{background:#0877bd;color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.12)}.weather-map-frame-wrap{position:relative;width:100%;height:500px;overflow:hidden;border-radius:12px;border:1px solid #cfdee8;background:#e9f1f6}.weather-map-frame-wrap iframe{width:100%;height:100%;border:0;display:block}.weather-map-foot{display:flex;justify-content:space-between;gap:10px}.forecast-loading{grid-column:1/-1;color:#6b8192;padding:16px;text-align:center}
@media(max-width:1100px){.forecast-days{grid-template-columns:repeat(4,1fr)}}
@media(max-width:700px){.forecast-head,.weather-map-head{flex-direction:column}.forecast-days{grid-template-columns:repeat(2,1fr)}.weather-map-frame-wrap{height:390px}.weather-map-foot{flex-direction:column}.weather-map-switch{width:100%}.weather-map-switch button{flex:1}}

/* v25: eigene Seite Vorhersage */
.forecast-page .forecast-card,.forecast-page .weather-map-card{grid-column:1/-1;width:100%}.forecast-page .weather-map-frame-wrap{height:620px}@media(max-width:700px){.forecast-page .weather-map-frame-wrap{height:420px}}

/* V26: Standortmarker fuer Satellit/Regenradar */

/* v30: Astronomie – Sonne, Erde, Mond und Jahreszeiten */
.astronomy-page .astronomy-card{grid-column:1/-1;width:100%;padding:20px}.astronomy-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:14px}.astronomy-head h2{margin:0 0 6px;color:#123f68}.astronomy-head p{margin:0;color:#60758a;font-size:13px}.astronomy-head>span{color:#6c8192;font-size:12px;white-space:nowrap}.astronomy-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:20px;align-items:center}.astronomy-stage-wrap{background:radial-gradient(circle at center,#102a43 0,#081c2c 48%,#05131f 100%);border-radius:16px;border:1px solid #25455c;overflow:hidden;box-shadow:inset 0 0 40px rgba(0,0,0,.28)}.astronomy-svg{width:100%;height:auto;display:block;min-height:520px}.orbit-base{fill:none;stroke:#6f8799;stroke-width:2;stroke-dasharray:4 7;opacity:.55}.season-arc{fill:none;stroke-width:8;opacity:.72}.season-arc.spring{stroke:#5ac86e}.season-arc.summer{stroke:#f5c842}.season-arc.autumn{stroke:#e88a35}.season-arc.winter{stroke:#62b9ef}.sun-glow{fill:#ffd34e;opacity:.14}.sun{fill:#ffc928;stroke:#ffe886;stroke-width:4;filter:drop-shadow(0 0 16px rgba(255,200,40,.8))}.sun-label{fill:#6d4d00;font-weight:800;font-size:13px}.earth-halo{fill:#17aaff;opacity:.22}.earth-body{fill:#2386d1;stroke:#b9e8ff;stroke-width:2}.earth-land{fill:#62c26b;opacity:.95}.earth-axis{stroke:#fff;stroke-width:2}.axis-label{fill:#fff;font-size:10px;font-weight:700}.sun-earth-line{stroke:#ffd966;stroke-width:1.5;stroke-dasharray:5 6;opacity:.55}.moon-orbit{fill:none;stroke:#b9c8d4;stroke-width:1.5;stroke-dasharray:3 4;opacity:.8}.moon-dark{fill:#303a43}.moon-light{fill:#f1efcf}.moon-outline{fill:none;stroke:#d9e2e8;stroke-width:1}.moon-label,.current-label{fill:#fff;font-size:12px;font-weight:700}.season-label{font-size:11px;font-weight:700}.season-label.spring{fill:#85e593}.season-label.summer{fill:#ffe26a}.season-label.autumn{fill:#ffae65}.season-label.winter{fill:#8fd5ff}.season-date{fill:#b5c6d2;font-size:9px}.astronomy-info{display:grid;gap:9px}.astronomy-info>div{background:#f2f7fb;border:1px solid #d8e6ef;border-radius:10px;padding:11px 12px}.astronomy-info span,.astronomy-info strong{display:block}.astronomy-info span{font-size:11px;color:#687f91;margin-bottom:4px}.astronomy-info strong{font-size:15px;color:#123f68;line-height:1.25}.astronomy-legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:14px;color:#526b80;font-size:12px}.astronomy-legend span{display:flex;align-items:center;gap:6px}.season-dot{width:11px;height:11px;border-radius:50%;display:inline-block}.season-dot.spring{background:#5ac86e}.season-dot.summer{background:#f5c842}.season-dot.autumn{background:#e88a35}.season-dot.winter{background:#62b9ef}.astronomy-note{margin-top:14px;padding:11px 13px;background:#f7fafc;border-left:4px solid #17aaff;border-radius:7px;color:#526b80;font-size:12px;line-height:1.5}@media(max-width:900px){.astronomy-layout{grid-template-columns:1fr}.astronomy-info{grid-template-columns:repeat(3,1fr)}.astronomy-svg{min-height:0}}@media(max-width:650px){.astronomy-head{flex-direction:column}.astronomy-info{grid-template-columns:repeat(2,1fr)}.astronomy-card{padding:13px!important}.season-label,.season-date{font-size:8px}}

/* Astronomie: fotografische aktuelle Erde / Mond + Mondachse */
.astronomy-svg .earth-photo,
.astronomy-svg .moon-photo { pointer-events:none; }
.astronomy-svg .photo-outline { fill:none; stroke:#b9e7ff; stroke-width:2.2; }
.astronomy-svg .current-axis { stroke:#fff; stroke-width:2.4; }
.astronomy-svg .moon-phase-shadow { fill:#02070c; opacity:.82; }
.astronomy-svg .moon-axis { stroke:#f6d365; stroke-width:1.8; stroke-dasharray:3 2; }
.astronomy-svg .moon-axis-label { fill:#ffe79a; font-size:10px; font-weight:700; paint-order:stroke; stroke:#071b29; stroke-width:2px; }

/* v32: interaktive Astronomie-Simulation */
.astronomy-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px;padding:10px;background:#f3f8fc;border:1px solid #d7e5ef;border-radius:10px}.astro-control-group{display:flex;gap:6px;flex-wrap:wrap}.astronomy-controls button,.astronomy-controls select{border:1px solid #c7dbe9;background:#fff;color:#17476f;border-radius:7px;padding:7px 10px;font:inherit;font-size:12px;cursor:pointer}.astronomy-controls button:hover{background:#e8f4fc}.astronomy-controls #astro-play{background:#0877bd;color:#fff;border-color:#0877bd;font-weight:700}.astronomy-controls #astro-now{font-weight:700}.astro-control-options{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.astro-control-options label{display:flex;align-items:center;gap:6px;color:#526b80;font-size:12px}.astro-view-switch{display:flex;background:#e5eef5;padding:3px;border-radius:8px}.astro-view-switch button{border:0;background:transparent}.astro-view-switch button.active{background:#0877bd;color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.12)}.astronomy-stage-wrap{background:radial-gradient(ellipse at 50% 48%,#163954 0,#081c2c 48%,#030b12 100%);box-shadow:inset 0 -28px 60px rgba(0,0,0,.32),inset 0 18px 35px rgba(70,145,190,.06)}.astronomy-svg .orbit-3d{stroke-width:2.4}.astronomy-svg .sun{filter:drop-shadow(0 0 18px rgba(255,200,40,.9))}.astronomy-svg .earth-photo,.astronomy-svg .moon-photo{filter:drop-shadow(5px 7px 5px rgba(0,0,0,.5))}@media(max-width:800px){.astronomy-controls{align-items:stretch}.astro-control-options{width:100%;justify-content:space-between}.astro-control-group{width:100%}.astro-control-group button{flex:1 1 110px}}

/* V34: flüssige Astronomie-Simulation und reale Sonne */
.astronomy-svg .sun-photo{pointer-events:none;filter:drop-shadow(0 0 10px rgba(255,180,30,.65))}.astronomy-svg .sun-photo-outline{fill:none;stroke:#ffe28a;stroke-width:2.5}.astronomy-svg .sun-label{fill:#ffe59a;paint-order:stroke;stroke:#071b29;stroke-width:3px}.astro-smooth-toggle{background:#fff;border:1px solid #c7dbe9;border-radius:7px;padding:6px 9px;color:#17476f!important;user-select:none}.astro-smooth-toggle input{accent-color:#0877bd}


/* Astronomie v24: Kepler-Brennpunkte und sichtbare Geschwindigkeitsdarstellung */
.astronomy-svg .apsis-line{stroke:#d8e4ec;stroke-width:1.2;stroke-dasharray:8 7;opacity:.38}
.astronomy-svg .focus-dot{stroke:#fff;stroke-width:1.5}
.astronomy-svg .focus-sun{fill:#ffd34e}
.astronomy-svg .focus-empty{fill:#9fb2c1}
.astronomy-svg .focus-label{fill:#ffe08a;font-size:11px;font-weight:800;paint-order:stroke;stroke:#06131e;stroke-width:3px}
.astronomy-svg .apsis-dot{fill:#071b29;stroke-width:3}
.astronomy-svg .perihelion-dot{stroke:#ff9a3c}
.astronomy-svg .aphelion-dot{stroke:#68c5ff}
.astronomy-svg .perihelion-label{fill:#ffad62;font-size:10px;font-weight:800;paint-order:stroke;stroke:#06131e;stroke-width:3px}
.astronomy-svg .aphelion-label{fill:#8fd7ff;font-size:10px;font-weight:800;paint-order:stroke;stroke:#06131e;stroke-width:3px}
.astronomy-svg .equal-time-dot{fill:#fff;stroke:#071b29;stroke-width:.8;opacity:.92}
.astronomy-svg .velocity-vector{stroke:#fff;stroke-width:3;filter:drop-shadow(0 0 3px rgba(23,170,255,.9))}
.astronomy-svg .velocity-arrow{fill:#fff;stroke:#fff;stroke-width:2}
.astronomy-svg .velocity-label{fill:#8fd7ff;font-size:11px;font-weight:800;paint-order:stroke;stroke:#06131e;stroke-width:3px}
.astro-kepler-effect{display:block;margin-top:3px;color:#0877bd;font-size:10px;font-weight:700}
.kepler-hint{margin-top:12px;padding:9px 12px;border:1px solid #cfe2ef;border-radius:8px;background:#f3f9fd;color:#526b80;font-size:11px;line-height:1.45}
.kepler-hint strong{color:#123f68}

/* Astronomie v25: Kepler-Hinweise bewusst dezent */
.astronomy-svg .focus-label{font-size:9px;opacity:.82}
.astronomy-svg .perihelion-label,.astronomy-svg .aphelion-label{font-size:9px;opacity:.82}
.astronomy-svg .equal-time-dot{r:2px;opacity:.52;stroke-width:.5}
.astronomy-svg .apsis-dot{stroke-width:2;opacity:.78}
.kepler-hint{padding:6px 10px;font-size:10px;opacity:.88}

/* Astronomie v26: vollständig sichtbare, horizontal lesbare Kepler-Ellipse */
.astronomy-svg .apsis-line{stroke:#d8e4ec;stroke-width:1.2;stroke-dasharray:7 7;opacity:.42}
.astronomy-svg .focus-label{font-size:11px;opacity:1}
.astronomy-svg .apsis-dot{stroke-width:3;opacity:1}
.astronomy-svg .perihelion-label,.astronomy-svg .aphelion-label{font-size:11px;opacity:1;letter-spacing:.3px}
.astronomy-svg .apsis-sub-label{fill:#d6e3ec;font-size:8.5px;font-weight:600;paint-order:stroke;stroke:#06131e;stroke-width:2.5px}
.astronomy-svg .equal-time-dot{opacity:.55}

/* =========================================================
   HEADER – Besucher online unterhalb der Zeitkacheln
========================================================= */
.hero-right{
    flex-direction:column;
    align-items:stretch;
}
.hero-time-row{
    display:flex;
    align-items:stretch;
    gap:12px;
}
.visitor-online-card{
    width:100%;
    min-height:58px;
    padding:10px 16px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:12px;
    background:rgba(0,48,91,.45);
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
    box-shadow:0 5px 18px rgba(0,0,0,.12);
    display:flex;
    align-items:center;
    gap:12px;
}
.visitor-online-content{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}
.visitor-online-content>span{
    font-size:12px;
}
.visitor-online-value{
    display:flex;
    align-items:baseline;
    gap:9px;
}
.visitor-online-value strong{
    font-size:24px;
    line-height:1;
}
.visitor-online-value small{
    font-size:11px;
    opacity:.9;
}
.visitor-led{
    width:16px;
    height:16px;
    flex:0 0 16px;
    border-radius:50%;
    background:#9ca3af;
    border:1px solid rgba(255,255,255,.65);
    box-shadow:inset 0 2px 3px rgba(255,255,255,.45),inset 0 -2px 3px rgba(0,0,0,.28);
}
.visitor-led.online{
    background:#37d24c;
    box-shadow:inset 0 2px 3px rgba(255,255,255,.55),inset 0 -2px 3px rgba(0,0,0,.22),0 0 9px rgba(55,210,76,.85);
}
@media(max-width:1100px){
    .hero-time-row{flex-direction:column;gap:8px}
}
@media(max-width:800px){
    .hero-time-row{flex-direction:row}
    .hero-right{width:100%}
}
@media(max-width:560px){
    .hero-time-row{flex-direction:column}
    .visitor-online-value{flex-wrap:wrap}
}

/* =========================================================
   FIX: Desktop/Tablet – Zeitkacheln immer nebeneinander,
   Besucher-Kachel zwingend darunter
========================================================= */
.hero-right{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:8px !important;
}
.hero-time-row{
    display:flex !important;
    flex-direction:row !important;
    align-items:stretch !important;
    gap:12px !important;
    width:100% !important;
}
.hero-time-row .current-clock,
.hero-time-row .update-status{
    flex:1 1 0 !important;
    min-width:0 !important;
    margin-top:0 !important;
}
.hero-right .visitor-online-card{
    display:flex !important;
    position:static !important;
    width:100% !important;
    flex:0 0 auto !important;
    margin:0 !important;
}
@media(max-width:560px){
    .hero-time-row{flex-direction:column !important}
}

/* =========================================================
   v35 – NUR Typografie + einzeilige Besucheranzeige
   Bestehendes funktionierendes Header-Layout bleibt unangetastet.
========================================================= */
.hero-time-row #current-time,
.hero-time-row #last-update{
    font-size:17px !important;
    line-height:1.15 !important;
    font-weight:700 !important;
}

.visitor-online-card{
    flex-direction:row !important;
    align-items:center !important;
    flex-wrap:nowrap !important;
    gap:7px !important;
    white-space:nowrap !important;
}
.visitor-online-label,
.visitor-online-note{
    display:inline !important;
    font-size:12px !important;
    line-height:1 !important;
}
.visitor-online-card #visitor-online-count{
    display:inline !important;
    font-size:20px !important;
    line-height:1 !important;
    font-weight:700 !important;
    min-width:1ch !important;
}

/* v36 – Letzte Aktualisierung: Datum und Uhrzeit zwingend in einer Zeile */
.hero-time-row #last-update{
    display:block !important;
    white-space:nowrap !important;
    font-size:17px !important;
    line-height:1.15 !important;
}

/* =========================================================
   v37 – nur zwei Detailkorrekturen
========================================================= */

/* "vor weniger ..." in der Aktualisierungskachel nicht umbrechen */
.hero-time-row #update-age{
    display:block !important;
    white-space:nowrap !important;
}

/* Beide Uhrensymbole gleich groß – Aktualisierungssymbol ist maßgebend */
.hero-time-row .clock-icon{
    font-size:30px !important;
    line-height:1 !important;
    width:30px !important;
    flex:0 0 30px !important;
}

/* =========================================================
   v38 – Uhrsymbole wirklich identisch + Statuspunkt sichtbar
========================================================= */

/* Beide Uhrsymbole verwenden exakt dieselben Maße.
   Das Symbol "Letzte Aktualisierung" ist die Referenz. */
.hero-time-row .clock-icon,
.hero-time-row .update-clock{
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    flex:0 0 30px !important;
    font-size:30px !important;
    line-height:30px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}

/* Grünen Online-/Aktualisierungspunkt rechts in der Kachel erhalten. */
.hero-time-row .update-status #online-indicator{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:0 0 auto !important;
    margin-left:auto !important;
}

/* =========================================================
   v39 – Statuspunkt innerhalb + Uhrsymbol vertikal zur Uhrzeit
========================================================= */

/* Statuspunkt sicher innerhalb der Aktualisierungskachel halten */
.hero-time-row .update-status{
    position:relative !important;
    padding-right:38px !important;
}
.hero-time-row .update-status #online-indicator{
    position:absolute !important;
    right:14px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    margin:0 !important;
}

/* Uhrsymbol "Aktuelle Uhrzeit" vertikal auf Höhe der großen Uhrzeit setzen */
.hero-time-row .current-clock{
    position:relative !important;
}
.hero-time-row .current-clock .clock-icon{
    align-self:center !important;
    margin-top:12px !important;
}

/* =========================================================
   v40 – ausschließlich Positionskorrekturen
========================================================= */

/* Genügend Platz rechts für den grünen Statuspunkt reservieren */
.hero-time-row .update-status{
    padding-right:52px !important;
}
.hero-time-row .update-status #online-indicator{
    right:14px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    z-index:2 !important;
}

/* Uhrsymbol bei "Aktuelle Uhrzeit":
   Mitte des Symbols exakt auf Höhe der Uhrzeit-Zeile */
.hero-time-row .current-clock .clock-icon{
    align-self:flex-start !important;
    margin-top:25px !important;
}

/* v41 – ausschließlich linkes Uhrsymbol 9 px nach oben */
.hero-time-row .current-clock .clock-icon{
    margin-top:16px !important;
}

/* =========================================================
   v42 – finale Header-Anordnung
   - beide Uhrsymbole oben links
   - grüner Statuspunkt darunter
   - Statuspunkt größer und 3D
========================================================= */

/* In beiden oberen Kacheln Platz links für Symbolspalte schaffen */
.hero-time-row .current-clock,
.hero-time-row .update-status{
    position:relative !important;
    padding-left:58px !important;
}

/* Beide Uhrsymbole identisch oben links */
.hero-time-row .current-clock .clock-icon,
.hero-time-row .update-status .update-clock{
    position:absolute !important;
    left:15px !important;
    top:13px !important;
    margin:0 !important;
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    font-size:30px !important;
    line-height:30px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}

/* Grüner Statuspunkt direkt UNTER dem Uhrsymbol der Aktualisierung */
.hero-time-row .update-status #online-indicator{
    position:absolute !important;
    left:18px !important;
    right:auto !important;
    top:55px !important;
    transform:none !important;
    margin:0 !important;

    width:24px !important;
    height:24px !important;
    min-width:24px !important;
    border-radius:50% !important;

    /* 3D-LED */
    background:
        radial-gradient(circle at 34% 28%,
            #baffb7 0%,
            #62f16b 18%,
            #24cf3a 43%,
            #08a823 72%,
            #057718 100%) !important;
    border:1px solid rgba(160,255,170,.75) !important;
    box-shadow:
        inset 2px 2px 4px rgba(255,255,255,.70),
        inset -3px -4px 5px rgba(0,80,15,.45),
        0 2px 3px rgba(0,0,0,.40),
        0 0 9px rgba(30,230,60,.72) !important;
    z-index:3 !important;
}

/* =========================================================
   Wartungsmodus
========================================================= */
body.maintenance-mode .main-navigation{display:none!important}
.maintenance-dashboard{min-height:260px}
.maintenance-public-card{
    display:flex;
    align-items:center;
    gap:18px;
    padding:28px 30px!important;
    border-left:5px solid #d43b3b!important;
}
.maintenance-public-card h2{margin:0 0 8px;color:#9e2929}
.maintenance-public-card p{margin:0 0 8px;font-size:16px;line-height:1.55;color:#334f65}
.maintenance-public-card small{color:#6d8191}
.maintenance-public-icon{
    flex:0 0 54px;width:54px;height:54px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    background:#fff1f1;color:#b82f2f;font-size:28px;border:1px solid #efc0c0
}
/* Im Wartungsmodus wird die 3D-LED der Aktualisierung rot. */
body.maintenance-mode .hero-time-row .update-status #online-indicator,
body.maintenance-mode .update-status #online-indicator{
    background:radial-gradient(circle at 34% 28%,#ffd0d0 0%,#ff7777 18%,#e83c3c 43%,#bf1717 72%,#7d0909 100%)!important;
    border-color:rgba(255,175,175,.8)!important;
    box-shadow:inset 2px 2px 4px rgba(255,255,255,.7),inset -3px -4px 5px rgba(95,0,0,.45),0 2px 3px rgba(0,0,0,.4),0 0 9px rgba(235,35,35,.7)!important;
}

/* =========================================================
   Wartungsmodus v3 – große Wartungskachel über volle Breite
========================================================= */
body.maintenance-mode .maintenance-dashboard{
    width:100% !important;
    max-width:none !important;
    min-height:300px !important;
    padding:18px 20px 22px !important;
    box-sizing:border-box !important;
}

body.maintenance-mode .maintenance-public-card{
    width:100% !important;
    max-width:none !important;
    min-height:245px !important;
    box-sizing:border-box !important;
    margin:0 !important;
    padding:38px 48px !important;
    display:flex !important;
    align-items:center !important;
    gap:34px !important;
    border-left:6px solid #d43b3b !important;
}

body.maintenance-mode .maintenance-public-icon{
    flex:0 0 88px !important;
    width:88px !important;
    height:88px !important;
    font-size:44px !important;
}

body.maintenance-mode .maintenance-public-card > div:last-child{
    flex:1 1 auto !important;
    min-width:0 !important;
}

body.maintenance-mode .maintenance-public-card h2{
    margin:0 0 16px !important;
    font-size:34px !important;
    line-height:1.15 !important;
    font-weight:700 !important;
}

body.maintenance-mode .maintenance-public-card p{
    margin:0 0 18px !important;
    max-width:none !important;
    font-size:25px !important;
    line-height:1.48 !important;
}

body.maintenance-mode .maintenance-public-card small{
    display:block !important;
    font-size:18px !important;
    line-height:1.4 !important;
}

@media(max-width:800px){
    body.maintenance-mode .maintenance-dashboard{
        padding:12px !important;
    }
    body.maintenance-mode .maintenance-public-card{
        min-height:0 !important;
        padding:24px !important;
        gap:20px !important;
    }
    body.maintenance-mode .maintenance-public-icon{
        flex-basis:64px !important;
        width:64px !important;
        height:64px !important;
        font-size:32px !important;
    }
    body.maintenance-mode .maintenance-public-card h2{
        font-size:27px !important;
    }
    body.maintenance-mode .maintenance-public-card p{
        font-size:19px !important;
    }
    body.maintenance-mode .maintenance-public-card small{
        font-size:15px !important;
    }
}

/* =========================================================
   Wartungsmodus v4
   Wartungskachel bündig mit dem Header-Inhalt:
   links = Sonne/Logo, rechts = rechter Rand der Header-Kacheln
========================================================= */

/* Das Dashboard-Grid darf die Wartungskachel nicht auf eine Spalte begrenzen. */
body.maintenance-mode .maintenance-dashboard{
    display:block !important;
    width:min(100% - 40px, 1360px) !important;
    max-width:1360px !important;
    margin:0 auto !important;
    padding:18px 0 22px !important;
    box-sizing:border-box !important;
}

/* Kachel über die komplette Breite dieses Inhaltsbereichs. */
body.maintenance-mode .maintenance-dashboard .maintenance-public-card{
    display:flex !important;
    grid-column:1 / -1 !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    min-height:245px !important;
    margin:0 !important;
    box-sizing:border-box !important;
    padding:38px 48px !important;
    align-items:center !important;
    gap:34px !important;
}

/* Textbereich darf die gesamte Restbreite verwenden. */
body.maintenance-mode .maintenance-public-card > div:last-child{
    width:auto !important;
    max-width:none !important;
    flex:1 1 0 !important;
    min-width:0 !important;
}

body.maintenance-mode .maintenance-public-card h2{
    font-size:34px !important;
    line-height:1.15 !important;
}

body.maintenance-mode .maintenance-public-card p{
    width:100% !important;
    max-width:none !important;
    font-size:25px !important;
    line-height:1.48 !important;
}

body.maintenance-mode .maintenance-public-card small{
    font-size:18px !important;
}

@media(max-width:800px){
    body.maintenance-mode .maintenance-dashboard{
        width:calc(100% - 24px) !important;
        padding:12px 0 16px !important;
    }
    body.maintenance-mode .maintenance-dashboard .maintenance-public-card{
        padding:24px !important;
    }
}
