/* =============================================================================
 * css/start_d7.css – Startseite Desktop nach Entwurf D7 (27.11.2026)
 * Referenz: .pw/berg_tal/referenz_startseite_desktop_D7.png
 * Gilt nur unter .dashboard-wrapper.d7 und ab 601 px (Handy ≤ 600 px unverändert, dort ist
 * .db-layout ausgeblendet). Das Handy-Modal (#card-modal-content) liegt außerhalb und bleibt gleich.
 *   601–1.099 px: einspaltig (links Panel + Berg & Tal, darunter die rechte Spalte)
 * Breite wie die übrigen Seiten (.dashboard-wrapper: --max-width 1100 px, 29.11.2026; vorher 1.336 px).
 *   ab 1.100 px:  zwei Spalten, rechts fest 320 px, Abstand 16 px, links der Rest (bei 1.068 px
 *                 Inhaltsbreite 732 px; 29.11.2026, vorher 864 : 448 → 688/357), beide enden auf derselben Linie –
 *                 die rechte Spalte bestimmt die Höhe, Berg & Tal füllt links den Rest
 *                 (SVG-Höhe aus dem freien Platz, js/berg_tal.js data-bt-hoehe="verfuegbar").
 * Ruhige Gestaltung: einheitlicher Rahmen, keine farbigen Ränder/Namen, Farbe nur in den Symbolen.
 * ============================================================================= */

.d7 {
    --d7-kachel: linear-gradient(180deg, #1a2540, #141d32);   /* 29.11.2026 heller: Karte ↔ Seite 1,12 → 1,20 */
    --d7-rand: rgba(148, 163, 184, .28);   /* 29.11.2026: .16 → .28, Rand ↔ Karte 1,31 → 1,67 */
    --d7-rand-aktiv: rgba(96, 165, 250, .55);
    --d7-name: #a8b6c9;
    --d7-wert: #f1f5f9;
    --d7-wert-2: #e2e8f0;
    --d7-einheit: #a0b3ca;   /* 29.11.2026: #7c8aa3 (4,9:1) → ≥ 7:1, „Verlauf 48 h“, Einheiten */
    --d7-titel: #93c5fd;
    --d7-zeile: #cbd5e1;
    --d7-live: #34d399;
    --d7-abstand: 24px;
    --d7-panel-h: 350px;      /* feste Höhe aller 21 Detail-Panels (Berg & Tal springt nicht) */
}
html.light .d7 {
    --d7-kachel: var(--bg-card-solid);
    --d7-rand: rgba(100, 116, 139, .25);
    --d7-rand-aktiv: rgba(37, 99, 235, .6);
    --d7-name: #64748b;
    --d7-wert: #0f172a;
    --d7-wert-2: #1e293b;
    --d7-einheit: #64748b;
    --d7-titel: #1d4ed8;
    --d7-zeile: #334155;
    --d7-live: #059669;
}

/* Handy/Tablet Dark (≤ 768 px, 30.11.2026): Kacheln und Pop-ups nutzen hier --bg-card (heller Verlauf, Box ↔ Seite
   bis 1,50) → dezent: flacher Verlauf, Box ↔ Seite 1,09–1,14, Rand grau 1,34, Texte ≥ 5,6:1
   (a0f9887 hatte die Desktop-Werte 1,15–1,27 / 1,67 – am Handy zu intensiv).
   --bg-card wird hier nur als background/background-image verwendet → immer als Verlauf schreiben, auch einfarbig.
   Desktop und Light unverändert. */
@media (max-width: 768px) {
    html:not(.light) .d7,
    html:not(.light) .card-modal-overlay {
        --bg-card: linear-gradient(180deg, #141c32, #11182b);
        --d7-rand: rgba(148, 163, 184, .17);   /* auch im Pop-up (liegt außerhalb .d7) */
    }
    html:not(.light) .d7 .mobile-btn,
    html:not(.light) .card-modal-content .db-card { border-color: var(--d7-rand); }
}

@media (min-width: 601px) {

/* ── Raster ─────────────────────────────────────────────────────────────── */
.d7 .db-layout { grid-template-columns: minmax(0, 1fr); gap: var(--d7-abstand); align-items: start; }
.d7 .db-main { display: flex; flex-direction: column; gap: var(--d7-abstand); }

/* ── Detail-Panel kompakt (Kopf + Diagramm), feste Höhe ─────────────────── */
.d7 .d7-panelbereich { position: relative; height: var(--d7-panel-h); flex: none; }
.d7 .d7-panelbereich .db-panel.active { height: 100%; }
.d7 .d7-panelbereich .db-card {
    height: 100%;
    box-sizing: border-box;
    padding: 14px 18px 12px;                 /* Quellzeile steht im Fluss unter dem Diagramm (29.11.2026) */
    background: var(--d7-kachel);
    border: 1px solid var(--d7-rand);
    border-radius: 14px;
    overflow: hidden;
    align-content: start;
}
/* Zusatzteile (Kompass, Föhn-Details, UV-Rechner …) nur im Modal „Details ⤢“. Ausgenommen die Info-Popups
   (.ipu-overlay/.ipu-popup, öffnen per ⓘ; Föhn und UV liegen auf Kachelebene, seit 29.11.2026 auch im Panel) */
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap) > :not(.db-card-head):not(.db-card-extremes):not(.db-chart-wrap):not(.ipu-overlay):not(.ipu-popup) {
    display: none !important;
}
/* Kopfzeile: Name · Wert groß · Uhrzeit – einzeilig (feste Kopfhöhe), Unterzeile notfalls mit „…“ */
.d7 .d7-panelbereich .db-card > .db-card-head { min-width: 0; }
.d7 .d7-panelbereich .db-card-head > div:first-child { display: flex; align-items: baseline; gap: 14px; flex-wrap: nowrap; min-width: 0; }
.d7 .d7-panelbereich .db-card-label {
    font-size: 13px; font-weight: 600; letter-spacing: .05em; color: var(--d7-titel); margin: 0;
}
.d7 .d7-panelbereich .db-card-label svg,
.d7 .d7-panelbereich .db-card-icon { display: none; }
.d7 .d7-panelbereich .db-card-val { font-size: var(--kachel-wert); font-weight: 800; line-height: 1; color: var(--d7-wert); }
.d7 .d7-panelbereich .db-card-unit { font-size: 0.5em; color: var(--d7-titel); }
.d7 .d7-panelbereich .db-card-sub {
    font-size: 12px; color: var(--d7-name); margin: 0; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.d7 .d7-panelbereich .db-card-label, .d7 .d7-panelbereich .db-card-val { flex: none; }
/* Unterzeile (Messhöhe/Zustand · Uhrzeit) in die Zeile „Verlauf 48 h“ (29.11.2026): in Zeile 1 wurde sie neben
   den Max/Min-Chips abgeschnitten (12 von 22 Panels). Gilt für alle Panels mit Diagramm und Unterzeile:
   Kopf und dessen erste Zeile per display:contents auflösen → Name, Wert, Unterzeile werden Grid-Elemente der Karte;
   die Unterzeile liegt in der Diagramm-Zeile über „Verlauf 48 h“ (dessen Text bleibt unsichtbar als Platzhalter
   → gleiche Höhen, Diagramm und Berg & Tal springen nicht). Uhrzeit läuft weiter über .live-messzeit (js/dashboard.js).
   Das Pop-up (Klon in #card-modal-content) liegt außerhalb von .d7-panelbereich und bleibt unverändert. */
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) {
    grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 14px;
    grid-template-rows: 3.1rem minmax(0, 1fr);         /* Kopf = Höhe der Kennzahl-Boxen → Diagramme springen nicht */
    align-items: center; align-content: stretch;
}
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) > .db-card-head,
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) > .db-card-head > div:first-child { display: contents; }
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) .db-card-label { grid-column: 1; grid-row: 1; }
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) .db-card-val   { grid-column: 2; grid-row: 1; }
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) > .db-card-extremes { grid-column: 4; grid-row: 1; }
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) > .db-chart-wrap   { grid-column: 1 / -1; grid-row: 2; align-self: stretch; }
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) .db-card-sub {
    grid-column: 1 / -1; grid-row: 2; align-self: start; justify-self: start; position: relative; z-index: 1;
    margin-top: 8px;                                   /* = margin-top der .db-chart-wrap → gleiche Zeile wie „Verlauf 48 h“ */
    font-size: 12px; font-weight: 400; line-height: inherit; color: var(--d7-einheit);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52%;   /* rechts daneben die Legende */
}
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) .db-card-sub::before { content: 'Verlauf 48 h · '; }
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) .db-card-sub:empty::before { content: 'Verlauf 48 h'; }
/* Schneehöhe: Diagramm zeigt die letzten 60 Tage (Handmessung, js/dashboard.js renderSchneeChart) */
.d7 .d7-panelbereich #card-schnee .db-card-sub::before { content: 'Verlauf 60 Tage'; }
.d7 .d7-panelbereich .db-card:has(> .db-chart-wrap):has(> .db-card-head .db-card-sub) .db-chart-title::before { visibility: hidden; }
/* Wind (29.11.2026): gleiche Aufteilung – „Mittel · Böe“ (.wind-mittel-zeile) lief in Zeile 1 unter den Chip
   „Richtung 24h“; jetzt „Verlauf 48 h · Mittel 4 · Böe 9 km/h (10 min)“ in der Diagramm-Zeile, rechts daneben die
   Legende (.db-chart-legende in .db-chart-header). Fußzeile (Messhöhe/Quelle) wie bei allen Kacheln (.db-chart-fuss). */
.d7 .d7-panelbereich #card-wind { grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 14px; grid-template-rows: 3.1rem minmax(0, 1fr); align-items: center; align-content: stretch; }
.d7 .d7-panelbereich #card-wind > .db-card-head,
.d7 .d7-panelbereich #card-wind .wind-kopf { display: contents; }
.d7 .d7-panelbereich #card-wind .db-card-label { grid-column: 1; grid-row: 1; }
.d7 .d7-panelbereich #card-wind .db-card-val   { grid-column: 2; grid-row: 1; }
.d7 .d7-panelbereich #card-wind > .db-card-extremes { grid-column: 4; grid-row: 1; }
.d7 .d7-panelbereich #card-wind > .db-chart-wrap   { grid-column: 1 / -1; grid-row: 2; align-self: stretch; }
.d7 .d7-panelbereich #card-wind .wind-mittel-zeile {
    grid-column: 1 / -1; grid-row: 2; align-self: start; justify-self: start; position: relative; z-index: 1;
    margin-top: 8px; font-size: 12px; font-weight: 400; color: var(--d7-einheit);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52%;
}
.d7 .d7-panelbereich #card-wind .wind-mittel-zeile::before { content: 'Verlauf 48 h · '; }
.d7 .d7-panelbereich #card-wind .db-chart-title::before { visibility: hidden; }
.d7 .d7-panelbereich .db-chart-legende { font-size: 12px; color: var(--d7-einheit); }
/* Kennzahl-Boxen rechts im Kopf (Aufbau Label / Wert + Zusatz: css/dashboard.css .db-extreme) */
.d7 .d7-panelbereich .db-card > .db-card-extremes { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.d7 .d7-panelbereich .db-card > .db-card-extremes .db-extreme { flex: none; }
/* Diagramm: „Verlauf 48 h“ statt langer Titel */
.d7 .d7-panelbereich .db-chart-wrap { margin-top: 8px; padding-top: 0; border-top: 0; }
.d7 .d7-panelbereich .db-chart-header { margin: 0 0 2px; }
.d7 .d7-panelbereich .db-chart-title { font-size: 0; }
.d7 .d7-panelbereich .db-chart-title::before { content: 'Verlauf 48 h'; font-size: 12px; font-weight: 400; color: var(--d7-einheit); }
/* Diagramm-Spalte (Flex): Kopf mit Legende · Diagramm füllt den Rest · Fußzeile unten am Panelrand.
   Keine feste Diagrammhöhe mehr: der Behälter .db-chart-flaeche wächst (flex: 1), Chart.js
   (maintainAspectRatio: false) zeichnet in dessen Größe → bei allen Panels gleich hoch, kein Leerraum unten.
   Canvas absolut im Behälter, damit seine eigene Höhe den Behälter nicht aufbläht. */
.d7 .d7-panelbereich .db-chart-wrap { display: flex; flex-direction: column; position: relative; }
/* „Lade Daten…“ über dem Diagrammbereich statt darüber im Fluss → Diagrammhöhe springt beim Laden nicht */
.d7 .d7-panelbereich .db-chart-loading { position: absolute; left: 0; right: 0; top: 40%; margin: 0; z-index: 1; }
.d7 .d7-panelbereich .db-chart-flaeche { flex: 1 1 0; min-height: 0; }
.d7 .d7-panelbereich .db-chart-flaeche > canvas,
.d7 .d7-panelbereich #chart-foehn .db-chart-flaeche > canvas {   /* ID: schlägt #chart-foehn canvas { height: 290px } aus dashboard.css */
    position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-height: none;
}
.d7 .d7-panelbereich .db-chart-wrap > .db-chart-fuss { padding-top: 0.25rem; }
/* Sonne/Mond kompakt: Kopf über die ganze Breite, darunter Bogen links und Info-Kästen gestapelt rechts.
   Bogen-Höhe = freier Platz im Panel (js/start_d7.js setzt data-max-hoehe am Canvas). */
.d7 .d7-panelbereich .d7-himmelpanel {
    display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(170px, 28%);
    grid-template-rows: auto auto; column-gap: 16px; align-items: start;   /* start: Canvas-Oberkante unabhängig von der eigenen Höhe */
}
.d7 .d7-panelbereich .d7-hp-kopf { grid-column: 1 / -1; margin-bottom: 10px !important; }
.d7 .d7-panelbereich .d7-hp-info {
    grid-column: 2; grid-row: 2; align-self: center; margin: 0 !important;
    grid-template-columns: 1fr !important; gap: 8px !important;
}
.d7 .d7-panelbereich .d7-himmelpanel > canvas { grid-column: 1; grid-row: 2; width: 100% !important; display: block; }
/* Aurora kompakt: Info-Kästen rechts neben dem Kopf, Diagramm darunter auf den freien Platz,
   Quellenzeile (GFZ/NOAA, Pflichtangabe) mittig unten im Panel */
.d7 .d7-panelbereich .d7-kppanel {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center;
}
.d7 .d7-panelbereich .d7-kp-kopf { grid-column: 1; grid-row: 1; margin-bottom: 8px !important; }
.d7 .d7-panelbereich .d7-kp-info {
    grid-column: 2; grid-row: 1; margin: 0 0 8px !important;
    grid-template-columns: repeat(2, minmax(120px, auto)) !important; gap: 8px !important;
}
.d7 .d7-panelbereich .d7-kp-info > div { padding: 7px 12px !important; }
.d7 .d7-panelbereich .d7-kp-chart { grid-column: 1 / -1; }
.d7 .d7-panelbereich .d7-kp-chart canvas { width: 100% !important; }
.d7 .d7-panelbereich .d7-kp-quelle {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0 !important; white-space: nowrap;
}

/* ── Berg & Tal ──────────────────────────────────────────────────────────── */
.d7 .bt-karte {
    margin-top: 0; padding: 16px 18px 18px;
    background: var(--d7-kachel); border: 1px solid var(--d7-rand); border-radius: 14px;
    overflow: hidden;   /* randlose Silhouette: runde Ecken schneiden sauber ab */
}
/* Silhouette randlos (29.11.2026): Bildbereich links, rechts und unten bis an die Kachelkante (Padding 18 px);
   Titelzeile behält ihr Padding. js/berg_tal.js fordert das SVG in dieser vollen Breite/Höhe an. */
.d7 .bt-karte > .bt-bild { margin: 0 -18px -18px; }
.d7 .bt-karte .bt-titel { font-size: 15px; font-weight: 600; letter-spacing: .04em; color: var(--d7-titel); }
.d7 .bt-karte .bt-titel svg { display: none; }
.d7 .bt-karte .bt-kopf { margin-bottom: 12px; }

/* ── Rechte Spalte ──────────────────────────────────────────────────────── */
.d7 .d7-rechts { display: flex; flex-direction: column; gap: 12px; min-width: 0; container-type: inline-size; }
.d7 .d7-k {
    background: var(--d7-kachel); border: 1px solid var(--d7-rand); border-radius: 14px;
    box-sizing: border-box; color: var(--d7-wert); font: inherit; text-align: left;
}
.d7 button.d7-k, .d7 a.d7-k { cursor: pointer; text-decoration: none; }
.d7 button.d7-k:hover, .d7 a.d7-k:hover { border-color: var(--d7-rand-aktiv); }
.d7 .d7-k.d7-aktiv { border-color: var(--d7-rand-aktiv); }
.d7 .d7-rechts button:focus-visible, .d7 .d7-rechts a:focus-visible {
    outline: 2px solid #60a5fa; outline-offset: 2px;
}
.d7 .d7-ic { width: 26px; height: 26px; flex: none; }

/* Schnellzugriff Satbild · Radar · Karte */
/* Satbild · Radar · Karte und Sonne · Mond · Aurora im Aufbau der Kacheln (29.11.2026): kleines Symbol vor dem
   Namen (Name 13 px, Symbol 20 px, Abstand 6 px wie .d7-klein), zweite Zeile darunter, Höhe 78 px – hier mittig
   (Werte-Kacheln bleiben linksbündig). Zweite Zeile 13 px fett statt 22 px wie die Kachelwerte – „05:12 – 20:58“
   bzw. „Livekarte“ passen in ein Drittel der 320-px-Spalte sonst nicht. */
.d7 .d7-schnell { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.d7 .d7-schnell-k {
    height: 78px; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
    text-align: center;
}
.d7 .d7-schnell-k .d7-k-name,
.d7 .d7-himmel-teil .d7-k-name { display: flex; align-items: center; gap: 6px; }
.d7 .d7-schnell-k .d7-ic,
.d7 .d7-himmel-teil .d7-ic, .d7 .d7-mond svg { width: 20px; height: 20px; display: block; }
.d7 .d7-schnell-status { font-size: 13px; font-weight: 700; color: var(--d7-live); white-space: nowrap; }

/* Sonne · Mond · Aurora */
.d7 .d7-himmel {
    height: 78px; display: flex; align-items: center; justify-content: space-around;
    background: var(--d7-kachel); border: 1px solid var(--d7-rand); border-radius: 14px; box-sizing: border-box;
}
.d7 .d7-himmel-teil {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
    background: none; border: 0; border-radius: 10px;
    padding: 6px 8px; color: inherit; font: inherit; text-align: center; cursor: pointer; min-width: 0;
}
.d7 .d7-himmel-teil:hover, .d7 .d7-himmel-teil.d7-aktiv { background: rgba(96, 165, 250, .08); }
.d7 .d7-himmel-wert { font-size: 13px; font-weight: 700; color: var(--d7-wert); white-space: nowrap; }
.d7 .d7-trenner { width: 1px; height: 44px; background: rgba(148, 163, 184, .18); flex: none; }

/* Überschrift „AKTUELLE WERTE · 1248 M   ● 29.11. 10:11:09“ – einzeilig (Messzeit ersetzt die Zeit im Seitenkopf) */
.d7 .d7-ueberschrift { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; white-space: nowrap; }
.d7 .d7-ueberschrift-titel {
    margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--d7-titel);
}
.d7 .d7-ueberschrift-zeit { font-size: 12px; color: var(--d7-name); font-variant-numeric: tabular-nums; }
.d7 .d7-live-punkt { color: var(--d7-live); }

/* Kacheln */
.d7 .d7-raster { display: grid; gap: 12px; }
/* Beide Raster gleiche Spalten: minmax(0, 1fr) statt 1fr – 1fr heißt minmax(auto, 1fr) und teilte nach Inhalt auf
   (vorher 169/143 px je nach Text, Zeile 4 px breiter als die Spalte; 29.11.2026) → alle Kacheln gleich breit, bündig */
.d7 .d7-raster-2,
.d7 .d7-raster-klein { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Alle 12 Kacheln (Temperatur … Südföhn, Solar … Taupunkt) gleicher Aufbau (29.11.2026; vorher die 8 oberen
   mit großem Symbol links, 84 px): kleines Symbol vor dem Namen, Wert darunter, 78 px hoch */
.d7 .d7-k-name { font-size: 13px; color: var(--d7-name); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d7 .d7-k-wert { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--d7-wert); white-space: nowrap; }
.d7 .d7-k-einheit { font-size: 13px; font-weight: 500; color: var(--d7-einheit); margin-left: 3px; }
.d7 .d7-klein { height: 78px; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.d7 .d7-klein .d7-k-name { display: flex; align-items: center; gap: 6px; }
.d7 .d7-klein .d7-ic { width: 20px; height: 20px; }
.d7 .d7-klein .d7-k-wert { font-size: 22px; }
.d7 .d7-klein .d7-k-einheit { font-size: 12px; }
/* Wind: grüner Live-Punkt nach dem Symbol, vor „Wind“ (wl-punkt/kachel-live-punkt, js/dashboard.js schaltet .live-an) */

/* Boden-Karte: 4 Zeilen (2 × 2), jede wechselt auf ihr Panel */
.d7 .d7-boden { padding: 12px 16px; }
.d7 .d7-boden > .d7-k-name { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.d7 .d7-boden > .d7-k-name .d7-ic { width: 20px; height: 20px; }
.d7 .d7-boden-zeilen { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.d7 .d7-boden-zeile {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 4px;
    background: none; border: 0; border-top: 1px solid rgba(148, 163, 184, .1); border-radius: 0;
    color: inherit; font: inherit; cursor: pointer; text-align: left;
}
.d7 .d7-boden-zeile:hover, .d7 .d7-boden-zeile.d7-aktiv { background: rgba(96, 165, 250, .08); }
.d7 .d7-boden-zeile > span:first-child { font-size: 13px; color: var(--d7-zeile); white-space: nowrap; }
.d7 .d7-boden-wert { font-size: 14px; font-weight: 700; color: var(--d7-wert); white-space: nowrap; }

/* Symbolfarben (wie bisher, nur in den Symbolen) */
.d7 .d7-ic-indigo      { color: #818cf8; }
.d7 .d7-ic-gruen       { color: var(--green-muted); }
.d7 .d7-ic-teal        { color: var(--teal); }
.d7 .d7-ic-gelb        { color: var(--yellow); }
.d7 .d7-ic-gelb-dunkel { color: var(--yellow-dark); }
.d7 .d7-ic-aurora      { color: #22c55e; }
.d7 .d7-ic-rot        { color: var(--red); }
.d7 .d7-ic-blau-akzent { color: var(--blue-accent); }
.d7 .d7-ic-blau        { color: var(--blue); }
.d7 .d7-ic-blau-hell   { color: var(--blue-light); }
.d7 .d7-ic-tuerkis     { color: #2dd4bf; }
.d7 .d7-ic-cyan        { color: var(--cyan); }
.d7 .d7-ic-cyan-hell   { color: #67e8f9; }
.d7 .d7-ic-schnee      { color: #e0f2fe; }
html.light .d7 .d7-ic-schnee { color: #0ea5e9; }
.d7 .d7-ic-uv          { color: #a855f7; }
.d7 .d7-ic-gruen-tief  { color: var(--green-deep); }
/* Südföhn: Wert nach Stärke (wie bisher) */
.d7 .d7-foehn-schwach { color: #f59e0b; }
.d7 .d7-foehn-stark   { color: #ef4444; }
.d7 .d7-foehn-extrem  { color: #dc2626; }

/* Schmale rechte Spalte (ab 1.100 px 320 px statt 448 px im Entwurf):
   Sonne · Mond · Aurora und Kacheln enger, damit nichts überläuft */
@container (max-width: 420px) {
    .d7 .d7-himmel-teil { padding: 6px 4px; }
    .d7 .d7-schnell-k,
    .d7 .d7-klein { padding: 10px 10px; }
    .d7 .d7-boden-zeilen { column-gap: 14px; }
}

/* Rechte Spalte 320 px (ab 1.100 px): Boden-Box enger, sonst bräche „Boden +5 cm“ / „Erde −30 cm“
   neben „−12,5 °C“ um (Zelle ~137 px) */
@container (max-width: 340px) {
    .d7 .d7-boden { padding: 12px 12px; }
    .d7 .d7-boden-zeilen { column-gap: 12px; }
    .d7 .d7-boden-zeile { padding: 6px 2px; gap: 6px; }
    .d7 .d7-boden-zeile > span:first-child { font-size: 12px; }
    .d7 .d7-boden-wert { font-size: 13px; }
}

/* Tablet (601–1.099 px): einspaltig, Kacheln in 4 Spalten */
@media (max-width: 1099px) {
    .d7 .d7-raster-2,
    .d7 .d7-raster-klein { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
} /* Ende min-width 601px */

/* ── Ab 1.100 px: zwei Spalten, gleiche Unterkante ──────────────────────── */
@media (min-width: 1100px) {
    .d7 .db-layout { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 16px; align-items: stretch; }
    /* Berg & Tal füllt links den Rest; das Bild trägt nicht zur Höhe bei (absolut), damit die
       rechte Spalte die Zeilenhöhe bestimmt. Unter 300 px freiem Platz wird links länger. */
    .d7 .bt-karte { flex: 1 1 auto; display: flex; flex-direction: column; }
    .d7 .bt-karte > .bt-bild { flex: 1 1 0; min-height: 300px; position: relative; }
    .d7 .bt-karte > .bt-bild > * { position: absolute; left: 0; right: 0; top: 0; }
}

/* ── Pop-ups Satbild · Radar · Karte: gemeinsamer Rahmen .d7-popup (29.11.2026) ─────────
   Bestehendes Modal (#card-modal-content, js/dashboard.js openCardModal). Kopfzeile 52 px (Symbol, Titel,
   rechts Zusatz-Link + ✕), darunter Inhalt randlos, unten runde Ecken. Desktop 1100 × 702 (Klasse
   d7-modal-gross, js/start_d7.js), mobil volle Breite und Inhalt 70 vh. Liegt außerhalb von .d7. */
@media (min-width: 601px) {
    .card-modal-content.d7-modal-gross { max-width: min(1100px, 94vw); --d7-modal-h: min(648px, calc(100vh - 52px - 3rem)); }
}
@media (max-width: 600px) {
    .card-modal-content:has(> .d7-popup) { max-width: 100%; }
}
.card-modal-content .db-card.d7-popup { display: block; padding: 0 !important; overflow: hidden; border-radius: 12px; }
.d7-popup-inhalt { position: relative; height: var(--d7-modal-h, 70vh); }
.d7-popup-inhalt > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* Vorlage Pop-up „Karte“: versteckt (.db-card setzt display:grid und würde hidden überstimmen);
   openCardModal setzt am Klon display:block */
.d7-karte-vorlage[hidden] { display: none; }
/* Zusatz-Link in der Kopfzeile (data-popup-link) */
.popup-link { font-size: 14px; font-weight: 600; color: #60a5fa; text-decoration: none; white-space: nowrap; margin-right: 4px; }
.popup-link:hover { text-decoration: underline; }
html.light .popup-link { color: #1d4ed8; }
