/* =========================================================
   SGTJ · CI Core Styles (v2)
   Bereinigt, konsolidiert, ohne Duplikate
   ---------------------------------------------------------
   Leitlinien:
   • Alle Farben via CSS-Custom-Properties (Theme-Tokens)
   • Keine Hardcodings (#2c7a7b etc.) – stattdessen Tokens
   • Komponenten einmalig definiert, Modifier via Klassen
   • Warnkarten vereinheitlicht (gemeinsame Basis + Stufen)
   • Swiper-Stile zentral
   ========================================================= */

/* ===============================
   THEME TOKENS · Petrol (Tag/Nacht)
   =============================== */
:root,
body.theme-day{
    /* Flächen */
    --page-bg:#F2F7F6; --surface:#FFFFFF; --tile:#EFF7F6; --tile-hdr-bg:#E7F1EF; --tile-ftr-bg:#E7F1EF;
    /* Text */
    --ink:#0D1312; --ink-sub:#475F5A; --ink-on:var(--ink); --ink-sub-on:var(--ink-sub);
    /* Linien/Separatoren */
    --border:#CFE1DB; --surf-sep-color:#CFE1DB; --tile-sep-color:#CFE1DB; --sep-thickness:2px;
    /* Interaktion / Marke */
    --btn-primary:#2C7A7B; --btn-primary-hover:#266A6B; --btn-primary-active:#205B5C; --btn-ring:rgba(44,122,123,.28);
    /* Brand (Logo) – NICHT für Fehler benutzen */
    --brand-accent:#CC2A2F; --brand-accent-hover:#B62328;
    /* Status */
    --badge-sun:#FACC15; --badge-ok:#16A34A; --badge-warn:#F59E0B; --badge-alert:#B4231E;
    /* Auswahl */
    --sel-bg:#E7F4F2; --sel-bd:#BEDFDA;
    /* Temperatur-Pills */
    --pill-warm-bg:#F6D9C6; --pill-warm-text:#8F4A0E; --pill-warm-bd:#EDBDA1;
    --pill-cool-bg:#DDF3F1; --pill-cool-text:#165E5A; --pill-cool-bd:#BEE4DF;
    /* Icon-Kreis / generische Icon-Flächen */
    --icon-circle:#0E3A35;
    /* Metrik-Farben */
    --metric-precip:#0EA5E9; --metric-wind:#8B5CF6; --metric-humidity:#10B981;
    /* Diagramme */
    --graph-temp-high:#EA580C; --graph-temp-low:#2563EB; --graph-precip:#0EA5E9; --graph-wind:#8B5CF6;
    /* Kleine destruktive Aktion */
    --close-bg:#FFEDEE; --close-bd:#FAC5C5; --close-text:#A61B1B;
    /* Wetter-Badges (Tag) */
    --badge-rain:#19B4C6; --badge-snow:#7DD3FC; --badge-wind:#2EC8A6; --badge-storm:#184E77; --badge-fog:#CBD5E1; --badge-uv:#F59E0B; --badge-frost:#3B82F6; --badge-heat:#FB923C; --badge-night:#475569;
    /* Layout */
    --space-section:clamp(16px,4vw,28px); --content-max:1200px; --gutter-x:16px; --header-h:64px;
}

body.theme-night{
    --page-bg:#141A19; --surface:#1E2725; --tile:#2A3432; --tile-hdr-bg:#2E3836; --tile-ftr-bg:#2E3836;
    --ink:#E7F0EE; --ink-sub:#B9C6C1; --ink-on:var(--ink); --ink-sub-on:var(--ink-sub);
    --border:#364843; --surf-sep-color:#364843; --tile-sep-color:#41524E; --sep-thickness:2px;
    --btn-primary:#7AD1D2; --btn-primary-hover:#6BC7C8; --btn-primary-active:#5BBDBE; --btn-ring:rgba(122,209,210,.40);
    --brand-accent:#D13A3E; --brand-accent-hover:#BA3135;
    --badge-sun:#FFD54A; --badge-ok:#22C55E; --badge-warn:#FDBA74; --badge-alert:#F87171;
    --badge-rain:#2CBECF; --badge-snow:#60A5FA; --badge-wind:#37D4B2; --badge-storm:#4C79A1; --badge-fog:#64748B; --badge-uv:#F59E0B; --badge-frost:#60A5FA; --badge-heat:#FDBA74; --badge-night:#334155;
    /* Pills (Kontrast-Nacht) */
    --pill-surface-bg:#2A333A; --pill-surface-bd:#3B444D; --pill-surface-tx:var(--ink);
    --pill-tile-bg:rgba(255,255,255,.12); --pill-tile-bd:rgba(255,255,255,.24); --pill-tile-tx:var(--ink-on);
}

/* Backend Theme Aliases (optional, behält deine Semantik) */
body.theme-backend.theme-day{ /* Alias zu day */ }
body.theme-backend.theme-night{ /* Alias zu night */ }

/* ===============================
   CORE / BASIS
   =============================== */
html,body{margin:0;padding:0}
body{
    background:var(--page-bg); color:var(--ink);
    font:400 18px/1.7 system-ui,-apple-system,"Segoe UI",Inter,Roboto,Arial;
}
h1,h2,h3{margin:0 0 8px;font-weight:800;letter-spacing:.2px}
.small{font-size:.95rem} .muted{color:var(--ink-sub)} .sep{margin:0 .35rem;opacity:.6}
.container{max-width:var(--content-max);margin:0 auto;padding:20px var(--gutter-x)}
.container--fluid{max-width:none}
.full-bleed{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
.section + .section{margin-top:var(--space-section)}

/* Header / Navigation */
.site-header{position:sticky;top:0;z-index:1000;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--border)}
.site-header__inner{max-width:var(--content-max);margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 16px}
.brand{display:inline-flex;align-items:baseline;gap:10px;text-decoration:none;color:inherit}
.brand__name{font-weight:900}
.nav{display:none}
@media (min-width:960px){.nav{display:block}}
.nav__list{display:flex;gap:16px;list-style:none;margin:0;padding:0}
.nav__link{display:inline-flex;align-items:center;padding:10px 12px;border-radius:10px;color:var(--ink);text-decoration:none;font-weight:800;border:1px solid transparent}
.nav__link:hover{background:rgba(0,0,0,.04);border-color:var(--border)}
.site-header__actions{display:inline-flex;align-items:center;gap:10px}
.nav-toggle{display:inline-flex;flex-direction:column;justify-content:center;gap:5px;width:42px;height:38px;border-radius:12px;border:1px solid var(--border);background:transparent;cursor:pointer}
@media (min-width:960px){.nav-toggle{display:none}}
.nav-toggle__bar{width:22px;height:2px;background:var(--ink)}
.mobile-nav{display:none;border-top:1px solid var(--border);background:var(--surface)}
.nav-open .mobile-nav{display:block}
.mobile-nav__list{list-style:none;margin:0;padding:10px 16px;display:grid;gap:6px}
.mobile-nav__link{display:block;padding:12px 10px;border-radius:10px;color:var(--ink);text-decoration:none;border:1px solid var(--border)}
.mobile-nav__link:hover{background:rgba(0,0,0,.04)}

/* Grid (12 Spalten) */
.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
.grid--tight{gap:12px} .grid--loose{gap:24px} .grid--rows{grid-auto-rows:1fr}
.col-1{grid-column:span 1}.col-2{grid-column:span 2}.col-3{grid-column:span 3}.col-4{grid-column:span 4}.col-5{grid-column:span 5}.col-6{grid-column:span 6}
.col-7{grid-column:span 7}.col-8{grid-column:span 8}.col-9{grid-column:span 9}.col-10{grid-column:span 10}.col-11{grid-column:span 11}.col-12{grid-column:span 12}
@media (min-width:640px){.sm\:col-6{grid-column:span 6}.sm\:col-4{grid-column:span 4}.sm\:col-12{grid-column:span 12}}
@media (min-width:960px){.md\:col-3{grid-column:span 3}.md\:col-4{grid-column:span 4}.md\:col-6{grid-column:span 6}.md\:col-8{grid-column:span 8}.md\:col-12{grid-column:span 12}}
@media (min-width:1280px){.lg\:col-3{grid-column:span 3}.lg\:col-4{grid-column:span 4}.lg\:col-6{grid-column:span 6}.lg\:col-8{grid-column:span 8}}

/* Tiles */
.tile{display:flex;flex-direction:column;overflow:hidden;border-radius:14px;height:100%;background:var(--tile);color:var(--ink);border:1px solid var(--border)}
.tile.surface{background:var(--surface)}
.tile__header{background:var(--tile-hdr-bg);padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:2px solid var(--surf-sep-color)}
.tile__body{padding:20px;display:flex;flex-direction:column;gap:16px}
.tile__footer{background:var(--tile-ftr-bg);padding:14px 20px;display:flex;justify-content:flex-end;gap:12px;border-top:2px solid var(--surf-sep-color)}
.tile__title{font-size:1.25rem;font-weight:900}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:12px 16px;border-radius:12px;border:1px solid transparent;line-height:1;font-weight:800;text-decoration:none;cursor:pointer;user-select:none;transition:background-color .12s,color .12s,border-color .12s,box-shadow .12s}
.btn:focus-visible{outline:3px solid var(--btn-ring);outline-offset:2px}
.btn--primary{background:var(--btn-primary);color:#fff;border-color:color-mix(in srgb, var(--btn-primary) 60%, #000)}
.btn--primary:hover{background:var(--btn-primary-hover)}
.btn--primary:active{background:var(--btn-primary-active)}

/* Pills */
.pill{padding:10px 12px;border-radius:10px;line-height:1.45;font-weight:700;letter-spacing:.1px;transition:background-color .15s,border-color .15s,color .15s;border:1px solid var(--border)}
.tile:not(.surface) .pill{background:var(--pill-tile-bg, rgba(255,255,255,.10));border:1px solid var(--pill-tile-bd, rgba(255,255,255,.22));color:var(--pill-tile-tx, var(--ink-on))}
.tile.surface .pill, body.theme-day .pill{background:var(--pill-surface-bg, #EEF4F7);border:1px solid var(--pill-surface-bd, var(--border));color:var(--pill-surface-tx, var(--ink))}

/* Tabelle */
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:12px 14px;text-align:left;border-bottom:1px solid var(--surf-sep-color);color:var(--ink)}
.table thead th{font-weight:800;background:#edf2f6}
body.theme-night .table thead th{background:#2a333a}

/* Brand-Badge in Hero */
.sgtj-hero__track .brand-badge{position:absolute;top:12px;left:12px;z-index:3;display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;background:color-mix(in srgb, var(--surface) 92%, transparent);border:1px solid var(--border);backdrop-filter:blur(2px)}
.sgtj-hero__track .brand-badge img{height:34px;width:auto;border-radius:6px;display:block}
.sgtj-hero__track .brand-badge span{font-weight:900;letter-spacing:.2px;color:var(--ink)}
@media (max-width:640px){.sgtj-hero__track .brand-badge{padding:6px 10px}.sgtj-hero__track .brand-badge img{height:28px}}

/* ===============================
   HERO
   =============================== */
.sgtj-hero{margin:12px 0}
.sgtj-hero__track{position:relative;overflow:hidden;border-radius:16px;background:var(--tile);border:1px solid var(--border)}
.sgtj-hero__slide{position:absolute;inset:0;opacity:0;transition:opacity .35s ease}
.sgtj-hero__slide.is-active{position:relative;opacity:1}
.sgtj-hero__bg{position:absolute;inset:0}
.sgtj-hero__bg img{width:100%;height:100%;object-fit:cover;filter:brightness(.92) contrast(1.02)}
.sgtj-hero__content{position:relative;min-height:clamp(220px,36vw,420px);display:flex;align-items:center;justify-content:var(--hero-align,flex-start);padding:clamp(16px,4vw,32px)}
.sgtj-hero__panel{max-width:680px;background:color-mix(in srgb, var(--surface) 88%, transparent);border:1px solid var(--border);border-radius:16px;padding:clamp(14px,2.5vw,22px)}
.sgtj-hero__kicker{color:var(--brand-accent);font-weight:900;margin-bottom:6px;letter-spacing:.2px}
.sgtj-hero__title{font-size:clamp(22px,3.2vw,36px);font-weight:900;margin:0 0 8px}
.sgtj-hero__cta{margin-top:10px}
.sgtj-hero__nav{position:absolute;top:50%;transform:translateY(-50%);width:42px;height:42px;border-radius:999px;border:1px solid var(--border);background:color-mix(in srgb, var(--surface) 85%, transparent);font-weight:900}
.sgtj-hero__prev{left:12px}.sgtj-hero__next{right:12px}
.sgtj-hero__dots{position:absolute;left:0;right:0;bottom:10px;display:flex;gap:8px;justify-content:center}
.sgtj-hero__dot{width:10px;height:10px;border-radius:999px;border:1px solid var(--border);background:var(--surface);opacity:.7}
.sgtj-hero__dot.is-active{opacity:1;background:var(--btn-primary);border-color:var(--btn-primary)}

/* Hero: Heute-Panel */
.hero-today .tile__body{display:grid;gap:16px;grid-template-columns:1fr auto 1fr;align-items:center}
.hero-header{text-align:left}
.hero-icon img{width:128px;height:128px;object-fit:contain;padding:8px;border-radius:16px;background:var(--icon-circle);border:1px solid var(--tile-sep-color);box-shadow:0 1px 0 rgba(0,0,0,.04)}
.hero-stats{display:grid;gap:8px}
@media (max-width:640px){
    .hero-today .tile__body{grid-template-columns:1fr;gap:12px}
    .hero-header{text-align:center}
    .hero-icon{justify-self:center}
    .hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
    .hero-stats .kv-row{border:1px solid var(--tile-sep-color);background:var(--tile);border-radius:12px;padding:10px 8px;display:flex;flex-direction:column;align-items:center;gap:4px}
    .hero-stats .kv-label{font-size:.85rem;color:var(--ink-sub)}
    .hero-stats .kv-value{font-weight:800}
}

/* ===============================
   KEY-VALUE UTILITIES
   =============================== */
.kv-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:baseline}
.kv-row.kv--stack{grid-template-columns:1fr}
.kv-row.kv--wrap{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.kv-row.kv--top{align-items:start}
.kv-row.kv--equal{grid-template-columns:1fr 1fr}
.kv-row.kv--compact .kv-label{opacity:.9}
.kv-row.kv--compact .kv-value{font-weight:700}
.kv-label{word-break:normal;overflow-wrap:anywhere;hyphens:auto;text-wrap:balance}
.kv-value{white-space:nowrap}
.kv-value.kv-value--wrap{white-space:normal}

/* ===============================
   DAYBAR (Top) + Pills
   =============================== */
.wx-daybar-top{position:sticky;top:var(--wx-menu-h, var(--header-h));z-index:1050;background:var(--surface);border-bottom:2px solid var(--surf-sep-color);padding:12px max(env(safe-area-inset-right),16px) 12px max(env(safe-area-inset-left),16px)}
@media (min-width:901px){.wx-daybar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:12px;align-items:stretch;overflow:visible}}
@media (max-width:900px){
    .wx-daybar-grid{display:grid;grid-auto-flow:column;grid-auto-columns:clamp(120px,32vw,180px);gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;padding-bottom:6px;scroll-snap-type:x proximity}
    .wx-daybar-grid::-webkit-scrollbar{height:6px}
    .wx-daybar-grid::-webkit-scrollbar-thumb{background:var(--surf-sep-color);border-radius:999px}
}
.wx-pill{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-items:center;justify-items:center;gap:6px 10px;min-height:78px;padding:12px 14px;border-radius:18px;background:var(--tile);color:var(--ink-on);border:2px solid var(--tile-sep-color);transition:border-color .12s ease, background .12s ease, transform .12s ease}
.wx-pill:hover{transform:translateY(-1px)}
.wx-pill.is-active{border-color:var(--btn-primary);background:color-mix(in srgb, var(--btn-primary) 16%, transparent)}
.pill__dow{grid-column:1 / -1;font-weight:800;letter-spacing:.2px}
.pill__icon{width:36px;height:36px;background:var(--icon-circle);border:1px solid var(--border);border-radius:12px;padding:4px;box-sizing:content-box}
.pill__t{font-weight:800}

/* ===============================
   BADGES · WETTER-TYPEN
   =============================== */
.badge--rain{background:var(--badge-rain);color:#fff}
.badge--snow{background:var(--badge-snow);color:#1A1A1A}
.badge--wind{background:var(--badge-wind);color:#0F1A14}
.badge--storm{background:var(--badge-storm);color:#fff}
.badge--fog{background:var(--badge-fog);color:#1A1A1A}
.badge--uv{background:var(--badge-uv);color:#1A1A1A}
.badge--frost{background:var(--badge-frost);color:#fff}
.badge--heat{background:var(--badge-heat);color:#1A1A1A}
.badge--night{background:var(--badge-night);color:#fff}
.badge--outline{background:transparent!important;color:inherit;border:2px solid currentColor}

/* ===============================
   SIDE DAYBAR (rechte Spalte)
   =============================== */
.wx-daybar{position:sticky;top:16px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 32px);overflow:auto}
.wx-daybar__item{display:grid;grid-template-rows:auto auto auto;place-items:center;width:100%;padding:10px 8px;border-radius:16px;background:var(--tile);color:var(--ink-on);border:2px solid var(--tile-sep-color);transition:transform .12s ease,border-color .12s ease,background .12s ease}
.wx-daybar__item:hover{transform:translateY(-1px)}
.wx-daybar__item.is-active{border-color:var(--btn-primary);background:color-mix(in srgb, var(--btn-primary) 16%, transparent)}
.wx-daybar__icon img{width:36px;height:36px}
.wx-daybar__temps{display:flex;gap:6px;font-weight:800}
.wx-daybar__temps .tmin{opacity:.7}

/* ===============================
   „WEITERE ORTE“ (Section) – konsolidiert
   =============================== */
#weitere-orte{margin-top:24px}
#weitere-orte .tile__header{margin-bottom:0}
#weitere-orte .tile__body{padding-top:16px}
#weitere-orte .city-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px;align-items:stretch}
@media (min-width:992px){#weitere-orte .city-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
#weitere-orte .city-card{position:relative;border-radius:16px;padding:14px 16px;border:1px solid var(--surf-sep-color);background:var(--tile)}
#weitere-orte .city-card__row{display:flex;align-items:center;justify-content:space-between;gap:12px}
#weitere-orte .city-card__left{display:flex;align-items:center;gap:12px;min-width:0}
#weitere-orte .city-card__icon{width:40px;height:40px;flex:0 0 40px;border-radius:10px;border:1px solid var(--border);background:var(--surface);object-fit:contain}
#weitere-orte .city-card__name{margin:0;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#weitere-orte .city-card__minmax{color:var(--ink-sub);font-weight:600}
#weitere-orte .city-card__temp{font-weight:900;font-size:26px;line-height:1;text-align:right;min-width:2.5ch}
#weitere-orte .city-card__remove{position:absolute;top:8px;right:8px;width:28px;height:24px;border:0;border-radius:999px;background:#eee;color:#333}
#weitere-orte .city-card.city-card--add{display:flex;align-items:center;justify-content:center}

/* ===============================
   MAP (Mapbox/GL) + Legend
   =============================== */
#map{width:100%;height:500px;max-height:500px;background:#e9ecef}
#mapContainer{height:600px;width:100%}
.mapboxgl-marker{z-index:10}
.timeline{display:flex;gap:8px;align-items:center;justify-content:center;padding:10px 12px;background:#f6f7f9;border-top:1px solid #e5e7eb}
.ticks{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.tick{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-variant-numeric:tabular-nums}
.tick.active{background:#111;color:#fff;border-color:#111}
.hud{position:absolute;right:10px;top:10px;background:#111;color:#fff;padding:6px 10px;border-radius:8px;font-size:12px;box-shadow:0 2px 6px rgba(0,0,0,.15);z-index:1000}

/* Marker Flag */
.flag-marker{position:relative;width:0;height:0;transform:translate(-50%, -100%);pointer-events:auto}
.flag-marker::before{content:attr(data-label);position:absolute;left:6px;top:-18px;background:var(--flag, var(--btn-primary));color:var(--flag-text, #fff);font:600 11px/18px system-ui,-apple-system,Segoe UI,Roboto,Arial;padding:0 8px;border-radius:4px 4px 4px 0;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.flag-marker::after{content:"";position:absolute;left:0;top:-2px;width:2px;height:22px;background:#333;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
.flag-tip{position:absolute;left:6px;top:-1px;width:0;height:0;border-left:6px solid var(--flag, var(--btn-primary));border-top:6px solid transparent;border-bottom:6px solid transparent}

/* Legend (hell) + Modifier .map-legend--dark */
.map-legend{position:absolute;right:10px;bottom:10px;z-index:3;background:rgba(255,255,255,.9);backdrop-filter:blur(4px);border:1px solid rgba(0,0,0,.08);border-radius:8px;padding:8px 10px;max-width:50%;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.map-legend h6{margin:0 0 6px 0;font:700 12px/1 system-ui;color:#111}
.map-legend ul{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.map-legend li{display:flex;align-items:center;gap:8px;font:500 12px/1.2 system-ui;color:#111}
.map-legend .swatch{width:14px;height:14px;border-radius:3px;border:1px solid rgba(0,0,0,.15)}
.map-legend--dark{background:rgba(17,17,17,.85);color:#fff;border-color:rgba(255,255,255,.15)}
.map-legend--dark h6,.map-legend--dark li{color:#fff}
.map-legend--dark .swatch{border-color:rgba(255,255,255,.35)}

/* Linke Legendebox mit Checkboxes */
.map-legend-left{position:absolute;z-index:5;background:rgba(255,255,255,.92);backdrop-filter:blur(4px);border:1px solid rgba(0,0,0,.08);border-radius:8px;padding:10px 12px;max-width:280px;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.map-legend-left h6{margin:0 0 8px 0;font:700 12px/1 system-ui;color:#111}
.map-legend-left ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.map-legend-left li{display:flex;align-items:center;gap:8px}
.map-legend-left .swatch{width:14px;height:14px;border-radius:3px;border:1px solid rgba(0,0,0,.15);flex:0 0 14px}
.map-legend-left label{display:flex;align-items:center;gap:8px;font:500 12px/1.2 system-ui;color:#111;cursor:pointer}
.map-legend-left input[type="checkbox"]{margin:0}

/* Suche/Inputs */
#ort-suche{border-radius:12px;border:1px solid var(--border);background:var(--tile);padding:.5rem .75rem;font-size:.95rem;color:var(--ink);box-shadow:none}
#ort-suche:focus{border-color:var(--btn-primary);outline:none;background:#fff}
#ort-clear{border-radius:50%;width:36px;height:36px;padding:0;line-height:1;font-size:1.2rem}

/* ===============================
   WARNUNGEN – Vereinheitlicht
   Basis: .warncard (neutrale Karte) + .wx-card/.warn-tile als Variationen
   =============================== */
/* Stufen → --level */
.stufe-1,.awl-1,.warn-1,.awl--stufe-1{--level:#6bbf7b}
.stufe-2,.awl-2,.warn-2,.awl--stufe-2{--level:#d6a235}
.stufe-3,.awl-3,.warn-3,.awl--stufe-3{--level:#d9711d}
.stufe-4,.awl-4,.warn-4,.awl--stufe-4{--level:#c83d3d}

/* Universelle Card mit Level-Bord links */
.warncard{position:relative;border-radius:16px;padding:14px 16px 16px;border:1px solid var(--border);background:var(--surface);overflow:hidden}
.warncard::before{content:"";position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--level, var(--border))}
.warncard__head{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;margin-bottom:10px}
.warncard__badge{--s:40px;width:var(--s);height:var(--s);border-radius:50%;display:grid;place-items:center;background:var(--tile);border:1px solid var(--border)}
.warncard__badge .weather-icon{font-size:20px;color:var(--ink)}
.warncard__title{display:grid;gap:2px;min-width:0}
.warncard__region{font-weight:700;color:var(--ink)}
.warncard__stamp{font-size:12px;color:var(--ink-sub)}
.warncard__chip{font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;white-space:nowrap;border:1px solid color-mix(in oklab, var(--level) 60%, var(--border));background:color-mix(in oklab, var(--level) 14%, transparent)}
.warncard__meta{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding-top:8px;border-top:1px solid var(--tile-sep-color);margin-bottom:8px}
@media (max-width:576px){.warncard__meta{grid-template-columns:1fr}}
.warncard__meta .k{font-size:12px;color:var(--ink-sub);display:block}
.warncard__meta .v{color:var(--ink);font-weight:600;display:block}
.warncard__desc{font-size:14px;line-height:1.5;color:var(--ink);margin-top:8px}

/* Variante: wx-card mit farbigem Kopf (Level) */
.wx-card{border-radius:16px;overflow:hidden;background:var(--surface);box-shadow:0 2px 4px rgba(0,0,0,.06);border:1px solid var(--border);display:flex;flex-direction:column}
.wx-card__head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:14px 16px;color:#fff;background:var(--level);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}
.wx-card__icon{width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.25);display:grid;place-items:center}
.wx-card__icon .weather-icon{font-size:20px;color:#fff}
.wx-card__title{display:grid;gap:3px;min-width:0}
.wx-card__region{font-weight:700;color:#fff}
.wx-card__stamp{font-size:12px;color:rgba(255,255,255,.9)}
.wx-card__chip{font-size:12px;font-weight:600;background:rgba(255,255,255,.2);border-radius:999px;padding:4px 10px;color:#fff}
.wx-card__body{padding:16px;display:flex;flex-direction:column}
.wx-card__meta{display:grid;grid-template-columns:1fr 1fr;gap:6px 20px;margin-bottom:8px}
@media (max-width:576px){.wx-card__meta{grid-template-columns:1fr}}
.wx-card__meta .k{font-size:12px;color:var(--ink-sub);display:block}
.wx-card__meta .v{font-weight:600;color:var(--ink);display:block}
.wx-card__desc{font-size:14px;line-height:1.5;color:var(--ink);margin-top:6px}
.wx-grid{display:flex!important;flex-wrap:wrap!important;margin:-12px!important}
.wx-grid>.col{padding:12px!important;width:100%}
@media(min-width:768px){.wx-grid.row-cols-md-2>.col{width:50%}}
@media(min-width:992px){.wx-grid.row-cols-lg-3>.col{width:33.3333%}}

/* Variante: warn-tile mit farbigem Header */
.warn-tile{border-radius:14px;overflow:hidden;border:1px solid var(--border);background:var(--surface);box-shadow:0 2px 4px rgba(0,0,0,.06)}
.warn-tile__header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:.75rem 1rem;color:#fff;background:var(--warn-color, var(--level));border-bottom:1px solid var(--tile-sep-color)}
.warn-tile .tile__title{color:#fff;font-weight:700}
.warn-tile .tile__subtitle{color:rgba(255,255,255,.92)}
.warn-tile__level{border:1px solid color-mix(in oklab, var(--warn-color, var(--level)) 60%, #fff);background:color-mix(in oklab, var(--warn-color, var(--level)) 18%, #fff);color:#1f2937;padding:.25rem .5rem;font-size:.75rem;line-height:1;border-radius:8px}

/* ===============================
   Swiper – zentral & ruhig
   =============================== */
.swiper{position:relative;padding-bottom:36px}
.swiper-button-prev,.swiper-button-next{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:var(--surface);border:1px solid var(--border);color:var(--ink-sub);z-index:5}
.swiper-button-prev:hover,.swiper-button-next:hover{color:var(--ink)}
.swiper .swiper-pagination-bullets{bottom:8px}

/* Controls in Karten mit Footer-Leiste */
.swiper-controls{display:flex;align-items:center;justify-content:center;gap:12px;padding:.5rem .75rem .75rem;border-top:1px solid var(--tile-sep-color)}
.nav-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--ink-sub);font-size:20px}
.nav-btn:hover{color:var(--ink)}
.swiper-pagination{position:static!important}
.swiper-pagination-bullets .swiper-pagination-bullet{width:8px;height:8px;margin:0 4px;opacity:.5}
.swiper-pagination-bullets .swiper-pagination-bullet-active{opacity:1}

/* ===============================
   Utility: 1/2/3-Spalten-Grid (wx-three)
   =============================== */
.wx-three{display:grid;grid-template-columns:1fr;gap:var(--gap,16px)}
@media (min-width:768px){.wx-three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:992px){.wx-three{grid-template-columns:repeat(3,minmax(0,1fr))}}
.wx-three>*{min-width:0}

/* ===============================
   Kleinere Feinheiten
   =============================== */
.page-home .site-header__inner{padding:14px 16px}
.page-home .brand img{height:56px;width:auto;border-radius:8px}
.page-home .brand__name{font-weight:900;font-size:1.15rem;letter-spacing:.2px}
@media (max-width:640px){.page-home .brand img{height:44px}}

/* Theme-Toggle: keine harte Farbe, erbt via .btn */
#themeToggle{color:inherit}

/* Input/Widget-Hiding (Mapbox time/settings) */
div[class*="settings-"]{display:none!important}
div[class*="timeRange-"]{display:none!important}

/* Ende */

.sgtj-hero .sgtj-hero__panel .btn.btn--primary.sgtj-hero__cta{
    color:#000 !important;           /* überstimmt .btn--primary (weiß) */
}
.sgtj-hero .sgtj-hero__panel .btn.btn--primary.sgtj-hero__cta:hover{
    color:#000 !important;
}
.sgtj-hero .sgtj-hero__panel .btn.btn--primary.sgtj-hero__cta:focus-visible{
    outline-color: var(--btn-ring);
}

.nav__dropdown {
    position: relative;
}

.nav__dropdown-toggle {
    cursor: pointer;
}

.nav__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 8px color-mix(in srgb, var(--shadow) 30%, transparent);
    display: none;
    flex-direction: column;
    z-index: 1000;
    padding: 8px 0;
}

.nav__dropdown-menu li {
    list-style: none;
}

.nav__dropdown-menu .nav__link {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
}

.nav__dropdown-menu .nav__link:hover {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.nav__divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Hover öffnen */
.nav__dropdown:hover > .nav__dropdown-menu {
    display: flex;
}

.nav__dropdown { position: relative; }
.nav__dropdown-toggle { cursor: pointer; }

/* Menü */
.nav__dropdown-menu{
    position:absolute; top:100%; left:0;
    min-width:200px; display:none; flex-direction:column;
    background:var(--surface); border:1px solid var(--border);
    border-radius:10px; box-shadow:0 4px 8px color-mix(in srgb, var(--shadow) 30%, transparent);
    z-index:1000; padding:8px 0;
}
.nav__dropdown:hover > .nav__dropdown-menu { display:flex; }

.nav__dropdown-menu .nav__link{ display:block; padding:8px 14px; }
.nav__dropdown-menu .nav__link:hover{
    background:color-mix(in srgb, var(--accent) 10%, transparent);
}
.nav__divider{ height:1px; background:var(--border); margin:4px 0; }

/* Optional: Menü rechtsbündig öffnen */
.nav__dropdown--right > .nav__dropdown-menu { right:0; left:auto; }


/* Canvas-Wrapper, nutzt vorhandene Theme-Variablen */
.tile--canvas {
    background: var(--tile);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tile--canvas canvas {
    background: var(--surface);
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}


@media(max-width: 768px) {
    #weatherCanvas {
        display: none !important;
    }
    .weather-mobile-compact {
        display: block;
    }
}
@media(min-width: 769px){
    .weather-mobile-compact {
        display: none;
    }
}

.weather-mobile-compact {
    padding: 10px;
}

.mw-row {
    display: grid;
    grid-template-columns: 50px 40px 40px 50px 50px 60px 50px;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.mw-icon {
    width: 32px;
    height: 32px;
}
.mw-hour { font-weight: 600; }
.mw-temp { font-weight: 600; }


.mw-row {
    display: grid;
    grid-template-columns: 50px 40px 50px 50px 50px 60px 50px;
    gap: 6px;
    align-items: center;
    padding: 8px 4px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.mw-icon {
    width: 32px;
    height: 32px;
}

@media (min-width: 769px) {
    #mobileWeatherOutput {
        display: none;
    }
}

@media (max-width: 768px) {
    .weather-canvas-scroll {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    #weatherCanvas {
        width: auto !important;
        height: auto !important;
        min-width: 1700px; /* oder 1800px – je nach Layout */
    }
}


@media (max-width: 768px) {
    #desktopWeatherWrapper {
        display: none;
    }

    #mobileWeatherOutput {
        display: block;
    }
}

@media (min-width: 769px) {
    #mobileWeatherOutput {
        display: none;
    }
}

#mobileWeatherOutput {
    padding: 0px;
}

.mw-hour-block {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: 0 0 6px rgba(0,0,0,0.08);
}

.mw-hour-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.mw-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    border-bottom: 1px solid #eaeaea;
}

.mw-row:last-child {
    border-bottom: none;
}

#mobileWeatherOutput {
    padding: 0px;
}

.mw-hour-block {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.mw-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mw-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mw-time {
    font-size: 15px;
    font-weight: 600;
}

.mw-temp {
    font-size: 16px;
    font-weight: bold;
}

.mw-icon {
    width: 36px;
    height: 36px;
}

.mw-head-right {
    display: flex;
    gap: 12px;
}

.mw-mini {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.mw-body {
    display: none;
    margin-top: 10px;
}

.mw-body.open {
    display: block;
}

.mw-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.mw-row:last-child {
    border-bottom: none;
}
.mw-head-right {
    display: flex;
    gap: 18px;
    text-align: center;
}

.mw-mini-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mw-mini-value {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    gap: 3px;
    align-items: center;
}

.mw-mini-label {
    font-size: 11px;
    font-weight: bold;
    opacity: 0.8;
    margin-top: -2px;
}

.mw-mini-col {
    padding: 6px;
    border-radius: 8px;
    color: #000;
    min-width: 80px;
    margin-right: 4px;
}

.mw-head-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.mw-temp-icon-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mw-temp {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.mw-icon {
    width: 36px;
    height: 36px;
    margin-top: 2px;
}

.mw-rainspot-row canvas {
    border-radius: 6px;
}


.mobile-hour-card {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    color: var(--color-text);
}

.mobile-hour-card .time {
    color: var(--color-text-muted);
}

.mobile-hour-card .label {
    color: var(--color-text-muted);
}

.mobile-hour-card .value {
    color: var(--color-text);
}

/* Icons */
.mobile-hour-card img,
.mobile-hour-card svg {
    filter: var(--icon-filter, none);
}


/* Wrapper für jede Stunde */
.mw-hour-block {
    background: #a6c9d9;
    border-radius: 12px;
    margin: 12px 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}
.mw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
}
.mw-head-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.mw-time {
    font-size: 14px;
    opacity: 0.65;
    font-weight: 600;
}
.mw-temp-icon-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mw-temp {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}
.mw-icon {
    width: 32px;
    height: 32px;
    margin-top: 4px;
}
.mw-mini-col {
    min-width: 80px;
    padding: 6px 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.mw-mini-value {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
.mw-mini-label {
    font-size: 12px;
    margin-top: 2px;
    opacity: 0.85;
}
.mw-body {
    display: none;
    padding: 12px 16px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: var(--surface-1, #141414);
}
.mw-body.open {
    display: block;
}
.mw-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}
.mw-row span:first-child {
    opacity: 0.75;
}
.mw-rainspot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.mw-rainspot {
    border-radius: 6px;
    flex-shrink: 0;
}
.theme-weather .mw-hour-block {
    background: var(--tile);
}

.theme-weather .mw-body {
    background: var(--tile-alt);
}

.theme-weather .mw-head {
    background: var(--tile);
}

.theme-weather .mw-row {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mw-winddir-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

}
:root {
    --wind-arrow-color: #000000;
}

body.theme-night {
    --wind-arrow-color: #ddd;
}


.mw-windarrow {
    background: transparent;
    color: var(--wind-arrow-color);
}
.mw-body {
    background: var(--surface-bg);
    /*color: var(--surface-fg);*/
    border-radius: 8px;
    padding: 14px;
}
