html {
    height: 100%;
    overflow-y: auto;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
    --bg-gradient: linear-gradient(180deg, transparent 0%, transparent 280px, #0c1326 340px, #0c1326 100%);
    --text-color: #ffffff;
    --text-muted: #9bb0cb;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.15);
    --nav-bg: rgba(18, 28, 56, 0.88);
    --scene-bottom: #0c1326;
    --scene-h: calc(min(100vw, 414px) * 377 / 266);   /* Höhe der Szene (Seitenverhältnis 266:377), der Seitenhintergrund beginnt genau darunter */
    --view-transition-duration: 100ms;
    --view-transition-offset: 6px;
}

body.day-mode {
    --bg-gradient: linear-gradient(180deg, transparent 0%, transparent 280px, #e8f4fd 340px, #e8f4fd 100%);
    --text-color: #0f172a;
    --text-muted: #475569;
    --card-bg: rgba(255, 255, 255, 0.45);
    --card-border: rgba(255, 255, 255, 0.7);
    --nav-bg: rgba(224, 242, 254, 0.9);
    --scene-bottom: #e8f4fd;
}

body {
    background-color: var(--page-bottom, var(--scene-bottom, #0c1326));
    background-image: var(--body-gradient, linear-gradient(180deg, var(--scene-bottom, #0c1326) 0, var(--scene-bottom, #0c1326) var(--scene-h), var(--page-bottom, var(--scene-bottom, #0c1326)) calc(var(--scene-h) + 1300px)));
    background-repeat: no-repeat;
    color: var(--text-color);
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    transition: background-color 1.2s ease, color 0.5s ease;
}

.app-container {
    width: 100%;
    max-width: 414px;
    min-height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    padding: 60px 20px 90px 20px;
    position: relative;
    overflow: visible;
    transition: background 0.5s ease;
}

@keyframes view-content-enter {
    from {
        opacity: 0;
        transform: translateY(var(--view-transition-offset));
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes view-fade-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

html[data-motion="on"] .view-transition-enter {
    animation: view-content-enter var(--view-transition-duration) ease-out both;
}

html[data-motion="on"] .map-view.view-transition-enter {
    animation-name: view-fade-enter;
}

@media (prefers-reduced-motion: reduce) {
    .view-transition-enter {
        animation: none !important;
    }
}

/* ========================================================================== 
   HINTERGRUNDSZENE – Nachtlandschaft (statisches SVG, 1:1 nach Vorlage)
   ========================================================================== */
.landscape-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 266 / 377;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: var(--scene-bottom, #0c1326);
}

.landscape-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: calc(100% + 2px);
    /* ragt über den Rand hinaus, damit am halben Pixel nichts durchscheint */
    display: block;
}

/* weicher Auslauf in die Farbe des Seitenhintergrunds */
.landscape-scene::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    background: linear-gradient(to bottom, transparent, var(--scene-bottom, #0c1326));
    pointer-events: none;
}

/* Sterne funkeln leicht */
#nv-stars .tw {
    animation: nv-twinkle 3.6s ease-in-out infinite alternate;
}

@keyframes nv-twinkle {
    from {
        opacity: 0.3;
    }

    to {
        opacity: 1;
    }
}

/* Wetter-Effekte der Szene */
@keyframes nv-fall {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(377px);
    }
}

@keyframes nv-sway {
    from {
        transform: translateX(-4px);
    }

    to {
        transform: translateX(4px);
    }
}

@keyframes nv-drift {
    from {
        transform: translateX(-6px);
    }

    to {
        transform: translateX(8px);
    }
}

@keyframes nv-mist {
    from {
        transform: translateX(-26px);
    }

    to {
        transform: translateX(26px);
    }
}

@keyframes nv-leaf {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    88% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
        opacity: 0;
    }
}

.nv-fall {
    animation: nv-fall var(--d, 0.8s) linear infinite;
}

.nv-sway {
    animation: nv-sway var(--s, 3s) ease-in-out infinite alternate;
}

.nv-drift {
    animation: nv-drift calc(var(--nv-drift, 50s) * var(--dm, 1)) ease-in-out infinite alternate;
}

.nv-mist {
    animation: nv-mist var(--m, 26s) ease-in-out infinite alternate;
}

.nv-leaf {
    animation: nv-leaf var(--t, 10s) ease-in infinite;
}

@media (prefers-reduced-motion: reduce) {

    #nv-stars .tw,
    .nv-fall,
    .nv-sway,
    .nv-drift,
    .nv-mist,
    .nv-leaf {
        animation: none;
    }
}

/* Lesbarkeit der Schrift: bei Tag und in der Dämmerung immer weiß mit leichtem Schatten */
body[data-scene-phase="day"],
body[data-scene-phase="dawn"],
body[data-scene-phase="dusk"] {
    --text-muted: #f4f8fd;
}

body[data-scene-phase="day"] .app-header,
body[data-scene-phase="day"] .weather-main,
body[data-scene-phase="dawn"] .app-header,
body[data-scene-phase="dawn"] .weather-main,
body[data-scene-phase="dusk"] .app-header,
body[data-scene-phase="dusk"] .weather-main {
    text-shadow: 0 1px 8px rgba(10, 20, 60, 0.5);
}

/* Alle Inhalte über der Szene */
.app-header,
.weather-main,
.weather-cards,
.hourly-section,
.glass-card,
.imminent-card {
    position: relative;
    z-index: 1;
}


/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 4px;
}

.location-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.location-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.08);
}

body.day-mode .location-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

body.day-mode .location-btn:hover {
    background: rgba(0, 0, 0, 0.12);
}

/* Hauptwetter */
.weather-main {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0;
    margin-bottom: 180px;
}

.temperature-display {
    margin-top: 20px;
}

.weather-condition {
    margin-top: 14px;
}

.location-date h2 {
    font-size: 1.4rem;
    font-weight: 500;
}

.location-date p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.temperature-display h1 {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.05;
    margin: 4px 0;
    letter-spacing: -2px;
}

.weather-condition {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.weather-condition p {
    font-size: 1.05rem;
    font-weight: 400;
}

.high-low {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Glassmorphism Cards */
.weather-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 10px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.glass-card i {
    font-size: 0.95rem;
    color: var(--text-color);
}

.card-title {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.card-value {
    font-size: 0.9rem;
    font-weight: 500;
}

.card-sub,
.card-sub-icon {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: -1px;
}

/* Hourly Forecast (24h Scrollbar) */
.hourly-section {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 12px 14px;
    width: 100%;
}

.section-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hourly-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 6px;
    width: 100%;
    white-space: nowrap;
}

.hourly-scroll::-webkit-scrollbar {
    height: 4px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.hour-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    flex: 0 0 52px;
}

.hour-time {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
}

.hour-icon-wrapper {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hour-item i {
    font-size: 1rem;
    color: #fbbf24;
}

.hour-temp {
    font-weight: 500;
    line-height: 1;
}

/* Regenwahrscheinlichkeit unter der Temperatur */
.hour-rain {
    min-height: 0.72rem;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1;
    color: #00abff;
}

/* 14-Tage-Vorhersage (seitlich wischen) */
.daily-scroll {
    gap: 6px;
    scroll-snap-type: x proximity;
}

.day-card {
    display: flex;
    flex: 0 0 60px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 0 8px;
    border-radius: 14px;
    font-size: 0.8rem;
    scroll-snap-align: start;
}

.day-card.is-today {
    background: rgba(255, 255, 255, 0.1);
}

.day-wd {
    font-weight: 500;
    line-height: 1;
}

.day-date {
    margin-top: -2px;
    font-size: 0.65rem;
    line-height: 1;
    color: var(--text-muted);
}

.day-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 34px;
    font-size: 1.1rem;
}

.day-rain {
    height: 0.7rem;
    font-size: 0.65rem;
    line-height: 0.7rem;
    color: #7fdcee;
}

.day-max {
    font-weight: 500;
    line-height: 1;
}

.day-min {
    line-height: 1;
}

.day-range {
    position: relative;
    width: 5px;
    height: 46px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
}

.day-range-fill {
    position: absolute;
    left: 0;
    right: 0;
    border-radius: 3px;
}

.daily-empty,
.daily-note {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.daily-empty {
    padding: 10px 0;
}

.daily-note {
    margin-top: 6px;
}

/* Details-Kacheln */
.details-section {
    position: relative;
    z-index: 1;
    width: 100%;
}

.details-heading {
    margin: 0 2px 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.detail-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 138px;
    padding: 12px 14px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.detail-value {
    font-size: 1.9rem;
    font-weight: 500;
    line-height: 1.1;
}

.compare-value {
    display: flex;
    align-items: baseline;
    min-width: 0;
    font-size: 1rem;
    font-weight: 400;
}

.compare-reading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 8px;
    min-width: 0;
}

.compare-reading[hidden] {
    display: none;
}

.compare-reading strong {
    flex: none;
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-color);
}

.compare-caption {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.3;
}

.clothing-tile {
    justify-content: flex-start;
}

.clothing-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin: 4px 0;
}

.clothing-main>i {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: rgba(127, 220, 238, 0.14);
    color: #7fdcee;
    font-size: 1.45rem;
}

.clothing-main>div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.clothing-main strong {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.2;
}

.clothing-main span {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.2;
}

.clothing-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.clothing-tip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1;
}

.clothing-tip i {
    color: #7fdcee;
    font-size: 0.7rem;
}

.compare-mode {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    max-width: 100%;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.2;
}

.compare-mode select {
    max-width: 100%;
    padding: 2px 18px 2px 0;
    border: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.compare-mode select option {
    color: #0f172a;
}

.compare-mode i {
    position: absolute;
    right: 2px;
    pointer-events: none;
    font-size: 0.55rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.detail-value small {
    margin-left: 2px;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

.detail-text {
    margin-top: auto;
    font-size: 0.74rem;
    line-height: 1.3;
    opacity: 0.88;
}

.precip-detail {
    display: block;
    margin-top: 4px;
}

.precip-freezing-line {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.3;
}

.precip-freezing-line i {
    font-size: 0.66rem;
}

.detail-bar,
.detail-meter {
    position: relative;
    height: 5px;
    margin: 2px 0;
    border-radius: 3px;
}

.detail-bar {
    background: linear-gradient(90deg, #3dd68c 0%, #f5d547 30%, #ff9f43 55%, #ff5e5e 75%, #b46bff 100%);
}

.detail-bar-dot {
    position: absolute;
    top: 50%;
    width: 9px;
    height: 9px;
    border: 2px solid rgba(15, 23, 42, 0.55);
    border-radius: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.detail-meter {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.18);
}

.detail-meter span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #7fdcee, #4aa3ff);
}

.detail-compass {
    position: absolute;
    top: 34px;
    right: 12px;
    width: 58px;
    height: 58px;
}

.detail-moon {
    position: absolute;
    top: 32px;
    right: 12px;
    width: 46px;
    height: 46px;
}

/* Breite Sonnen-Kachel (so breit wie zwei Kacheln) */
.detail-wide {
    grid-column: 1 / -1;
    min-height: 0;
}

.outlook-tile {
    min-height: 0;
}

.outlook-text {
    margin-top: 2px;
    font-size: 0.96rem;
    line-height: 1.5;
}

.sun-arc {
    width: 100%;
    height: auto;
    margin-top: 2px;
    overflow: visible;
    color: var(--text-color);
}

.sun-horizon {
    stroke: currentColor;
    stroke-opacity: 0.3;
    stroke-width: 1.5;
}

.sun-path {
    fill: none;
    stroke: currentColor;
    stroke-opacity: 0.35;
    stroke-width: 2;
    stroke-dasharray: 2 5;
    stroke-linecap: round;
}

.sun-gold {
    fill: none;
    stroke: #ffc14d;
    stroke-width: 4;
    stroke-linecap: round;
}

.sun-end {
    fill: currentColor;
    fill-opacity: 0.45;
}

.sun-hit {
    fill: transparent;
    cursor: pointer;
    pointer-events: all;
    -webkit-tap-highlight-color: transparent;
}

.sun-arc-wrap {
    position: relative;
}

.sun-pop {
    position: absolute;
    z-index: 6;
    transform: translate(-50%, -100%);
    padding: 3px 10px;
    border: 1.5px solid #ffc14d;
    border-radius: 10px;
    background: rgba(18, 26, 44, 0.94);
    color: #ffc14d;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.sun-pop[hidden] {
    display: none;
}

.sun-pop::after {
    content: "";
    position: absolute;
    left: calc(50% + var(--ax, 0px));
    bottom: -5.5px;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #ffc14d;
    border-bottom: 1.5px solid #ffc14d;
    background: rgba(18, 26, 44, 0.94);
    transform: translateX(-50%) rotate(45deg);
}

body.day-mode .sun-pop {
    border-color: #e0a030;
    background: rgba(255, 255, 255, 0.96);
    color: #a86800;
}

body.day-mode .sun-pop::after {
    border-color: #e0a030;
    background: rgba(255, 255, 255, 0.96);
}

.sun-dot {
    transition: opacity 0.4s ease;
}

.sun-core {
    fill: #ffd166;
    stroke: #fff6d6;
    stroke-width: 1.5;
}

.sun-glow {
    fill: #ffd166;
    fill-opacity: 0.28;
}

.detail-sun.is-golden {
    border-color: rgba(255, 193, 77, 0.55);
}

.sun-times {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
}

.sun-times > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sun-times .sun-mid {
    text-align: center;
}

.sun-times > div:last-child {
    text-align: right;
}

.sun-times span {
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.sun-times b {
    font-size: 1.05rem;
    font-weight: 500;
}

.sun-golden {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--text-muted);
}

.sun-golden b {
    font-weight: 500;
    color: var(--text-color);
}

.gold-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffc14d;
    box-shadow: 0 0 6px rgba(255, 193, 77, 0.7);
}

.detail-sun.is-golden .gold-dot {
    animation: gold-pulse 2.2s ease-out infinite;
}

html[data-motion="off"] .detail-sun.is-golden .gold-dot {
    animation: none;
}

@keyframes gold-pulse {
    0% {
        box-shadow: 0 0 6px rgba(255, 193, 77, 0.7), 0 0 0 0 rgba(255, 193, 77, 0.6);
    }

    70% {
        box-shadow: 0 0 6px rgba(255, 193, 77, 0.7), 0 0 0 9px rgba(255, 193, 77, 0);
    }

    100% {
        box-shadow: 0 0 6px rgba(255, 193, 77, 0.7), 0 0 0 0 rgba(255, 193, 77, 0);
    }
}

.sun-status {
    margin-top: 0;
    font-weight: 500;
    opacity: 1;
}

.detail-sun.is-golden .sun-status {
    color: #ffc14d;
}

body.day-mode .detail-sun.is-golden .sun-status {
    color: #b87700;
}

.app-container.view-more .details-section,
.app-container.view-places .details-section {
    display: none;
}

/* Rollende Ziffern (wie die Abonnentenzahl in YouTube Studio) */
.roll {
    display: inline-block;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.roll-col {
    position: relative;
    display: inline-block;
    clip-path: inset(0 -4px);
}

.roll-base {
    display: inline-block;
}

.roll-col.is-rolling>.roll-base {
    visibility: hidden;
}

.roll-track {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.roll-track>span {
    display: block;
    white-space: nowrap;
}

/* Mehr / Einstellungen */
.more-view {
    display: none;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.app-container.view-more .more-view {
    display: flex;
}

/* Orte-Ansicht (eigener Tab) */
.places-view {
    display: none;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.app-container.view-places .places-view {
    display: flex;
}

.app-container.view-more .weather-main,
.app-container.view-more .weather-cards,
.app-container.view-more .imminent-card,
.app-container.view-more .hourly-section:not(.settings-group),
.app-container.view-more #symbol-overview,
.app-container.view-more #diag-panel,
.app-container.view-places .weather-main,
.app-container.view-places .weather-cards,
.app-container.view-places .imminent-card,
.app-container.view-places .hourly-section:not(.settings-group),
.app-container.view-places #symbol-overview,
.app-container.view-places #diag-panel {
    display: none;
}

.more-title {
    font-size: 1.7rem;
    font-weight: 600;
    margin: 6px 2px 2px;
    text-shadow: 0 1px 8px rgba(10, 20, 60, 0.45);
}

.settings-group {
    padding: 10px 14px 4px;
    background: rgba(16, 28, 58, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.settings-group .section-title {
    margin: 2px 0 4px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.section-title+.setting-row {
    border-top: none;
}

.setting-label {
    font-size: 0.95rem;
}

.setting-sub {
    display: block;
    margin-top: 2px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.setting-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.setting-value i {
    font-size: 0.7rem;
}

.setting-row.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.setting-link {
    width: 100%;
    background: none;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.setting-action .fa-rotate {
    color: #7fc8ff;
}

.setting-danger {
    color: #ff7b7b;
}

.segmented {
    display: inline-flex;
    flex: none;
    padding: 2px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
}

.segmented button {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    font: inherit;
    font-size: 0.82rem;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.segmented button[aria-checked="true"] {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-weight: 600;
}

.switch {
    position: relative;
    flex: none;
    width: 46px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: background 0.25s ease;
}

.switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.switch[aria-checked="true"] {
    background: #34c759;
}

.switch[aria-checked="true"]::after {
    transform: translateX(18px);
}

.setting-select {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    padding: 7px 28px 7px 12px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--text-color);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.setting-select option {
    color: #0f172a;
}

.segmented button:focus-visible,
.switch:focus-visible,
.setting-select:focus-visible,
.setting-link:focus-visible {
    outline: 2px solid #7fc8ff;
    outline-offset: 2px;
}

/* Animationen ausgeschaltet (Einstellung "Animationen") */
html[data-motion="off"] #nv-stars .tw,
html[data-motion="off"] .nv-sway,
html[data-motion="off"] .nv-drift,
html[data-motion="off"] .nv-mist {
    animation: none;
}

html[data-motion="off"] .nv-fall,
html[data-motion="off"] .nv-leaf {
    display: none !important;
}

/* Bottom Navigation (Fixiert am unteren Bildschirmrand) */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    padding: 10px 0;
    border-top: 1px solid var(--card-border);
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
}

@media (min-width: 415px) and (max-width: 599px) {
    .app-container {
        max-width: none;
    }

    #nv-foreground {
        transform: translateY(calc((414px - 100vw) * 0.5));
    }

    .bottom-nav {
        left: 0;
        right: 0;
        transform: none;
        width: auto;
        max-width: none;
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    /* <button> statt <a>: Standard-Look des Browsers abschalten */
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-item:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    border-radius: 10px;
}

.nav-item i {
    font-size: 1.05rem;
}

.nav-item.active {
    color: var(--text-color);
}

/* Globale Stile für saubere, millimetergenau ausgerichtete Wetter-Icons */
.weather-icon-box {
    position: relative;
    width: 36px;
    height: 34px;
    display: inline-block;
    vertical-align: middle;
}

/* Jede Wolke sitzt exakt am selben Referenzpunkt */
.weather-icon-box .w-cloud {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.35rem;
    color: #dfe4ea;
    z-index: 2;
}

/* Sonne im Hintergrund (Leicht bewölkt) */
.weather-icon-box .w-sun-bg {
    position: absolute;
    top: 0px;
    left: 3px;
    font-size: 1.25rem;
    color: #f6e58d;
    z-index: 1;
}

/* Mond im Hintergrund (Bewölkte Nacht) */
.weather-icon-box .w-moon-bg {
    position: absolute;
    top: 0px;
    left: 5px;
    font-size: 1.2rem;
    color: #f6e58d;
    z-index: 1;
}

/* Tropfen / Flocken / Blitz unter der Wolke */
.weather-icon-box .w-sub {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    line-height: 1;
}

/* Reine Sonne / reiner Mond */
.weather-icon-box .w-single {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #f6e58d;
}

/* Nebelstreifen */
.weather-icon-box .w-fog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* ==========================================================================
   Stadtsuche & Favoriten Modal
   ========================================================================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.search-modal.active {
    display: flex;
}

.search-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.search-modal-content {
    position: relative;
    width: 100%;
    max-width: 382px;
    background: var(--nav-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.close-modal-btn:hover {
    color: var(--text-color);
    transform: scale(1.1);
}

/* Suchfeld */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

body.day-mode .search-input-wrapper input {
    background: rgba(255, 255, 255, 0.7);
}

.search-input-wrapper input:focus {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.search-input-wrapper .clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
}

/* GPS Button */
.gps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--card-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.gps-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-style: solid;
}

/* Listen & Items */
.section-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-results-list,
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.city-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.city-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.city-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    flex: 1;
}

.city-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.city-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.city-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fav-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fav-toggle-btn.is-fav {
    color: #f6e58d;
}

.fav-toggle-btn:hover {
    transform: scale(1.2);
}

.empty-state {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 12px 0;
}

/* ==========================================================================
   Wetterkarte
   ========================================================================== */
.map-view {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    z-index: 5;
    background: #0c1326;
}

.app-container.view-map {
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.app-container.view-map> :not(.map-view):not(.bottom-nav):not(.search-modal) {
    display: none;
}

.app-container.view-map .map-view {
    display: block;
}

#map {
    position: absolute;
    inset: 0;
    background: #e6edf3;
}

.map-wx {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.map-chips {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 64px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 800;
}

.map-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(18, 28, 56, 0.88);
    color: #cfd8ea;
    font-size: 0.78rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.map-chip.active {
    background: #ffffff;
    color: #0c1326;
    border-color: #ffffff;
}

.map-fab {
    position: absolute;
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(18, 28, 56, 0.92);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 800;
}

.map-fab-search {
    top: calc(12px + env(safe-area-inset-top, 0px));
}

.map-fab-locate {
    bottom: 140px;
}

.map-status,
.map-legend {
    position: absolute;
    left: 12px;
    z-index: 800;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(18, 28, 56, 0.85);
    color: #cfd8ea;
    font-size: 0.7rem;
    pointer-events: none;
}

.map-status {
    bottom: 172px;
}

.map-status:empty {
    display: none;
}

.map-legend {
    bottom: 140px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-legend .lg-bar {
    width: 70px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #85ccfa, #0000ff, #0a940a, #c5ec03, #ffee00, #ff8800, #ff0000);
}

.map-view .leaflet-bottom {
    bottom: 62px;
}

.map-view .leaflet-control-attribution {
    font-size: 10px;
    background: rgba(12, 19, 38, 0.7);
    color: #9bb0cb;
}

.map-view .leaflet-control-attribution a {
    color: #9bb0cb;
}

.map-home-dot {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4da3ff;
    border: 3px solid #ffffff;
    animation: mapPulse 2s infinite;
}

.map-home-label {
    position: absolute;
    left: 50%;
    top: -34px;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(18, 28, 56, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 500;
}

@keyframes mapPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 163, 255, 0.6);
    }

    70%,
    100% {
        box-shadow: 0 0 0 14px rgba(77, 163, 255, 0);
    }
}

.map-bolt {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 214, 64, 0.55), rgba(255, 214, 64, 0) 70%);
    color: #ffe066;
    font-size: 15px;
    filter: drop-shadow(0 0 4px rgba(255, 200, 0, 0.9));
    animation: boltFlash 2.4s infinite;
}

@keyframes boltFlash {

    0%,
    55%,
    100% {
        opacity: 1;
    }

    60% {
        opacity: 0.3;
    }

    65% {
        opacity: 1;
    }

    70% {
        opacity: 0.5;
    }
}

html[data-motion="off"] .map-bolt,
html[data-motion="off"] .map-home-dot {
    animation: none;
}

.map-view .leaflet-popup-content-wrapper,
.map-view .leaflet-popup-tip {
    background: rgba(18, 28, 56, 0.96);
    color: #ffffff;
}

.map-pop {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
    font-size: 0.8rem;
}

.map-pop button {
    margin-top: 4px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: #0c1326;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}


/* ==========================================================================
   Mehr – Menü
   ========================================================================== */
.more-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#more-settings,
#more-privacy,
#more-imprint {
    display: none;
}

.app-container.more-settings #more-menu,
.app-container.more-privacy #more-menu,
.app-container.more-imprint #more-menu {
    display: none;
}

.app-container.more-settings #more-settings,
.app-container.more-privacy #more-privacy,
.app-container.more-imprint #more-imprint {
    display: flex;
}

.more-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    border: 0;
    background: none;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    text-shadow: 0 1px 8px rgba(10, 20, 60, 0.45);
}

.menu-heading {
    margin: 8px 4px -6px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-shadow: 0 1px 8px rgba(10, 20, 60, 0.45);
}

.menu-group {
    padding: 2px 14px;
}

.menu-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: none;
    color: inherit;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
}

.menu-group .menu-row:first-child {
    border-top: 0;
}

.menu-icon {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c, rgba(255, 255, 255, 0.12));
    color: #ffffff;
    font-size: 1rem;
}

.menu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.menu-name {
    font-size: 0.95rem;
}

.menu-sub {
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.menu-chev {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.menu-badge {
    flex: none;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-size: 0.65rem;
}

.menu-row.is-soon .menu-icon {
    opacity: 0.8;
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    color: var(--text-color);
    font-size: 0.84rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.legal-content h3 {
    margin-top: 8px;
    font-size: 0.98rem;
    line-height: 1.35;
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content address {
    font-style: normal;
}

.legal-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content ul {
    padding-left: 20px;
}

.legal-content .legal-note {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.more-toast {
    position: fixed;
    bottom: 84px;
    left: 50%;
    transform: translate(-50%, 8px);
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(18, 28, 56, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1100;
}

.more-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* ==========================================================================
   Hinweis bei Offline / Fehler
   ========================================================================== */
.data-notice {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(255, 170, 60, 0.2);
    border: 1px solid rgba(255, 190, 90, 0.5);
    color: #ffffff;
    font-size: 0.78rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.data-notice[hidden] {
    display: none;
}

.data-notice i {
    color: #ffbe5a;
}

.data-notice span {
    flex: 1;
}

.data-notice button {
    flex: none;
    padding: 5px 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.72rem;
    cursor: pointer;
}

.app-container.view-more .data-notice,
.app-container.view-places .data-notice {
    display: none;
}

/* ==========================================================================
   Willkommen (erster Start)
   ========================================================================== */
.welcome {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 16, 34, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.welcome[hidden] {
    display: none;
}

.welcome-card {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 22px 22px;
    border-radius: 22px;
    background: rgba(18, 28, 56, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    color: #ffffff;
}

.welcome-logo {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 4px;
    opacity: 0.85;
}

.welcome-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

.welcome-card p {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #b8c6dc;
}

.welcome-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
}

.welcome-btn[hidden] {
    display: none;
}

.welcome-btn.primary {
    background: #ffffff;
    color: #0c1326;
    border-color: #ffffff;
    font-weight: 600;
}

.welcome-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.welcome-card .welcome-error {
    color: #ffb3a8;
    font-size: 0.8rem;
}

.welcome-error[hidden] {
    display: none;
}

.welcome-card #install-help {
    color: #b8c6dc;
}


/* Karte: Vorhersage-Zeitleiste */
.map-time {
    position: absolute;
    left: 12px;
    right: 64px;
    bottom: 72px;
    z-index: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 16px;
    background: rgba(18, 28, 56, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.map-play {
    flex: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #0c1326;
    font-size: 0.85rem;
    cursor: pointer;
}

.map-time-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-time-label {
    font-size: 0.72rem;
    color: #dbe5f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-time input[type="range"] {
    width: 100%;
    accent-color: #4da3ff;
}

.map-chip:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Ausweich-Karte (OpenStreetMap) abgedunkelt */
.map-osm-dark {
    filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9) saturate(0.6);
}


/* ==========================================================================
   Karte: aufgeräumtes Bedienfeld
   ========================================================================== */
.map-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    right: 64px;
}

.map-chips::-webkit-scrollbar {
    display: none;
}

.map-chip {
    flex: none;
}

.map-fab-info {
    top: calc(64px + env(safe-area-inset-top, 0px));
}

.map-fab-locate {
    bottom: 196px;
}

.map-credits {
    position: absolute;
    right: 12px;
    top: calc(116px + env(safe-area-inset-top, 0px));
    z-index: 800;
    max-width: 270px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(18, 28, 56, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #cfd8ea;
    font-size: 0.7rem;
    line-height: 1.5;
}

.map-credits[hidden] {
    display: none;
}

.map-credits a {
    color: #9bc4ff;
}

.map-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 72px;
    z-index: 800;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(18, 28, 56, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.map-panel-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-panel.single .map-panel-row {
    display: none;
}

.map-panel-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: #cfd8ea;
}

.map-panel-foot .lg-title {
    font-weight: 600;
    color: #ffffff;
}

.map-panel-foot .lg-bar {
    flex: none;
    width: 80px;
    height: 6px;
    border-radius: 3px;
}

.map-meta {
    margin-left: auto;
    color: #9fb0cc;
    white-space: nowrap;
}

.map-time-body input[type="range"] {
    width: 100%;
    accent-color: #4da3ff;
}

/* ==========================================================================
   Kurzfristige Warnung (nächste 60 Minuten) – so breit wie zwei Detailkacheln
   ========================================================================== */
.imminent-card {
    --imminent-accent: #00abff;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--imminent-accent);
    border-radius: 16px;
}

.imminent-card[hidden] {
    display: none;
}

.imminent-card.is-rain {
    --imminent-accent: #00abff;
}

.imminent-card.is-thunder {
    --imminent-accent: #ffd166;
}

.imminent-card.is-snow {
    --imminent-accent: #dfe9f5;
}

.imminent-icon {
    flex: none;
    width: 42px;
    text-align: center;
    font-size: 1.8rem;
    color: var(--imminent-accent);
}

.imminent-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.imminent-title {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.imminent-main {
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.15;
}

.imminent-sub {
    font-size: 0.76rem;
    line-height: 1.3;
    opacity: 0.92;
}

.imminent-prob {
    font-weight: 600;
    color: #00abff;
}

body.day-mode .imminent-card.is-rain {
    --imminent-accent: #0088dd;
}

body.day-mode .imminent-card.is-thunder {
    --imminent-accent: #d99000;
}

body.day-mode .imminent-card.is-snow {
    --imminent-accent: #6b8cb5;
}

body.day-mode .imminent-prob,
body.day-mode .hour-rain {
    color: #0077cc;
}

/* ==========================================================================
   Startseite als <main>: der Wrapper selbst erzeugt keine Box, die Karten
   bleiben direkte Layout-Kinder von .app-container (Flex-Spalte mit gap).
   ========================================================================== */
.today-view {
    display: contents;
}

/* ==========================================================================
   Anpassung an Bildschirmgrößen
   (die Spalte bleibt bewusst 414 px breit – die Szene ist daran ausgerichtet)
   ========================================================================== */
@media (max-width: 360px) {
    .app-container {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (min-width: 600px) {
    .app-container {
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.35);
    }
}

@media (max-height: 480px) and (orientation: landscape) {
    .app-container {
        padding-top: 30px;
        padding-bottom: 64px;
    }

    .bottom-nav {
        padding: 4px 0;
    }
}

/* ==========================================================================
   Meine Orte (Favoriten mit Mini-Wetter)
   ========================================================================== */
.places-group {
    padding: 2px 14px;
}

.place-item {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.place-item:first-child {
    border-top: 0;
}

.place-row {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border: 0;
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.place-row:focus-visible,
.place-star:focus-visible,
.place-add:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
    border-radius: 10px;
}

.place-icon {
    flex: none;
    width: 44px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fbbf24;
}

.place-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.place-name {
    font-size: 0.98rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-pin {
    margin-right: 6px;
    font-size: 0.72rem;
    color: #5cc8ff;
}

.place-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-temp {
    flex: none;
    min-width: 3ch;
    text-align: right;
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1;
}

.place-item.is-current {
    box-shadow: inset 3px 0 0 #5cc8ff;
    margin-left: -14px;
    padding-left: 14px;
}

.place-star {
    flex: none;
    margin-left: 6px;
    padding: 8px;
    border: 0;
    background: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
}

.place-star:hover {
    color: #f6e58d;
}

.place-add {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.place-add i {
    width: 44px;
    text-align: center;
}

.places-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.places-refresh {
    padding: 8px 10px;
    border: 0;
    background: none;
    color: var(--text-color);
    font-size: 0.95rem;
    cursor: pointer;
}

.places-refresh:focus-visible {
    outline: 2px solid var(--text-color);
    border-radius: 10px;
}

/* ==========================================================================
   Karte: Radar-Überblendung und Quellenangabe
   ========================================================================== */
.radar-wms {
    transition: opacity 0.3s ease;
}

.map-attrib {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 56px;
    z-index: 800;
    font-size: 9.5px;
    line-height: 12px;
    text-align: right;
    color: #3b4a5e;
    text-shadow: 0 0 3px #ffffff, 0 0 3px #ffffff;
    pointer-events: none;
}

.map-attrib a {
    color: inherit;
    pointer-events: auto;
}

/* Auf schmalen Handys sollen alle vier Karten-Chips nebeneinander passen */
@media (max-width: 440px) {
    .map-chips {
        gap: 5px;
    }

    .map-chip {
        padding: 7px 9px;
        gap: 5px;
        font-size: 0.78rem;
    }
}


/* ==========================================================================
   Personalisierbare Startseite (js/home.js)
   Zeilen: s = 3 kleine Kacheln, m = 2 normale Kacheln, l = 1 breite Kachel
   ========================================================================== */
.tile-zone {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.tile-zone[hidden],
.fixed-bar,
.edit-bar[hidden],
.edit-dock[hidden],
#tile-pool[hidden] {
    display: none;
}

.tile-row {
    display: grid;
    gap: 10px;
}

.tile-row[data-t="s"] {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tile-row[data-t="m"] {
    grid-template-columns: repeat(2, 1fr);
}

.tile-row[data-t="l"] {
    grid-template-columns: 1fr;
}

.tile-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tile-slot>.glass-card,
.tile-slot>.detail-tile {
    flex: 1;
}

.detail-empty {
    opacity: 0.6;
}

.app-container.view-more .tile-zone,
.app-container.view-places .tile-zone {
    display: none;
}

/* ---- Bearbeitungsmodus ---- */
.app-container.is-editing {
    padding-top: 14px;
    padding-bottom: 230px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.app-container.is-editing .landscape-scene {
    opacity: 0.12;
}

.app-container.is-editing .app-header,
.app-container.is-editing .weather-main,
.app-container.is-editing .imminent-card,
.app-container.is-editing .hourly-section:not(.settings-group),
.app-container.is-editing .data-notice,
.app-container.is-editing #symbol-overview,
.app-container.is-editing #diag-panel {
    display: none !important;
}

.app-container.is-editing .bottom-nav {
    display: none;
}

.app-container.is-editing .fixed-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border: 1px dashed var(--card-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.78rem;
}

.fixed-bar i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.fixed-bar em {
    margin-left: auto;
    font-style: normal;
    font-size: 0.68rem;
    opacity: 0.75;
}

.edit-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -14px -20px 0;
    padding: 12px 20px;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--card-border);
}

.edit-bar-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edit-bar-text strong {
    font-size: 1rem;
    font-weight: 600;
}

.edit-bar-text span {
    font-size: 0.64rem;
    line-height: 1.3;
    color: var(--text-muted);
}

.edit-bar-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-btn {
    padding: 7px 12px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.edit-btn.primary {
    border-color: transparent;
    background: #2f8cff;
    color: #ffffff;
}

.app-container.is-editing .tile-slot {
    min-height: var(--free-h, 80px);
    cursor: grab;
    touch-action: pan-y;
}

.app-container.is-editing .tile-slot>*:not(.tile-remove) {
    pointer-events: none;
}

.app-container.is-editing .tile-slot[data-id]>:first-child {
    outline: 1.5px dashed color-mix(in srgb, var(--text-color) 30%, transparent);
    outline-offset: -1px;
}

.app-container.is-editing .detail-tile {
    min-height: 0;
}

.app-container.is-editing .detail-text,
.app-container.is-editing .sun-golden,
.app-container.is-editing .sun-status {
    display: none;
}

/* freier Platz: leichte Umrandung in der Größe der Kachel, die hierher gehört */
.app-container.is-editing .tile-slot.is-free {
    border: 1.5px dashed color-mix(in srgb, var(--text-color) 38%, transparent);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    align-items: center;
    justify-content: center;
}

.app-container.is-editing .tile-slot.is-free::after {
    content: var(--free-label, 'Free');
    font-size: 0.68rem;
    color: var(--text-muted);
    opacity: 0.85;
}

.app-container.is-editing .tile-zone.is-empty-zone {
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed color-mix(in srgb, var(--text-color) 30%, transparent);
    border-radius: 14px;
}

.app-container.is-editing .tile-zone.is-empty-zone::before {
    content: attr(data-hint);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.tile-remove {
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ff5a5f;
    color: #ffffff;
    font-size: 0.65rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.tile-remove::after {
    content: '';
    position: absolute;
    inset: -8px;
}

.app-container.is-editing .tile-remove {
    display: flex;
}

.app-container.is-dragging-tile .tile-remove {
    display: none;
}

.tile-slot.is-dragging {
    opacity: 0.3;
}

.tile-slot.is-target {
    outline: 2px solid #4dc3ff;
    outline-offset: 2px;
    border-radius: 16px;
    background: rgba(77, 195, 255, 0.14);
}

.tile-slot.is-blocked {
    opacity: 0.45;
}

.tile-slot.just-placed {
    animation: home-pop 0.7s ease;
}

@keyframes home-pop {
    0% { transform: scale(0.92); }
    40% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 3000;
    margin: 0;
    opacity: 0.94;
    pointer-events: none;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    will-change: transform;
}

.drag-ghost.dock-chip {
    justify-content: center;
}

.drop-line {
    position: fixed;
    z-index: 2500;
    height: 4px;
    border-radius: 2px;
    background: #4dc3ff;
    box-shadow: 0 0 10px rgba(77, 195, 255, 0.85);
    pointer-events: none;
}

.drop-line[hidden] {
    display: none;
}

.drop-line.is-zone {
    height: 46px;
    margin-top: -21px;
    opacity: 0.25;
    border-radius: 14px;
}

/* ---- Ablage ---- */
.edit-dock {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 1000;
    width: 100%;
    max-width: 414px;
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--card-border);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    transition: background 0.15s ease;
}

.edit-dock.is-target {
    background: rgba(47, 140, 255, 0.55);
}

.dock-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
}

.dock-title span {
    margin-left: auto;
    max-width: 62%;
    font-size: 0.6rem;
    font-weight: 400;
    line-height: 1.25;
    text-align: right;
    color: var(--text-muted);
}

.dock-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
}

.dock-list::-webkit-scrollbar {
    display: none;
}

.edit-dock.is-empty .dock-list {
    display: none;
}

.dock-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 82px;
    padding: 9px 12px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
    cursor: grab;
    touch-action: pan-x;
}

.dock-chip i {
    font-size: 1rem;
}

.dock-chip-name {
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}

.dock-chip-sub {
    font-size: 0.6rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.dock-hint {
    padding: 12px 4px 4px;
    font-size: 0.72rem;
    text-align: center;
    color: var(--text-muted);
}

.dock-hint[hidden] {
    display: none;
}

.home-toast {
    position: fixed;
    bottom: 190px;
    left: 50%;
    transform: translate(-50%, 8px);
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(18, 28, 56, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1100;
}

.home-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.drag-ghost .detail-text,
.drag-ghost .sun-golden,
.drag-ghost .sun-status {
    display: none;
}

.drag-ghost.detail-tile {
    min-height: 0;
}

/* Sprachauswahl beim ersten Start: liegt über dem Willkommens-Dialog */
.welcome#lang-dialog {
    z-index: 4000;
}

.welcome#lang-dialog[hidden] {
    display: none;
}

.lang-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

/* Opt-out der Nutzungsstatistik: bewusst zurückhaltend, ganz unten in der Datenschutzerklärung */
.stats-optout-row {
    margin-top: 28px;
    opacity: 0.6;
    font-size: 0.8rem;
}
.stats-optout-row .setting-sub {
    font-size: 0.7rem;
}
.stats-optout-row:hover, .stats-optout-row:focus-within {
    opacity: 1;
}

/* Eigenes Klappmenü (ersetzt die System-Auswahl, siehe initCustomSelects in ui.js) */
.cs-native {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    pointer-events: none;
}

.cs-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cs-trigger.cs-pill {
    flex: none;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-color);
    font-size: 0.85rem;
    transition: background 0.15s ease;
}

.cs-trigger.cs-pill:hover,
.cs-trigger.cs-pill[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.22);
}

.cs-trigger .cs-caret {
    font-size: 0.6rem;
    opacity: 0.8;
    transition: transform 0.18s ease;
}

.cs-trigger[aria-expanded="true"] .cs-caret {
    transform: rotate(180deg);
}

.cs-trigger.cs-plain {
    max-width: 100%;
    padding: 2px 18px 2px 0;
    border: 0;
    background: transparent;
}

.cs-trigger:focus-visible {
    outline: 2px solid #7fc8ff;
    outline-offset: 2px;
    border-radius: 8px;
}

.cs-menu {
    position: fixed;
    z-index: 5000;
    max-width: calc(100vw - 16px);
    max-height: min(60vh, 340px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--menu-bg, rgba(18, 28, 56, 0.97));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
    color: var(--text-color);
    font-size: 0.88rem;
    outline: none;
    animation: csIn 0.14s ease-out;
}

.cs-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 10px;
    border-radius: 9px;
    white-space: nowrap;
    cursor: pointer;
}

.cs-option.is-active {
    background: rgba(255, 255, 255, 0.14);
}

body.day-mode .cs-option.is-active {
    background: rgba(15, 23, 42, 0.08);
}

.cs-option[aria-selected="true"] {
    font-weight: 600;
}

.cs-option .cs-check {
    font-size: 0.7rem;
    color: #7fc8ff;
    opacity: 0;
}

body.day-mode .cs-option .cs-check {
    color: #1d6fb8;
}

.cs-option[aria-selected="true"] .cs-check {
    opacity: 1;
}

.cs-option[aria-disabled="true"] {
    opacity: 0.4;
    cursor: default;
}

@keyframes csIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

html[data-motion="off"] .cs-menu {
    animation: none;
}

body.day-mode .cs-menu {
    background: rgba(232, 244, 253, 0.97);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
}

/* Kachel gedrückt halten (Startseite) -> Personalisierung: Eindrück-Effekt und kurzes Aufleuchten der gehaltenen Kachel */
.tile-slot {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.app-container:not(.is-editing) .tile-slot>* {
    transition: transform 0.2s ease;
}

.app-container:not(.is-editing) .tile-slot.is-pressing>* {
    transform: scale(0.96);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile-slot.just-grabbed>:first-child {
    animation: grabPulse 0.85s ease-out;
}

@keyframes grabPulse {
    from {
        box-shadow: 0 0 0 0 rgba(127, 200, 255, 0.6);
    }

    to {
        box-shadow: 0 0 0 16px rgba(127, 200, 255, 0);
    }
}

html[data-motion="off"] .tile-slot.just-grabbed>:first-child {
    animation: none;
}

/* Hinweis "Ort ungefähr": nutzt die gelbe Optik der Offline-Meldung (.data-notice), zusätzlich per Wischen schließbar */
.loc-notice {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
    cursor: grab;
}

.loc-notice span {
    line-height: 1.3;
}

.loc-notice .loc-notice-use {
    font-weight: 600;
}

.data-notice.loc-notice .loc-notice-close {
    width: 26px;
    height: 26px;
    padding: 0;
    display: grid;
    place-items: center;
    background: transparent;
    opacity: 0.75;
}

.loc-notice .loc-notice-close i {
    color: #ffffff;
    font-size: 0.8rem;
}

/* Weicher Wechsel Startseite <-> Personalisierung (siehe enterEdit/exitEdit in home.js) */
.landscape-scene {
    transition: opacity 0.4s ease;
}

.app-container.edit-leaving .app-header,
.app-container.edit-leaving .weather-main,
.app-container.edit-leaving .imminent-card,
.app-container.edit-leaving .hourly-section:not(.settings-group),
.app-container.edit-leaving .data-notice,
.app-container.edit-leaving #symbol-overview,
.app-container.edit-leaving #diag-panel,
.app-container.edit-leaving .bottom-nav,
.app-container.edit-leaving .landscape-scene {
    opacity: 0;
    transition: opacity 0.16s ease;
}

.app-container.edit-entering .edit-bar {
    animation: editBarIn 0.36s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

.app-container.edit-entering .edit-dock {
    animation: editDockIn 0.4s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

.app-container.edit-entering .fixed-bar,
.app-container.edit-entering .tile-slot.is-free,
.app-container.edit-entering .tile-zone.is-empty-zone {
    animation: editFadeIn 0.34s ease 0.08s both;
}

.app-container.edit-entering .tile-remove {
    animation: editPopIn 0.3s cubic-bezier(0.3, 1.4, 0.5, 1) 0.18s both;
}

.app-container.edit-returning .app-header,
.app-container.edit-returning .weather-main,
.app-container.edit-returning .imminent-card,
.app-container.edit-returning .hourly-section:not(.settings-group),
.app-container.edit-returning .bottom-nav {
    animation: editFadeIn 0.34s ease both;
}

@keyframes editBarIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes editDockIn {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes editFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes editPopIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

html[data-motion="off"] .app-container.edit-leaving *,
html[data-motion="off"] .app-container.edit-entering *,
html[data-motion="off"] .app-container.edit-returning * {
    animation: none !important;
    transition: none !important;
}

/* Entwickler-Ansicht: Rohwerte und Modellvergleich (js/diag.js) */
.diag-panel {
    display: block;
    text-align: left;
    margin: 20px 16px;
    padding: 14px;
    box-sizing: border-box;
    min-width: 0;
    max-width: calc(100% - 32px);
    overflow: hidden;
    font-size: 0.72rem;
    color: #ffffff;
}

.diag-panel h3 {
    margin-bottom: 10px;
    text-align: center;
    font-size: 1rem;
}

.diag-head {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    gap: 3px 10px;
    margin: 0 0 10px;
}

.diag-head dt {
    opacity: 0.65;
}

.diag-head dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.diag-sub {
    margin: 12px 0 5px;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    opacity: 0.75;
}

.diag-note {
    opacity: 0.7;
}

.diag-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.diag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.66rem;
    white-space: nowrap;
}

.diag-table th,
.diag-table td {
    padding: 4px 6px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.diag-table th {
    font-weight: 600;
    opacity: 0.8;
}

.diag-table td.diag-wet {
    color: #8fd0ff;
}

.diag-table td.diag-thunder {
    color: #ffd166;
    font-weight: 600;
}

.diag-table td.diag-changed {
    text-decoration: underline dotted;
}

.diag-copy {
    margin-top: 12px;
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.72rem;
    cursor: pointer;
}

/* Amtliche Wetterwarnungen (DWD) */
.data-notice.dwd-alert {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: inherit;
    font-size: 0.8rem;
}

.data-notice.dwd-alert[hidden] {
    display: none;
}

.dwd-title {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dwd-item {
    border-left: 4px solid var(--sev, #ffd166);
    padding-left: 10px;
}

.dwd-item summary {
    display: flex;
    flex-direction: column;
    gap: 1px;
    cursor: pointer;
    list-style: none;
}

.dwd-item summary::-webkit-details-marker {
    display: none;
}

.dwd-event {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.2;
}

.dwd-when {
    font-size: 0.74rem;
    opacity: 0.85;
}

.dwd-body {
    margin-top: 6px;
    font-size: 0.76rem;
    line-height: 1.38;
}

.dwd-body p {
    margin: 0 0 6px;
}

.dwd-src,
.dwd-more {
    font-size: 0.68rem;
    opacity: 0.7;
}

/* Neuigkeiten (Megaphon-Knopf und Fenster) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-btn {
    position: relative;
}

.news-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 0 2px rgba(10, 14, 28, 0.55);
}

.news-dot[hidden] {
    display: none;
}

.news-modal .search-modal-header h3 {
    flex: 1;
    text-align: left;
}

.news-back {
    margin-right: 6px;
}

.news-back[hidden],
.news-detail[hidden],
.news-list[hidden] {
    display: none;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    color: var(--text-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.news-row:hover {
    background: rgba(255, 255, 255, 0.12);
}

body.day-mode .news-row {
    background: rgba(0, 0, 0, 0.05);
}

body.day-mode .news-row:hover {
    background: rgba(0, 0, 0, 0.1);
}

.news-row-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.news-row-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.news-row-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.news-row .fa-chevron-right {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.news-row-new {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff3b30;
}

.news-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.news-detail {
    font-size: 0.86rem;
    line-height: 1.45;
}

.news-detail-date {
    margin-bottom: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.news-detail p {
    margin: 0 0 10px;
}

.news-detail h4 {
    margin: 12px 0 6px;
    font-size: 0.9rem;
}

.news-detail ul {
    margin: 0 0 10px;
    padding-left: 18px;
}

.news-detail li {
    margin-bottom: 7px;
}

/* Hilfe bei blockiertem Standortzugriff (Hinweiszeile, Suchfenster, Willkommens-Fenster) */
.geo-steps {
    display: block;
    margin: 6px 0;
    font-size: 0.92em;
    opacity: 0.9;
}

.gps-help {
    padding: 4px 2px 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.gps-help[hidden] {
    display: none;
}


/* ==========================================================================
   Aktivitäten (Mehr -> Aktivitäten, js/aktivitaeten.js)
   Eigene Optik: Titelkarte in der Farbe der besten Wahl, Tagesband statt Kachel, runde Symbole mit Bewertungsring.
   Alle Flächen sind dunkles Glas mit weißer Schrift, damit sie bei jedem Seitenhintergrund lesbar bleiben.
   ========================================================================== */
#more-activities {
    display: none;
}

.app-container.more-activities #more-menu {
    display: none;
}

.app-container.more-activities #more-activities {
    display: flex;
}

.act-card[hidden],
.act-reset[hidden],
.act-del[hidden] {
    display: none;
}

.act-where {
    margin: -10px 2px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.act-card {
    background: rgba(16, 28, 58, 0.84);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 14px 12px;
    color: #ffffff;
}

.act-h {
    margin: 0 4px 6px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9bb0cb;
}

.act-sub {
    margin: 0 4px 10px;
    font-size: 0.8rem;
    color: #aab9d3;
    line-height: 1.4;
}

.act-hint {
    display: flex;
    gap: 8px;
    padding: 8px 4px;
    font-size: 0.84rem;
    line-height: 1.4;
    color: #b6c4dc;
}

.act-hint i {
    margin-top: 2px;
    color: #ff7a93;
}

/* Titelkarte */
.act-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-height: 168px;
    padding: 18px 18px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    box-shadow: 0 16px 34px -16px var(--rc, #000);
    color: #ffffff;
    text-align: left;
    font: inherit;
    overflow: hidden;
    cursor: pointer;
}

.act-hero.none {
    cursor: default;
}

.act-hero-bg {
    position: absolute;
    right: -14px;
    bottom: -22px;
    font-size: 150px;
    line-height: 1;
    opacity: 0.14;
    transform: rotate(-12deg);
    pointer-events: none;
}

.act-hero-kick {
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 0.85;
}

.act-hero-name {
    padding-right: 92px;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
}

.act-hero-when {
    margin-top: 6px;
    font-size: 1.05rem;
    font-weight: 600;
}

.act-hero-sub {
    padding-right: 70px;
    font-size: 0.86rem;
    line-height: 1.35;
    opacity: 0.92;
}

.act-hero-ring {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.act-hero-rate {
    font-size: 0.74rem;
    font-weight: 700;
}

/* Wertungsring */
.act-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: conic-gradient(var(--rc) calc(var(--p) * 1%), rgba(255, 255, 255, 0.2) 0);
}

.act-ring::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: rgba(9, 16, 36, 0.86);
}

.act-ring b {
    position: relative;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.act-ring.lg {
    width: 80px;
    height: 80px;
}

.act-ring.lg::before {
    inset: 8px;
}

.act-ring.lg b {
    font-size: 1.5rem;
}

/* Heute / Morgen */
.act-days {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: 16px;
    background: rgba(16, 28, 58, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.act-days button {
    border: 0;
    border-radius: 12px;
    padding: 10px 8px;
    background: transparent;
    color: #d3deef;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.act-days button.on {
    background: #ffffff;
    color: #0c1326;
}

.act-axis {
    position: relative;
    height: 18px;
    margin: -4px 52px -4px 70px;
    font-size: 0.66rem;
    color: var(--text-muted);
}

.act-axis span {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
}

.act-axis span::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 1px;
    height: 4px;
    background: currentColor;
    opacity: 0.6;
}

.act-axis.tight {
    margin: 0;
    color: #9bb0cb;
}

/* Zeilen mit Tagesband */
.act-row {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.act-row:first-of-type,
.act-h + .act-row {
    border-top: 0;
}

.act-rowbtn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.act-rowmain {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.act-rowtop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.act-name {
    font-size: 1rem;
    font-weight: 650;
}

.act-rowsub {
    font-size: 0.78rem;
    line-height: 1.3;
    color: #b0bfd6;
}

.act-badge {
    flex: none;
    padding: 3px 10px;
    border-radius: 99px;
    border: 1px solid var(--rc);
    background: rgba(255, 255, 255, 0.08);
    background: color-mix(in srgb, var(--rc) 26%, #0c1326);
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
}

.act-badge.none {
    border-color: rgba(255, 255, 255, 0.2);
    color: #9bb0cb;
}

.act-ribbon {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 32px;
    padding-bottom: 7px;
}

.act-ribbon i {
    flex: 1;
    height: var(--h, 12%);
    border-radius: 3px 3px 1px 1px;
    background: var(--c, rgba(255, 255, 255, 0.14));
}

.act-ribbon i.off {
    height: 12%;
    background: rgba(255, 255, 255, 0.12);
}

.act-ribbon i.past {
    opacity: 0.35;
}

.act-ribbon.big {
    height: 76px;
    padding-bottom: 8px;
    gap: 3px;
}

.act-ribbon.big i {
    border-radius: 4px 4px 2px 2px;
}

.act-win {
    position: absolute;
    bottom: 0;
    height: 3px;
    border-radius: 2px;
    background: #ffffff;
}

.act-now {
    position: absolute;
    top: 0;
    bottom: 5px;
    width: 2px;
    margin-left: -1px;
    border-radius: 1px;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

/* runde Symbole */
.act-disc {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--rc);
    background: rgba(255, 255, 255, 0.1);
    background: color-mix(in srgb, var(--rc) 24%, #0c1326);
    box-shadow: 0 0 16px -4px var(--rc);
    color: #ffffff;
    font-size: 1.1rem;
}

.act-disc.sm {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
}

.act-disc.big {
    width: 62px;
    height: 62px;
    font-size: 1.5rem;
}

.act-disc.dashed {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    background: transparent;
    box-shadow: none;
    color: #d3deef;
}

.act-heart {
    flex: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.05rem;
    cursor: pointer;
}

.act-heart.on {
    color: #ff5d7a;
}

.act-heart.big {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

/* Suche, Gruppen, Raster */
.act-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    margin: 4px 0 10px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    color: #aab9d3;
}

.act-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: none;
    color: #ffffff;
    font: inherit;
    font-size: 16px;
}

.act-search input::placeholder {
    color: #8fa3c2;
}

.act-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    padding: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.act-chips::-webkit-scrollbar {
    display: none;
}

.act-chip {
    flex: none;
    padding: 7px 14px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 0.82rem;
    white-space: nowrap;
    cursor: pointer;
}

.act-chip.on {
    background: var(--cc, #ffffff);
    border-color: transparent;
    color: #0c1326;
    font-weight: 650;
}

.act-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 4px;
}

.act-bub {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: none;
    color: #ffffff;
    font: inherit;
    cursor: pointer;
}

.act-bubname {
    font-size: 0.74rem;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.act-bub-fav {
    position: absolute;
    top: -3px;
    left: calc(50% + 14px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0c1326;
    color: #ff5d7a;
    font-size: 0.6rem;
}

.act-empty {
    grid-column: 1 / -1;
    padding: 10px 4px;
    font-size: 0.85rem;
    color: #aab9d3;
}

.act-note {
    margin: 2px 6px 6px;
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--text-muted);
}

/* Detail */
.act-dhead {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)), #101c3a;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cc) 42%, #0c1326), #101c3a);
    color: #ffffff;
}

.act-dtitles {
    flex: 1;
    min-width: 0;
}

.act-dtitle {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.act-dcat {
    margin-top: 3px;
    font-size: 0.8rem;
    color: #c4d1e6;
}

.act-verdict {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 2px 4px;
}

.act-vrate {
    font-size: 1.55rem;
    font-weight: 750;
    color: var(--rc, #ffffff);
}

.act-vwhen {
    margin-top: 2px;
    font-size: 1rem;
    font-weight: 600;
}

.act-vwhy {
    margin-top: 3px;
    font-size: 0.86rem;
    line-height: 1.35;
    color: #b6c4dc;
}

.act-nowline {
    margin: 12px 4px 0;
    font-size: 0.86rem;
    color: #d3deef;
}

.act-days-box {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.act-day-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 0.88rem;
    font-weight: 650;
}

.act-day-win {
    font-size: 0.8rem;
    font-weight: 500;
    color: #b0bfd6;
}

/* Regler */
.act-ctl {
    display: block;
    margin-bottom: 14px;
}

.act-ctl-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 2px 4px;
    font-size: 0.9rem;
}

.act-ctl output {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.act-ctl input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 34px;
    background: transparent;
    /* Nur der Regler selbst reagiert, ein Tippen auf die Leiste springt nicht; senkrechtes Wischen scrollt weiter die Seite */
    pointer-events: none;
    touch-action: pan-y;
}

.act-ctl input[type=range]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.act-ctl input[type=range]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.act-ctl input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    margin-top: -12px;
    border-radius: 50%;
    border: 0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    cursor: grab;
}

.act-ctl input[type=range]::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    cursor: grab;
}

.act-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.act-seg button {
    padding: 10px 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.act-seg button.on {
    background: #ffffff;
    border-color: #ffffff;
    color: #0c1326;
    font-weight: 650;
}

.act-reset,
.act-del {
    align-self: flex-start;
    padding: 8px 4px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.86rem;
    cursor: pointer;
}

.act-reset {
    color: #9bd1ff;
}

.act-del {
    color: #ff8a8a;
}

/* Eigene Aktivität */
.act-field {
    display: block;
    margin-bottom: 14px;
}

.act-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    outline: none;
}

.act-field input.bad {
    border-color: #ff6b6b;
}

.act-icons,
.act-tpls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.act-ic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
}

.act-ic.on {
    background: #ffffff;
    color: #0c1326;
}

.act-tpl {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.act-tpl.on {
    background: var(--cc);
    border-color: transparent;
    color: #0c1326;
    font-weight: 650;
}

.act-save {
    width: 100%;
    height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    color: #0c1326;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.act-clear[hidden] {
    display: none;
}

.act-search input::-webkit-search-cancel-button,
.act-search input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.act-clear {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: -6px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 90, 90, 0.18);
    color: #ff6b6b;
    font-size: 0.95rem;
    cursor: pointer;
}

.act-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #0c1326;
    background: var(--rc);
}

.act-dot.inline {
    position: static;
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 2px;
    vertical-align: -1px;
    border: 0;
}

.act-legend {
    margin: 14px 4px 0;
    font-size: 0.74rem;
    line-height: 1.4;
    color: #9bb0cb;
}

/* Kachel "Aktivitäten" auf der Startseite */
.act-tile {
    cursor: pointer;
    justify-content: flex-start;
    gap: 10px;
}

.act-tile-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.act-tile-main>div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.act-tile-main strong {
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
}

.act-tile-main span {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.25;
}

.act-tile-main .act-ring {
    width: 46px;
    height: 46px;
}

.act-tile-main .act-ring::before {
    inset: 5px;
}

.act-tile-main .act-ring b,
.act-tile-main .act-disc {
    color: #ffffff;
}

.act-tile-main .act-ring b {
    font-size: 0.9rem;
}

.act-tile-others {
    display: flex;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--card-border);
}

.act-tile-o {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.2;
    text-align: center;
}

.act-tile-o .act-disc {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
    color: #ffffff;
}

.act-vtag {
    margin-left: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #9bb0cb;
}

.act-svg {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

.act-seg.two {
    grid-template-columns: repeat(2, 1fr);
}

.act-ribbon.big {
    cursor: pointer;
}

.act-ribbon i.sel {
    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

.act-day-win.sel {
    color: #ffffff;
    font-weight: 650;
}

/* ==========================================================================
   Wetter teilen (Mehr -> Wetter teilen, js/share.js)
   ========================================================================== */
#more-share {
    display: none;
}

.app-container.more-share #more-menu {
    display: none;
}

.app-container.more-share #more-share {
    display: flex;
}

.share-img[hidden],
.share-wait[hidden] {
    display: none;
}

.share-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 14px;
    width: min(100%, 220px);
    min-height: 160px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.share-img {
    display: block;
    width: 100%;
    height: auto;
}

.share-wait {
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-color);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.share-btn.share-primary {
    background: linear-gradient(135deg, #2fb4cc, #3d9bff);
    border-color: transparent;
    color: #fff;
}

.share-hint {
    margin: 12px 4px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

/* Karteneinstellungen (Mehr -> Karte) */
#more-mapset {
    display: none;
}

.app-container.more-mapset #more-menu {
    display: none;
}

.app-container.more-mapset #more-mapset {
    display: flex;
}

/* Hilfe & Feedback (Mehr -> Hilfe & Feedback, js/help.js) */
#more-help {
    display: none;
}

.app-container.more-help #more-menu {
    display: none;
}

.app-container.more-help #more-help {
    display: flex;
}

.faq-item {
    border-top: 1px solid var(--card-border);
    padding: 12px 2px 12px 20px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    list-style-position: outside;
}

.faq-item p {
    margin: 10px 0 2px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.help-lead {
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Luftqualität und Pollen (Detailkacheln) */
.aqi-bar {
    position: relative;
    display: flex;
    gap: 2px;
    height: 6px;
    margin: 9px 0 2px;
}

.aqi-bar i {
    flex: 1;
    border-radius: 3px;
}

.aqi-bar i:nth-child(1) { background: #4fd1c5; }
.aqi-bar i:nth-child(2) { background: #4fcf8a; }
.aqi-bar i:nth-child(3) { background: #f5d547; }
.aqi-bar i:nth-child(4) { background: #ff9f43; }
.aqi-bar i:nth-child(5) { background: #e5484d; }
.aqi-bar i:nth-child(6) { background: #a55eea; }

.aqi-pin {
    position: absolute;
    top: -8px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #ffffff;
    transform: translateX(-50%);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.pollen-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 2px;
}

.pollen-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
}

.pollen-chip i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4fcf8a;
}

.pollen-chip.lv2 i { background: #f5d547; }
.pollen-chip.lv3 i { background: #ff9f43; }
.pollen-chip.lv4 i { background: #e5484d; }

/* Detailansichten (Tippen auf eine Kachel, js/details.js, js/charts.js) */
#more-detail {
    display: none;
}

.app-container.more-detail #more-menu {
    display: none;
}

.app-container.more-detail #more-detail {
    display: flex;
}

.has-detail {
    cursor: pointer;
}

.detail-more {
    margin-left: auto;
    font-size: 0.6rem;
    opacity: 0.5;
}

.dseg {
    margin-bottom: 10px;
}

.dread {
    min-height: 2.6em;
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.dchart-wrap {
    touch-action: pan-y;
}

.dchart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
}

.dchart .dgrid {
    stroke: currentColor;
    stroke-opacity: 0.16;
}

.dchart .dlabel {
    fill: currentColor;
    fill-opacity: 0.65;
    font-size: 9px;
}

.dchart .dbar {
    fill: #5ab8ff;
}

.dchart .dbar.past {
    fill: #7f9bb8;
}

.dchart .darea {
    fill: rgba(110, 231, 183, 0.18);
}

.dchart .dline {
    fill: none;
    stroke: #6ee7b7;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.dchart .dnow {
    stroke: #ffc14d;
    stroke-width: 1.2;
    stroke-dasharray: 3 3;
}

.dchart .dcursor {
    stroke: currentColor;
    stroke-opacity: 0.7;
    stroke-width: 1;
}

.dchart .dcursor[hidden] {
    display: none;
}

.dhint-small {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
}

.dstats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0 0;
}

.dstat {
    padding: 9px 10px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
}

.dstat-label {
    color: var(--text-muted);
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dstat-value {
    margin-top: 3px;
    font-size: 1.05rem;
    font-weight: 700;
}

.dstat-value small {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.75;
}

.dstat-sub {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.dhint {
    margin: 12px 4px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.dchart .dline2 {
    stroke: currentColor;
    stroke-opacity: 0.6;
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
}

.dchart .dref {
    stroke: currentColor;
    stroke-opacity: 0.35;
    stroke-dasharray: 2 3;
}

.dchart .dref-l {
    fill-opacity: 0.55;
}

.tone-uv .dline { stroke: #ffb347; }
.tone-uv .darea { fill: rgba(255, 179, 71, 0.2); }
.tone-uv .dbar { fill: #ffb347; }
.tone-feels .dline:not(.dline2) { stroke: #ff8a65; }
.tone-feels .darea { fill: rgba(255, 138, 101, 0.14); }
.tone-hum .dline { stroke: #5ab8ff; }
.tone-hum .darea { fill: rgba(90, 184, 255, 0.18); }
.tone-vis .dline { stroke: #c9d3ea; }
.tone-vis .darea { fill: rgba(201, 211, 234, 0.16); }

.tone-sun .dline { stroke: #ffc14d; }
.tone-sun .darea { fill: rgba(255, 193, 77, 0.18); }

.sunmap {
    overflow: hidden;
    border-radius: 12px;
    line-height: 0;
}

.sunmap .share-wait {
    line-height: 1.4;
}

.sunmap-svg {
    display: block;
    width: 100%;
    height: auto;
}

.sm-ocean { fill: #2b6a9e; }
.sm-land { fill: #7cb985; }
.sm-eq { stroke: rgba(255, 255, 255, 0.28); stroke-width: 0.35; stroke-dasharray: 2 2; }
.sm-sunhalo { fill: rgba(255, 214, 102, 0.35); }
.sm-sun { fill: #ffd24d; stroke: #fff4c2; stroke-width: 0.8; }
.sm-pin { fill: #ffffff; stroke: #ff5a5f; stroke-width: 1.4; }

.mgrid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px 4px;
}

.mday {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    border-radius: 10px;
    font-size: 0.7rem;
}

.mday svg {
    width: 34px;
    height: 34px;
}

.mday.mtoday {
    background: rgba(255, 193, 77, 0.2);
    outline: 1px solid rgba(255, 193, 77, 0.7);
}

.mday.mfull span,
.mday.mnew span {
    font-weight: 700;
}

.tone-aqi .dline { stroke: #4fd1c5; }
.tone-aqi .darea { fill: rgba(79, 209, 197, 0.16); }
.tone-pollen .dline { stroke: #b6e04d; }
.tone-pollen .darea { fill: rgba(182, 224, 77, 0.16); }

.plist {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.prow {
    display: grid;
    grid-template-columns: 8.2em 1fr 2.2em;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.pbar {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.pbar i {
    display: block;
    height: 100%;
    border-radius: 4px;
}

.pval {
    text-align: right;
    font-weight: 600;
}

.pgrid {
    display: grid;
    grid-template-columns: 1.5fr repeat(var(--cols, 4), 1fr);
    gap: 4px;
    align-items: stretch;
}

.pc {
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
}

.pc.ph {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pc.pn {
    text-align: left;
    font-weight: 600;
    padding-left: 2px;
}

.pc.pv {
    font-weight: 700;
}

.plegend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.plg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.plg i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
}

.tone-wind .dline { stroke: #6ec1ff; }
.tone-wind .darea { fill: rgba(110, 193, 255, 0.16); }
.tone-wind .dline2 { stroke: #ffb347; stroke-opacity: 0.95; }

.wcompass {
    display: block;
    width: 150px;
    height: 150px;
    margin: 2px auto 10px;
}

.wrow {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    text-align: center;
}

.wcell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
}

.wcell .wh {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.wcell .wv {
    font-weight: 700;
}

.warr {
    width: 22px;
    height: 22px;
}

.tone-cmp .dline:not(.dline2) { stroke: #ff8a65; }
.tone-cmp .darea { fill: rgba(255, 138, 101, 0.14); }
.tone-rain .dline { stroke: #5ab8ff; }
.tone-rain .darea { fill: rgba(90, 184, 255, 0.18); }

.cstrip {
    display: block;
    width: 100%;
    height: 22px;
    border-radius: 7px;
}

.cstrip-labels {
    position: relative;
    height: 1.3em;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.cstrip-labels span {
    position: absolute;
    transform: translateX(-50%);
}

.ccards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ccard {
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.ccard.cpast {
    opacity: 0.55;
}

.ctitle {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ctitle small {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: none;
}

.cmain {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmain > i {
    width: 30px;
    font-size: 1.5rem;
    text-align: center;
}

.ctemp {
    font-size: 1.15rem;
    font-weight: 700;
}

.clabel {
    font-size: 0.85rem;
    line-height: 1.3;
}
