        @font-face {
            font-family: 'Inter';
            src: url('/fonts/inter-400.woff2') format('woff2');
            font-weight: 400;
            font-style: normal;
            font-display: swap;
        }
        @font-face {
            font-family: 'Inter';
            src: url('/fonts/inter-600.woff2') format('woff2');
            font-weight: 600;
            font-style: normal;
            font-display: swap;
        }
        @font-face {
            font-family: 'Inter';
            src: url('/fonts/inter-700.woff2') format('woff2');
            font-weight: 700;
            font-style: normal;
            font-display: swap;
        }

        :root {
            /* Tagmodus (Standard) */
            --bg-color: #A7B481;
            --card-bg-color: #e4dccf;
            --text-color: #36322d;
            --accent-color: #f47b20;
            --accent-dark-color: #d86a1a;
            --secondary-accent-color: #6a734d;
            --link-color: #5c4033;
            --moon-light: #f0e6d2;
            --moon-dark: #4a4a4a;
            --zero-line-color: #ADD8E6;

            /* Chart (Canvas + Legende, Tagmodus) */
            --chart-day-night-bg: #1a1a1a;
            --chart-day: rgba(245, 222, 179, 0.3);
            --chart-grid: #444;
            --chart-cloud-cover: rgba(128, 128, 128, 0.25);
            --chart-precip: rgba(59, 130, 246, 0.7);
            --chart-wind-gust: #606060;
            --chart-feels-like: #9370DB;
            --chart-temp: red;
            --chart-wind: #808080;
            --chart-wind-arrow: #93c5fd;
            --chart-twilight: #f59e0b;
            --chart-solunar-major: rgba(120, 130, 70, 0.7);
            --chart-solunar-minor: rgba(120, 130, 70, 0.45);
            --timeline-scale-accent: #ffffff;
            --timeline-scroll-hint-color: #ffffff;
            --rescue-brand: #1f7f52;
            --rescue-brand-hover: #196844;
            --rescue-brand-border: #155a3a;

            /* Farben für Nachtmodus (werden überschrieben) */
            --night-bg: #000000;
            --night-card-bg: #000000;
            --night-text: #FF6B6B;
            --night-accent: #FF0000;
            --night-accent-dark: #B20000;
            --night-secondary-accent: #800000;
            --night-link: #E00000;
            --night-moon-light: #FFDDDD;
            --night-moon-dark: #440000;
            --day-card-background: #8e9a6e;
        }

        /* Nachtmodus-Klasse */
        body.night-mode {
            --timeline-scale-accent: #8b2525;
            --timeline-scroll-hint-color: #8b2525;
            --bg-color: var(--night-bg);
            --card-bg-color: var(--night-card-bg);
            --text-color: var(--night-text);
            --accent-color: var(--night-accent);
            --accent-dark-color: var(--night-accent-dark);
            --secondary-accent-color: var(--night-secondary-accent);
            --link-color: var(--night-link);
            --moon-light: var(--night-moon-light);
            --moon-dark: var(--night-moon-dark);
            --zero-line-color: #FF4500;

            --chart-day-night-bg: #000000;
            --chart-day: rgba(128, 0, 0, 0.3);
            --chart-grid: #330000;
            --chart-cloud-cover: rgba(128, 0, 0, 0.4);
            --chart-precip: rgba(255, 0, 0, 0.5);
            --chart-wind-gust: #600000;
            --chart-feels-like: #C02020;
            --chart-temp: #FF6060;
            --chart-wind: #900000;
            --chart-wind-arrow: #FF0000;
            --chart-twilight: rgba(255, 50, 0, 0.8);
            --chart-solunar-major: rgba(255, 190, 100, 0.55);
            --chart-solunar-minor: rgba(255, 140, 90, 0.4);
        }

        body { font-family: 'Inter', "Segoe UI", Tahoma, Arial, sans-serif; background-color: var(--bg-color); display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; margin: 0; padding: 20px; box-sizing: border-box; transition: background-color 0.5s ease; }
        .app-container { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
        /* Anpassung des Suchcontainers für das Logo */
        .search-container { 
            width: 100%; max-width: 640px; display: flex; align-items: center; gap: 0.5rem; 
            animation: fadeIn 0.5s ease-out; position: sticky; top: 20px; 
            background-color: var(--bg-color); padding-bottom: 1rem; z-index: 20; 
            transition: background-color 0.5s ease;
        }
        /* Style für das Logo */
        .logo {
            height: 48px; /* Höhe des Eingabefeldes angepasst, um dem Positionsbutton zu entsprechen */
            width: auto; /* Automatische Breite beibehalten */
            margin-right: 0.5rem; /* Abstand zum Eingabefeld */
            border: 1px solid var(--secondary-accent-color); /* 1px Rahmen in Olivton */
            border-radius: 0.75rem; /* Abgerundete Ecken */
            max-width: 100%; /* Sicherstellen, dass das Logo nicht überläuft */
            transition: border-color 0.5s ease;
        }
        /* Style für den anklickbaren Wrapper um das Logo */
        .logo-wrapper {
            cursor: pointer;
            line-height: 0; /* Entfernt den Abstand unter dem Bild, der durch 'inline-block' entsteht */
        }
        body.night-mode .logo {
             filter: sepia(100%) saturate(1000%) hue-rotate(340deg);
        }

        #city-search-form { display: flex; flex-grow: 1; gap: 0.5rem; }
        /* Anpassung der Breite des Eingabefeldes */
        #city-input { 
            flex-grow: 1; 
            border: 1px solid var(--secondary-accent-color); padding: 0.75rem 1rem; border-radius: 0.75rem; 
            font-size: 1.2rem; /* Schriftgrad größer */
            font-weight: 700; /* Bold */
            transition: box-shadow 0.2s, background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease; 
            background-color: var(--card-bg-color); color: var(--text-color); 
            width: calc(100% - 120px - 0.5rem); /* Angepasste Breite: Gesamtbreite - Logo-Breite - Abstand */
        }
        #city-input:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-color); }
        #city-input::placeholder { color: var(--secondary-accent-color); }
        .action-button { border: none; padding: 0.75rem 1.25rem; border-radius: 0.75rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s; background-color: var(--accent-color); }
        .action-button:hover, .action-button:disabled { background-color: var(--accent-dark-color); }
        .action-button:disabled { cursor: not-allowed; opacity: 0.7; }
        #geolocation-button { 
            padding: 0.75rem 1rem; 
            background-color: var(--secondary-accent-color); 
            transition: background-color 0.5s ease;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        #geolocation-button:hover { background-color: var(--accent-dark-color); }
        
        body.night-mode #geolocation-button {
             color: black;
        }
        
        #geolocation-button svg path { 
            fill: currentColor;
            transition: fill 0.5s ease;
        }
        
        #toggle-mode-button svg {
            display: none;
        }
        #toggle-mode-button .moon-icon {
            display: block;
        }
        body.night-mode #toggle-mode-button .sun-icon {
            display: block;
        }
        body.night-mode #toggle-mode-button .moon-icon {
            display: none;
        }
        
        #city-search-form #search-button {
            color: white;
        }
        body.night-mode #city-search-form #search-button {
            color: black;
        }

        #open-legend-button, #toggle-mode-button, #toggle-ai-button {
            background-color: var(--secondary-accent-color);
            border: none;
            padding: 0.75rem 1.25rem;
            border-radius: 0.75rem;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s, color 0.5s ease;
        }
        #open-legend-button, #toggle-ai-button {
            color: white;
        }
        body.night-mode #open-legend-button, body.night-mode #toggle-ai-button {
            color: black;
        }
        #open-legend-button:hover, #toggle-mode-button:hover, #toggle-ai-button:hover { background-color: var(--accent-dark-color); }
        #toggle-mode-button {
            padding: 0.75rem 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        #toggle-mode-button span {
            color: white;
            transition: color 0.5s ease;
        }
        body.night-mode #toggle-mode-button span {
            color: black;
        }

        .toggle-group-footer {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-top: 1rem;
            width: 100%;
            max-width: 640px;
        }

        .app-wrapper { width: 100%; display: none; flex-direction: column; gap: 1rem; animation: fadeIn 1s ease-out; align-items: center; }
        .app-wrapper.visible { display: flex; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        
        .current-conditions { 
            display: grid; 
            grid-template-columns: auto 1fr auto; 
            grid-template-rows: auto auto; 
            gap: 0.25rem; 
            text-align: center; 
            color: var(--text-color); 
            font-weight: 600; 
            width: 100%; 
            max-width: 640px; 
            align-items: center; 
            justify-items: center; 
            padding: 0.25rem; 
            border: 2px solid var(--secondary-accent-color); 
            border-radius: 0.75rem; 
            box-sizing: border-box; 
            box-shadow: 
                inset 0 0 2px rgba(0,0,0,0.2), 
                0 4px 6px -1px rgba(0,0,0,0.1), 
                0 2px 4px -1px rgba(0,0,0,0.06); 
            transition: border-color 0.5s ease, color 0.5s ease;
        }
        body.night-mode .current-conditions {
            box-shadow: none; 
        }
        .condition-item { 
            font-size: 0.8rem; 
            display: flex; 
            flex-direction: column; 
            align-items: center; 
            justify-content: center;
            background-color: var(--card-bg-color); 
            color: var(--text-color);
            border-radius: 0.5rem; 
            box-sizing: border-box;
            transition: background-color 0.5s ease, color 0.5s ease;
        }
        body:not(.night-mode) .condition-item {
            background-color: var(--day-card-background);
        }
        body:not(.night-mode) .middle-info-wrapper .condition-item {
            color: #ffffff;
        }
        .condition-item.wind-item {
            grid-column: 1; 
            grid-row: 1 / span 2; 
            width: 60px;   
            height: 60px;  
            padding: 0; 
        }
        .condition-item.moon-phase-item {
            grid-column: 3; 
            grid-row: 1 / span 2; 
            width: 60px;   
            height: 60px;  
            padding: 0; 
        }
        .middle-info-wrapper {
            grid-column: 2; 
            grid-row: 1; 
            display: flex;
            flex-wrap: wrap; 
            justify-content: center; 
            gap: 0.25rem; 
            flex-grow: 1; 
            flex-shrink: 1; 
            min-width: 0; 
        }

        .condition-item.temp-item,
        .condition-item.weather-item,
        .condition-item.wind-speed-item, 
        .condition-item.twilight-item {
            padding: 0.15rem 0.3rem; 
            min-height: 60px; 
            flex-grow: 1; 
            flex-shrink: 1; 
            border: 2px solid var(--secondary-accent-color);
            transition: border-color 0.5s ease, background-color 0.5s ease, color 0.5s ease;
        }

        .condition-item.twilight-item {
            flex-basis: 90px; 
            min-width: 90px; 
        }
        .condition-item.temp-item,
        .condition-item.weather-item,
        .condition-item.wind-speed-item { 
            flex-basis: 100px; 
            min-width: 100px;
        }

        .wind-icon-container {
            width: 48px;
            height: 48px;
            display: flex; 
            justify-content: center;
            align-items: center;
        }
        .wind-icon-container svg {
            width: 100%;
            height: 100%;
        }

        .moon-phase-item .moon-phase-icon { 
            width: 48px; 
            height: 48px; 
            display: flex; 
            justify-content: center;
            align-items: center;
        }
        .moon-phase-item .moon-phase-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover; 
            border-radius: 0.5rem; 
            transition: filter 0.5s ease;
        } 
        body.night-mode .moon-phase-item .moon-phase-icon img {
             filter: sepia(100%) saturate(1000%) hue-rotate(340deg);
        }

        #timeline-scroll-wrapper { 
            display: grid; 
            grid-template-columns: auto 1fr auto; 
            align-items: stretch; 
            max-width: 640px; 
            width: 100%; 
            border-radius: 0.75rem; 
            box-shadow: 
                inset 0 0 2px rgba(0,0,0,0.2), 
                0 10px 15px -3px rgba(0,0,0,0.1), 
                0 4px 6px -2px rgba(0,0,0,0.05); 
            background-color: var(--night-bg); 
            padding-bottom: 8px; 
            position: relative; 
            border: 2px solid var(--secondary-accent-color); 
            box-sizing: border-box; 
            transition: border-color 0.5s ease, background-color 0.5s ease;
        }
        body.night-mode #timeline-scroll-wrapper {
            box-shadow: none; 
        }
        
        #chart-scroll-area::-webkit-scrollbar { height: 8px; }
        #chart-scroll-area::-webkit-scrollbar-track { background: var(--secondary-accent-color); border-radius: 10px; }
        #chart-scroll-area::-webkit-scrollbar-thumb { background-color: var(--accent-color); border-radius: 10px; border: 2px solid var(--night-bg); }
        #chart-scroll-area::-webkit-scrollbar-thumb:hover { background-color: var(--accent-dark-color); }

        #temp-scale-container {
            grid-column: 1;
            grid-row: 1;
            position: sticky;
            left: 0;
            top: 0; 
            bottom: 0; 
            width: 35px; 
            background-color: rgba(0,0,0,0.2);
            color: var(--text-color);
            font-size: 10px;
            font-weight: 600;
            display: flex;
            flex-direction: column;
            align-items: flex-end; 
            padding-right: 5px; 
            z-index: 10; 
            box-sizing: border-box; 
            height: var(--chart-canvas-height, 250px);
            overflow: visible;
            transition: color 0.5s ease;
        }
        #wind-scale-container {
            grid-column: 3;
            grid-row: 1;
            position: sticky;
            right: 0;
            top: 0; 
            bottom: 0; 
            width: 35px; 
            background-color: rgba(0,0,0,0.2);
            color: var(--text-color);
            font-size: 10px;
            font-weight: 600;
            display: flex;
            flex-direction: column;
            align-items: flex-start; 
            padding-left: 5px; 
            z-index: 10; 
            box-sizing: border-box; 
            height: var(--chart-canvas-height, 250px);
            overflow: visible;
            transition: color 0.5s ease;
        }

        #temp-scale-container .scale-tick,
        #wind-scale-container .scale-tick {
            position: absolute;
            transform: translateY(-50%);
        }

        #temp-scale-container .scale-footer,
        #wind-scale-container .scale-footer {
            position: absolute;
            bottom: -20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1px;
            pointer-events: none;
            line-height: 1;
        }

        #temp-scale-container .scale-footer {
            right: 2px;
            align-items: flex-end;
        }

        #wind-scale-container .scale-footer {
            left: 2px;
            align-items: flex-start;
        }

        .scale-footer .scale-icon {
            width: 14px;
            height: 14px;
            color: var(--timeline-scale-accent);
            flex-shrink: 0;
        }

        .scale-footer .scale-unit {
            font-size: 9px;
            font-weight: 600;
            color: inherit;
            padding-bottom: 1px;
        }

        .timeline-scroll-hint {
            position: absolute;
            top: calc(var(--chart-canvas-height, 250px) * 0.5);
            transform: translateY(-50%);
            z-index: 20;
            width: 10px;
            height: 40px;
            margin: 0;
            padding: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .timeline-scroll-hint[hidden] {
            display: none;
        }

        .timeline-scroll-hint--left {
            left: 6px;
        }

        .timeline-scroll-hint--right {
            right: 6px;
        }

        .timeline-scroll-hint::before {
            content: '';
            display: block;
            width: 0;
            height: 0;
            margin: 0 auto;
            border-style: solid;
        }

        .timeline-scroll-hint--left::before {
            border-width: 20px 10px 20px 0;
            border-color: transparent var(--timeline-scroll-hint-color) transparent transparent;
        }

        .timeline-scroll-hint--right::before {
            border-width: 20px 0 20px 10px;
            border-color: transparent transparent transparent var(--timeline-scroll-hint-color);
        }

        body:not(.night-mode) #temp-scale-container,
        body:not(.night-mode) #wind-scale-container {
            color: white;
        }

        body.night-mode #temp-scale-container,
        body.night-mode #wind-scale-container {
            color: var(--timeline-scale-accent);
        }

        #chart-content-wrapper {
            grid-column: 2;
            grid-row: 1;
            display: grid;
            grid-template-columns: 1fr;
            grid-template-rows: auto;
            flex-grow: 1;
            min-width: 0;
        }

        #chart-scroll-area {
            grid-column: 1;
            grid-row: 1;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            display: flex;
            flex-direction: column;
        }

        .chart-scroll-overlay {
            grid-column: 1;
            grid-row: 1;
            position: relative;
            align-self: start;
            width: 100%;
            height: var(--chart-canvas-height, 250px);
            pointer-events: none;
            z-index: 20;
        }

        .chart-scroll-overlay .timeline-scroll-hint {
            pointer-events: auto;
        }

        #forecast-timeline { 
            display: flex; 
            flex-direction: column; 
            align-items: flex-start; 
            flex-shrink: 0; 
        }
        .chart-canvas-base { display: block; background-color: transparent; cursor: crosshair; }
        #combined-weather-chart-canvas { height: var(--chart-canvas-height, 250px); }
        #hourly-details-wrapper { display: flex; flex-direction: row; align-items: flex-start; background-color: transparent; padding-bottom: 0.5rem; }
        .hourly-detail-item { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; width: 40px; height: 35px; flex-shrink: 0; padding: 0.5rem 0; border-right: 1px solid var(--secondary-accent-color); box-sizing: border-box; }
        .hourly-detail-item:last-child { border-right: none; }
        .hourly-detail-item .time-label { font-weight: 600; font-size: 0.7rem; background-color: var(--secondary-accent-color); color: white; border-radius: 0.375rem; padding: 0.1rem 0.3rem; margin-bottom: 0.4rem; height: auto; white-space: normal; width: calc(100% - 4px); text-align: center; }
        body.night-mode .hourly-detail-item .time-label { color: black; }
        #tooltip { display: none; position: absolute; background-color: rgba(26,26,26,0.85); color: white; padding: 8px 12px; border-radius: 6px; font-size: 0.8rem; pointer-events: none; transform: translate(-50%, -120%); white-space: nowrap; z-index: 10; border: 1px solid #444; backdrop-filter: blur(4px); }
        body.night-mode #tooltip { background-color: rgba(50, 0, 0, 0.85); border: 1px solid #800000; }
        .message-box { display: none; width: 100%; max-width: 640px; padding: 1rem; border-radius: 0.75rem; text-align: center; font-weight: 600; }
        .message-box.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
        .message-box.info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
        body.night-mode .message-box.info {
            background-color: #440000; 
            color: #FF6B6B; 
            border: 1px solid #800000; 
        }
        .card { 
            background-color: var(--card-bg-color); color: var(--text-color); padding: 1rem 1.5rem; border-radius: 0.75rem; 
            width: 100%; max-width: 640px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); 
            box-sizing: border-box; display: flex; flex-direction: column; align-items: center;
            transition: background-color 0.5s ease, color 0.5s ease;
        }
        body.night-mode .card {
            box-shadow: none;
            border: 2px solid var(--secondary-accent-color);
        }
        .card h3 { 
            font-size: 1.2rem; font-weight: 600; margin-top: 0; margin-bottom: 0.75rem; 
            border-bottom: 1px solid var(--bg-color); padding-bottom: 0.5rem; 
            width: 100%; text-align: center;
        }
        .card p { font-size: 0.95rem; line-height: 1.6; margin: 0; min-height: 40px; text-align: center; }
        .gemini-button { background-color: var(--secondary-accent-color); color: white; border: none; padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; transition: background-color 0.2s; margin-top: 1rem; }
        .gemini-button:hover { background-color: var(--accent-dark-color); }
        .gemini-button:disabled { background-color: #999; cursor: not-allowed; }
        .context-selectors { display: flex; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; justify-content: center; }
        .context-group .group-label { font-weight: 600; font-size: 0.9rem; }
        .context-group label { display: flex; align-items: center; gap: 0.25rem; cursor: pointer; }
        footer { 
            margin-top: 1rem; 
            font-size: 0.875rem; 
            color: var(--text-color); 
            text-align: center; 
            width: 100%; 
            display: flex; 
            flex-direction: column; 
            gap: 0.5rem; 
            line-height: 1.5; 
            align-items: center; 
            transition: color 0.5s ease;
        }
        footer a { color: var(--link-color); text-decoration: none; font-weight: 600; }
        footer a:hover { text-decoration: underline; }
        .footer-links { display: flex; gap: 0.5rem; justify-content: center; align-items: center; font-size: 0.75rem; }
        .mb-2 { margin-bottom: 0.5rem; }
        
        .logo-above-footer {
            display: block;
            margin: 1rem auto;
            height: 100px;
            width: auto;
            max-width: 100%;
            transition: filter 0.5s ease;
        }
        .rescue-points-section {
            width: 100%;
            max-width: 640px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            margin: 0 auto 0.5rem;
        }
        #rescue-points-toggle {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 1rem;
            border-radius: 0.75rem;
            border: 2px solid var(--rescue-brand-border);
            background-color: var(--rescue-brand);
            color: #ffffff;
            font-weight: 600;
            font-size: 1rem;
            cursor: pointer;
            font-family: inherit;
            transition: background-color 0.2s, border-color 0.2s, color 0.5s ease;
        }
        #rescue-points-toggle:hover {
            background-color: var(--rescue-brand-hover);
            border-color: var(--rescue-brand-hover);
            color: #ffffff;
        }
        #rescue-points-toggle .rescue-cross-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }
        body.night-mode #rescue-points-toggle {
            background-color: var(--secondary-accent-color);
            border: none;
            color: #000000;
        }
        body.night-mode #rescue-points-toggle:hover {
            background-color: var(--accent-dark-color);
            color: #000000;
        }
        .rescue-points-panel {
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: 0.75rem;
            background-color: var(--rescue-brand);
            border: 2px solid var(--rescue-brand-border);
            color: #ffffff;
            box-sizing: border-box;
        }
        .rescue-points-panel[hidden] {
            display: none !important;
        }
        #rescue-points-message {
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }
        #rescue-points-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        #rescue-points-list li {
            font-size: 0.85rem;
            line-height: 1.4;
        }
        #rescue-points-list a {
            color: #ffffff;
            font-weight: 600;
            text-decoration: underline;
            text-underline-offset: 2px;
        }
        #rescue-points-list a:hover {
            color: #e8f5ee;
        }
        .rescue-point-actions {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 0.5rem 0.75rem;
            margin-top: 0.15rem;
        }
        .rescue-point-nav-link {
            font-weight: 700;
        }
        .rescue-point-maps-link {
            opacity: 0.9;
        }
        .rescue-offline-hint {
            font-size: 0.75rem;
            line-height: 1.45;
            margin: 0 0 0.5rem;
            padding: 0.4rem 0.5rem;
            border-radius: 0.375rem;
            background: rgba(0, 0, 0, 0.15);
            color: rgba(255, 255, 255, 0.92);
        }
        .rescue-offline-hint[hidden] {
            display: none;
        }
        .rescue-attribution {
            font-size: 0.7rem;
            opacity: 0.9;
            margin-top: 0.5rem;
            color: rgba(255, 255, 255, 0.85);
        }
        .rescue-attribution a {
            color: #ffffff;
            text-decoration: underline;
        }
        body.night-mode .logo-above-footer {
             filter: invert(34%) sepia(100%) saturate(6929%) hue-rotate(345deg) brightness(100%) contrast(100%);
        }

        .ai-card-hidden {
            display: none;
            animation: fadeOut 0.5s ease-out forwards;
        }
        .ai-card-visible {
             display: flex;
             animation: fadeIn 0.5s ease-out forwards;
        }
        
        @keyframes fadeOut {
            from { opacity: 1; transform: translateY(0); }
            to { opacity: 0; transform: translateY(-10px); }
        }

        .modal {
            display: none; 
            position: fixed; 
            z-index: 100; 
            left: 0;
            top: 0;
            width: 100%; 
            height: 100%; 
            overflow: auto; 
            background-color: rgba(0,0,0,0.6); 
            justify-content: center;
            align-items: center;
            padding: 20px;
            box-sizing: border-box;
        }

        .modal-content {
            background-color: var(--card-bg-color);
            margin: auto;
            padding: 25px;
            border-radius: 0.75rem;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            position: relative;
            color: var(--text-color);
            max-height: 90vh; 
            overflow-y: auto; 
        }
        body.night-mode .modal-content {
            box-shadow: none;
            border: 2px solid var(--secondary-accent-color);
        }

        .close-button {
            color: var(--text-color);
            position: absolute;
            top: 10px;
            right: 20px;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            transition: color 0.2s;
        }

        .close-button:hover,
        .close-button:focus {
            color: var(--accent-color);
            text-decoration: none;
            cursor: pointer;
        }

        .modal-content h2 {
            text-align: center;
            color: var(--accent-color);
            margin-top: 0;
            margin-bottom: 15px;
            font-size: 1.5rem;
        }

        .legend-item {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            font-size: 0.95rem;
            line-height: 1.4;
        }

        .legend-color-box {
            width: 30px;
            height: 15px;
            border-radius: 4px;
            margin-right: 12px;
            flex-shrink: 0; 
        }
        .legend-color-box.color-zero-line { 
            background-color: var(--zero-line-color); 
            border: 1px solid var(--secondary-accent-color);
        }
        .legend-icon {
            width: 55px; 
            height: 55px; 
            margin-right: 12px;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-shrink: 0;
        }

        .legend-icon svg {
            width: 100%;
            height: 100%;
        }

        .legend-description {
            flex-grow: 1;
        }

        /* Legende: gleiche Variablen wie Canvas (chart-renderer.js) */
        .color-temp { background-color: var(--chart-temp); }
        .color-feels-like-temp { background-color: var(--chart-feels-like); }
        .color-cloud-cover { background-color: var(--chart-cloud-cover); border: 1px solid var(--secondary-accent-color); }
        .color-wind { background-color: var(--chart-wind); }
        .color-wind-gust { background-color: var(--chart-wind-gust); }
        .color-rain { background-color: var(--chart-precip); }
        .color-day { background-color: var(--chart-day); border: 1px solid var(--secondary-accent-color); }
        .color-night { background-color: var(--chart-day-night-bg); border: 1px solid #333; }
        .color-twilight { background-color: var(--chart-twilight); }
        .color-zero-line { background-color: var(--zero-line-color); border: 1px solid var(--secondary-accent-color); }
        .color-solunar-major { background-color: var(--chart-solunar-major); height: 30px; }
        .color-solunar-minor { background-color: var(--chart-solunar-minor); height: 30px; }

        .legend-item .wind-arrow-legend {
            width: 55px; 
            height: 55px; 
            display: flex;
            justify-content: center;
            align-items: center;
            margin-right: 12px;
            flex-shrink: 0;
        }
        .wind-arrow-legend svg {
            width: 50px;
            height: 50px;
            fill: var(--chart-wind-arrow);
            stroke: black;
            stroke-width: 1;
        }
        body.night-mode .wind-arrow-legend svg {
            stroke: var(--night-card-bg);
        }

        /* Chart toggles styling */
        .chart-toggles-container {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            gap: 0.5rem;
            width: 100%;
            max-width: 640px;
            margin: 0.5rem 0 0.25rem 0;
            box-sizing: border-box;
            flex-wrap: wrap;
        }
        .chart-toggle-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.6rem 0.8rem;
            flex: 1 1 0;
            border-radius: 0.75rem;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            border: 2px solid var(--secondary-accent-color);
            background-color: transparent;
            color: var(--text-color);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-sizing: border-box;
            outline: none;
            user-select: none;
        }
        .chart-toggle-btn .toggle-icon {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            transition: transform 0.3s ease;
        }
        /* Active State */
        .chart-toggle-btn.active {
            background-color: var(--secondary-accent-color);
            color: white;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
        body.night-mode .chart-toggle-btn.active {
            color: black;
            box-shadow: none;
        }
        /* Hover Effects */
        .chart-toggle-btn:hover {
            background-color: rgba(106, 115, 77, 0.15);
            transform: translateY(-1.5px);
        }
        body.night-mode .chart-toggle-btn:hover {
            background-color: rgba(128, 0, 0, 0.15);
        }
        .chart-toggle-btn.active:hover {
            background-color: var(--accent-dark-color);
        }
        /* Inactive State */
        .chart-toggle-btn:not(.active) {
            opacity: 0.6;
            border-color: rgba(106, 115, 77, 0.4);
        }
        body.night-mode .chart-toggle-btn:not(.active) {
            border-color: rgba(128, 0, 0, 0.4);
        }
        /* Responsive scaling */
        @media (max-width: 480px) {
            .chart-toggle-btn {
                padding: 0.5rem 0.3rem;
                font-size: 0.72rem;
                gap: 0.2rem;
                border-radius: 0.5rem;
                border-width: 1.5px;
                flex: 1 1 calc(50% - 0.25rem);
            }
            .chart-toggle-btn .toggle-icon {
                width: 13px;
                height: 13px;
            }
        }
        #pwa-update-banner {
            display: none;
            position: fixed;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            max-width: min(640px, calc(100vw - 2rem));
            width: calc(100% - 2rem);
            padding: 0.75rem 1rem;
            border-radius: 0.75rem;
            background-color: var(--card-bg-color);
            color: var(--text-color);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            border: 1px solid var(--secondary-accent-color);
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        #pwa-update-banner.is-visible {
            display: flex;
        }
        #pwa-update-banner button {
            flex-shrink: 0;
            padding: 0.45rem 0.9rem;
            border: none;
            border-radius: 0.5rem;
            background-color: var(--accent-color);
            color: white;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
        }
        #pwa-update-banner button:hover {
            background-color: var(--accent-dark-color);
        }