/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #fef6ec;
    --bg-soft: #fcecd8;
    --bg-strong: #f8dfc4;
    --bg-card: rgba(20, 50, 75, 0.72);
    --bg-card-alt: rgba(24, 55, 80, 0.68);
    --bg-hover: rgba(28, 60, 85, 0.78);
    --border: rgba(180, 140, 100, 0.15);
    --border-light: rgba(180, 140, 100, 0.22);
    --text: #2a1f14;
    --text-dim: #4a3828;
    --text-muted: #8a7560;
    --card-text: #e4ecf4;
    --card-text-dim: #b8c8d8;
    --card-text-muted: #7a90a6;
    --accent: #15bed2;
    --accent-dim: #0898b1;
    --accent-glow: rgba(21, 190, 210, 0.18);
    --green: #61d6c7;
    --yellow: #ffc93f;
    --orange: #ffb36e;
    --red: #d9656a;
    --radius: 24px;
    --radius-sm: 16px;
    --surface-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 10px 28px rgba(20, 12, 0, 0.1);
    --shadow-md: 0 18px 45px rgba(20, 12, 0, 0.14);
    --shadow-lg: 0 32px 75px rgba(20, 12, 0, 0.18);
}

html { font-size: 17px; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: url('/static/background.png') no-repeat center center / cover fixed;
    background-color: #c4a870;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background: none;
    opacity: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: none;
    opacity: 0;
}

.page-map::before { opacity: 0; }

.page-map .nav-inner {
    background: rgba(14, 24, 40, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ===== NAVIGATION ===== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem clamp(0.75rem, 3vw, 2rem) 0;
}

.nav-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.8rem 1.2rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--card-text);
}

.logo-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.logo-kite-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.logo-text {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--card-text);
}

.logo-accent { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.68rem 1rem;
    border-radius: 18px;
    text-decoration: none;
    color: var(--card-text-muted);
    font-size: 0.92rem;
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover {
    color: var(--card-text);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(21, 190, 210, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 3vw, 3rem) 4rem;
}

.site-footer {
    padding: 0 0 clamp(1.25rem, 3vw, 2rem);
}

.site-footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
}

.site-footer p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    text-align: center;
}

.page-header { margin-bottom: 1.65rem; }

.page-header-split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-dashboard .page-header {
    padding: clamp(1.6rem, 4vw, 2.5rem);
    min-height: 340px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(90deg, rgba(20, 50, 75, 0.88) 0%, rgba(20, 50, 75, 0.72) 36%, rgba(20, 50, 75, 0.25) 62%, transparent 100%),
        url('/static/kitesinthesky.png') no-repeat right center / cover,
        linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3.55rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
    color: #183144;
}

.page-dashboard .page-title {
    max-width: 8ch;
    color: #ffffff;
}

.page-settings .page-title {
    color: #ffffff;
}

.page-history .page-title {
    color: #ffffff;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.45rem;
    max-width: 42rem;
}

.page-dashboard .page-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.page-settings .page-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.page-history .page-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.model-chip-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.model-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: var(--shadow-sm);
}

/* ===== FORECAST TABS ===== */
.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.forecast-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0;
    background: linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    border-radius: 999px;
    padding: 0.38rem;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-shrink: 0;
}

.tab {
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--card-text-muted);
    font-size: 0.86rem;
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tab:hover {
    color: var(--card-text);
    background: rgba(255, 255, 255, 0.1);
}

.tab-active {
    background: linear-gradient(135deg, var(--accent), #58d6de) !important;
    color: white !important;
    box-shadow: 0 10px 20px rgba(21, 190, 210, 0.26);
}

/* ===== SPOT CARDS ===== */
.spot-card {
    --text: var(--card-text);
    --text-dim: var(--card-text-dim);
    --text-muted: var(--card-text-muted);

    background: linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    overflow: hidden;
    content-visibility: auto;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: var(--card-text);
}

.spot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.spot-name {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--card-text);
}

.spot-header-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.spot-country {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--card-text-muted);
    font-size: 0.88rem;
    margin-top: 0.18rem;
}

.spot-coords {
    margin-left: 0.5rem;
    color: var(--card-text-muted);
    opacity: 0.74;
    font-family: 'Space Mono', monospace;
    font-size: 0.76rem;
}

/* ===== ALERT BADGE ===== */
.alert-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(21, 190, 210, 0.18), rgba(97, 214, 199, 0.14));
    border: 1px solid rgba(99, 203, 218, 0.22);
    padding: 0.52rem 1rem;
    border-radius: 100px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.alert-pulse {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.alert-source {
    font-size: 0.76rem;
    color: var(--card-text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(97, 214, 199, 0.42); }
    50% { opacity: 0.72; box-shadow: 0 0 0 7px rgba(97, 214, 199, 0); }
}

/* ===== DAY CARDS SCROLL ===== */
.days-scroll {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 160, 200, 0.3) transparent;
    cursor: grab;
    user-select: none;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}

.days-scroll::-webkit-scrollbar { height: 7px; }
.days-scroll::-webkit-scrollbar-track { background: transparent; }
.days-scroll::-webkit-scrollbar-thumb { background: rgba(100, 160, 200, 0.25); border-radius: 999px; }
.days-scroll.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

/* Model tabs */
.model-tabs-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1rem 0;
    background: transparent;
}

.model-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px 18px 0 0;
    color: var(--card-text-muted);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    font-family: inherit;
}

.model-tab:hover {
    color: var(--card-text-dim);
    background: rgba(255, 255, 255, 0.08);
}

.model-tab-active {
    color: var(--accent);
    background: linear-gradient(180deg, rgba(21, 190, 210, 0.12), rgba(21, 190, 210, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.model-tab-label {
    font-size: 0.9rem;
    font-weight: 800;
}

.model-tab-tagline {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Model panels */
.model-panels-wrap {
    position: relative;
    padding: 0 0.8rem 0.8rem;
}

.model-panel {
    display: none;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 22px;
}

.model-panel-active {
    display: block;
}

.day-card {
    flex: 0 0 calc(100% / 3);
    max-width: calc(100% / 3);
    min-width: 0;
    scroll-snap-align: start;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transition: background 0.15s linear, box-shadow 0.2s ease, transform 0.18s ease;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

/* === Day layout variants === */

/* 5 days — all 5 visible, compact layout */
.days-5 .day-card {
    flex: 0 0 calc(100% / 5);
    max-width: calc(100% / 5);
    min-height: 420px;
}

.days-5 .day-card-summary {
    padding: 0.6rem 0.5rem 0.5rem;
    gap: 0.25rem;
}

.days-5 .day-weather-icon { font-size: 1.2rem; }
.days-5 .day-weather-label { font-size: 0.6rem; }
.days-5 .day-wind-avg { font-size: 1.55rem; }
.days-5 .day-wind-extra { gap: 0.45rem; }
.days-5 .day-stat-label { font-size: 0.56rem; }
.days-5 .day-stat-val { font-size: 0.78rem; }

.days-5 .day-card-weather {
    padding: 0.4rem 0.45rem;
    gap: 0.6rem;
    font-size: 0.76rem;
}

.days-5 .hour-bars {
    height: 180px;
    gap: 4px;
    padding: 0.55rem 0.5rem 0.35rem;
}

.days-5 .hour-top { min-height: 48px; }
.days-5 .hour-lbl { font-size: 0.6rem; }
.days-5 .hour-weather { font-size: 0.9rem; }
.days-5 .hour-dir { font-size: 0.85rem; }

.days-5 .kite-badge {
    width: 24px;
    height: 21px;
}
.days-5 .kite-badge-size { font-size: 0.62rem; }
.days-5 .kite-badge-danger { width: 26px; height: 26px; }
.days-5 .kite-skull-icon { width: 100%; height: 100%; }

/* 7d, 10d, 14d — show 5 cards, scroll for the rest */
.days-7 .day-card,
.days-10 .day-card,
.days-14 .day-card {
    flex: 0 0 calc(100% / 5);
    max-width: calc(100% / 5);
    min-height: 420px;
}

.days-7 .day-card-summary,
.days-10 .day-card-summary,
.days-14 .day-card-summary {
    padding: 0.6rem 0.5rem 0.5rem;
    gap: 0.25rem;
}

.days-7 .day-weather-icon, .days-10 .day-weather-icon, .days-14 .day-weather-icon { font-size: 1.2rem; }
.days-7 .day-weather-label, .days-10 .day-weather-label, .days-14 .day-weather-label { font-size: 0.6rem; }
.days-7 .day-wind-avg, .days-10 .day-wind-avg, .days-14 .day-wind-avg { font-size: 1.55rem; }
.days-7 .day-wind-extra, .days-10 .day-wind-extra, .days-14 .day-wind-extra { gap: 0.45rem; }
.days-7 .day-stat-label, .days-10 .day-stat-label, .days-14 .day-stat-label { font-size: 0.56rem; }
.days-7 .day-stat-val, .days-10 .day-stat-val, .days-14 .day-stat-val { font-size: 0.78rem; }

.days-7 .day-card-weather,
.days-10 .day-card-weather,
.days-14 .day-card-weather {
    padding: 0.4rem 0.45rem;
    gap: 0.6rem;
    font-size: 0.76rem;
}

.days-7 .hour-bars, .days-10 .hour-bars, .days-14 .hour-bars {
    height: 180px;
    gap: 4px;
    padding: 0.55rem 0.5rem 0.35rem;
}

.days-7 .hour-top, .days-10 .hour-top, .days-14 .hour-top { min-height: 48px; }
.days-7 .hour-lbl, .days-10 .hour-lbl, .days-14 .hour-lbl { font-size: 0.6rem; }
.days-7 .hour-weather, .days-10 .hour-weather, .days-14 .hour-weather { font-size: 0.9rem; }
.days-7 .hour-dir, .days-10 .hour-dir, .days-14 .hour-dir { font-size: 0.85rem; }

.days-7 .kite-badge, .days-10 .kite-badge, .days-14 .kite-badge {
    width: 24px;
    height: 21px;
}
.days-7 .kite-badge-size, .days-10 .kite-badge-size, .days-14 .kite-badge-size { font-size: 0.62rem; }
.days-7 .kite-badge-danger, .days-10 .kite-badge-danger, .days-14 .kite-badge-danger { width: 26px; height: 26px; }
.days-7 .kite-skull-icon, .days-10 .kite-skull-icon, .days-14 .kite-skull-icon { width: 100%; height: 100%; }

/* 5-day: disable scroll since all cards fit */
.days-5 {
    overflow-x: hidden;
    scroll-snap-type: none;
    cursor: default;
}

.day-card:last-child { border-right: none; }

/* Strength color bleed — top bar + downward gradient overlay via ::before */
.day-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    border-top: 4px solid var(--strength-color, transparent);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, var(--strength-glow, transparent) 0%, transparent 52%);
}

/* Depth shadows — inner dark edge + outer strength glow */
.day-card:hover {
    background-color: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

.day-card.strength-0 {
    --strength-color: rgba(255, 255, 255, 0.35);
    --strength-glow: rgba(255, 255, 255, 0.04);
}
.day-card.strength-5 {
    --strength-color: rgba(103, 247, 241, 0.85);
    --strength-glow: rgba(103, 247, 241, 0.1);
}
.day-card.strength-10 {
    --strength-color: rgba(0, 255, 0, 0.8);
    --strength-glow: rgba(0, 255, 0, 0.08);
}
.day-card.strength-15 {
    --strength-color: rgba(255, 240, 0, 0.88);
    --strength-glow: rgba(255, 240, 0, 0.1);
}
.day-card.strength-20 {
    --strength-color: rgba(255, 92, 87, 0.9);
    --strength-glow: rgba(255, 92, 87, 0.12);
}
.day-card.strength-25 {
    --strength-color: rgba(255, 68, 216, 0.88);
    --strength-glow: rgba(255, 68, 216, 0.12);
}
.day-card.strength-30 {
    --strength-color: rgba(255, 102, 255, 0.88);
    --strength-glow: rgba(255, 102, 255, 0.12);
}
.day-card.strength-35 {
    --strength-color: rgba(188, 123, 255, 0.88);
    --strength-glow: rgba(188, 123, 255, 0.12);
}
.day-card.strength-40 {
    --strength-color: rgba(122, 122, 255, 0.88);
    --strength-glow: rgba(122, 122, 255, 0.12);
}

.day-card.weather-sunny {
    background:
        radial-gradient(circle at 22% 14%, rgba(255, 210, 104, 0.14) 0, rgba(255, 210, 104, 0.05) 18%, transparent 42%),
        linear-gradient(180deg, rgba(25, 55, 80, 0.3) 0%, rgba(18, 45, 68, 0.4) 100%);
}

.day-card.weather-partly {
    background:
        radial-gradient(circle at 24% 14%, rgba(255, 205, 112, 0.1) 0, rgba(255, 205, 112, 0.04) 16%, transparent 36%),
        linear-gradient(180deg, rgba(22, 50, 76, 0.3) 0%, rgba(18, 45, 68, 0.4) 100%);
}

.day-card.weather-cloudy {
    background: linear-gradient(180deg, rgba(28, 55, 78, 0.35) 0%, rgba(20, 46, 68, 0.45) 100%);
}

.day-card.weather-fog {
    background: linear-gradient(180deg, rgba(30, 58, 80, 0.32) 0%, rgba(22, 48, 70, 0.42) 100%);
}

.day-card.weather-rain {
    background: linear-gradient(180deg, rgba(22, 48, 75, 0.38) 0%, rgba(16, 40, 65, 0.48) 100%);
}

.day-card.weather-snow {
    background: linear-gradient(180deg, rgba(30, 58, 82, 0.32) 0%, rgba(22, 50, 72, 0.42) 100%);
}

.day-card.weather-storm {
    background:
        radial-gradient(circle at 18% 14%, rgba(160, 130, 220, 0.1) 0, rgba(160, 130, 220, 0.04) 16%, transparent 36%),
        linear-gradient(180deg, rgba(24, 42, 68, 0.4) 0%, rgba(18, 36, 58, 0.5) 100%);
}

.day-card.weather-mixed {
    background: linear-gradient(180deg, rgba(26, 52, 76, 0.34) 0%, rgba(20, 45, 68, 0.44) 100%);
}

/* Good wind day glow */
.day-card-good {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(97, 214, 199, 0.15),
        0 20px 42px rgba(97, 214, 199, 0.08);
}

.day-card-good .day-card-head {
    background: linear-gradient(135deg, rgba(21, 190, 210, 0.14), rgba(97, 214, 199, 0.1));
}

/* ===== DAY CARD HEADER ===== */
.day-card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 0.72rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 2;
}

.day-card-head-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: transform 0.5s ease;
}

.day-card-map-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    background: rgba(21, 190, 210, 0.15);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0;
    position: absolute;
    right: 0.72rem;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.day-card-map-btn svg {
    flex-shrink: 0;
}

.day-card-map-btn:hover {
    background: rgba(21, 190, 210, 0.3);
}

.day-card:hover .day-card-head-left {
    transform: translateX(calc(-50% + 0.36rem));
}

.day-card:hover .day-card-map-btn {
    opacity: 1;
    pointer-events: auto;
}

.day-card-name {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--card-text-dim);
}

.day-card-name.weekend { color: #f0b840; }
.day-card-alert .day-card-name { color: var(--accent); }

.day-card-date {
    font-size: 0.75rem;
    color: var(--card-text-muted);
    font-family: 'Space Mono', monospace;
}

.day-good-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(97, 214, 199, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

/* ===== DAY CARD SUMMARY ===== */
.day-card-summary {
    padding: 0.95rem 0.78rem 0.78rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.38rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 2;
}

.day-weather-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.day-weather-icon {
    font-size: 1.55rem;
    line-height: 1;
}

.day-weather-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 800;
    color: var(--card-text-muted);
}

.day-wind-main {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.day-wind-arrow {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--accent);
    display: inline-block;
    transition: transform 0.3s;
}

.day-wind-avg {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    letter-spacing: -0.06em;
    line-height: 1;
    color: var(--card-text);
}

.wind-color-0  { color: rgba(255, 255, 255, 0.55); }
.wind-color-5  { color: #00c8c8; }
.wind-color-10 { color: #0bbb44; }
.wind-color-15 { color: #d7a400; }
.wind-color-20 { color: #f55d56; }
.wind-color-25 { color: #ee3ac3; }
.wind-color-30 { color: #e850f1; }
.wind-color-35 { color: #9854f0; }
.wind-color-40 { color: #5f74ff; }

.day-wind-unit {
    font-size: 0.72rem;
    color: var(--card-text-muted);
    font-weight: 700;
    align-self: flex-end;
    margin-bottom: 0.15rem;
}

.day-wind-caption {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--card-text-muted);
    font-weight: 800;
}

.day-wind-extra { display: flex; gap: 0.75rem; }

.day-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.day-stat-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--card-text-muted);
    font-weight: 700;
}

.day-stat-val {
    font-size: 0.86rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--card-text-dim);
}

/* ===== DAY CARD WEATHER (temp + rain) ===== */
.day-card-weather {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    padding: 0.58rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    position: relative;
    z-index: 2;
}

.weather-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.weather-icon { font-size: 0.72rem; font-weight: 700; color: var(--card-text-muted); }

.weather-val {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--card-text-dim);
}

.rain-med { color: #f0b840; }
.rain-high { color: #e25555; }

/* ===== HOURLY BAR CHART ===== */
.hour-bars {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 0.78rem 0.75rem 0.5rem;
    height: 218px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.hour-bar-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-start;
    gap: 0.45rem;
    cursor: default;
    position: relative;
    border-radius: 12px;
}

.hour-bar-col:hover .hour-bar {
    filter: brightness(1.12);
    outline: 1px solid rgba(255, 255, 255, 0.2);
}

/* Wind speed label on hover */
.hour-bar::after {
    content: attr(data-wind-display) "kt";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 4px)) scale(0.96);
    color: #0a2230;
    font-family: 'Space Mono', monospace;
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    text-shadow: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 10;
}

.hour-bar-col:hover .hour-bar::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hour-bar-col.daytime { background: rgba(255, 255, 255, 0.04); }

.hour-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.26rem;
    min-height: 62px;
    padding-top: 0.08rem;
}

.hour-bar-wrap {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: visible;
}

.hour-bar {
    width: 100%;
    min-height: 30px;
    border-radius: 10px 10px 0 0;
    transition: filter 0.12s linear;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hour-dir {
    font-size: 1.04rem;
    color: var(--card-text-dim);
    display: inline-block;
    line-height: 1;
}

.hour-lbl {
    font-size: 0.7rem;
    color: var(--card-text-dim);
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hour-weather { font-size: 1.12rem; line-height: 1; }

/* Kite size badge */
.kite-badge {
    position: absolute;
    left: 50%;
    bottom: clamp(6px, calc(var(--bar-height) + 6px), calc(100% - 22px));
    transform: translateX(-50%);
    width: 30px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 6;
    background: transparent;
}

.kite-badge-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.kite-badge.wc-0,
.kite-badge.wc-5,
.kite-badge.wc-10,
.kite-badge.wc-15,
.kite-badge.wc-20,
.kite-badge.wc-25,
.kite-badge.wc-30,
.kite-badge.wc-35,
.kite-badge.wc-40 {
    background: transparent;
}

.kite-badge-size {
    position: absolute;
    left: 30%;
    top: 67%;
    transform: translate(-50%, -50%);
    min-width: 0;
    text-align: left;
    font-family: 'Space Mono', monospace;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    color: #0a2230;
    text-shadow: none;
}

.kite-badge-danger {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    box-shadow: none;
}

.kite-skull-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.2rem;
    line-height: 1;
}

/* Windguru-style wind palette sampled from their default gradient */
.wc-0  { --wind-color: #ffffff; background: var(--wind-color); }
.wc-5  { --wind-color: #67f7f1; background: var(--wind-color); }
.wc-10 { --wind-color: #00ff00; background: var(--wind-color); }
.wc-15 { --wind-color: #fff000; background: var(--wind-color); }
.wc-20 { --wind-color: #ff322c; background: var(--wind-color); }
.wc-25 { --wind-color: #ff0ac8; background: var(--wind-color); }
.wc-30 { --wind-color: #ff00ff; background: var(--wind-color); }
.wc-35 { --wind-color: #9632ff; background: var(--wind-color); }
.wc-40 { --wind-color: #3c3cff; background: var(--wind-color); }

/* ===== LEGEND ===== */
.legend {
    --text: var(--card-text);
    --text-dim: var(--card-text-dim);
    --text-muted: var(--card-text-muted);

    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-top: 0;
    background: linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    font-size: 0.82rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: var(--card-text);
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
}

.legend-title { color: var(--card-text-muted); font-weight: 700; }

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--card-text-dim);
}

.legend-swatch {
    display: inline-block;
    width: 1.5rem;
    height: 1rem;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.legend-swatch.wc-0  { background: #ffffff; }
.legend-swatch.wc-5  { background: #67f7f1; }
.legend-swatch.wc-10 { background: #00ff00; }
.legend-swatch.wc-15 { background: #fff000; }
.legend-swatch.wc-20 { background: #ff322c; }
.legend-swatch.wc-25 { background: #ff0ac8; }
.legend-swatch.wc-30 { background: #ff00ff; }
.legend-swatch.wc-35 { background: #9632ff; }
.legend-swatch.wc-40 { background: #3c3cff; }

/* ===== ERROR ===== */
.error-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: var(--red);
    font-size: 0.9rem;
    background: rgba(217, 101, 106, 0.08);
}

/* ===== SETTINGS ===== */
.settings-card {
    --text: var(--card-text);
    --text-dim: var(--card-text-dim);
    --text-muted: var(--card-text-muted);

    margin-bottom: 1.5rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: var(--card-text);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--card-text);
}

.card-header h3 { font-size: 1rem; font-weight: 800; }
.card-header svg { color: var(--accent); }

.settings-card form,
.settings-card .table-wrap {
    padding: 1.25rem 1.5rem;
}

.table-wrap { overflow-x: auto; }

.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.settings-table th {
    text-align: left;
    padding: 0.45rem 0.5rem;
    color: var(--card-text-muted);
    font-weight: 800;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-table td { padding: 0.4rem 0.5rem; }
.settings-table tr + tr td { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.add-row td { border-top: 2px solid rgba(255, 255, 255, 0.08) !important; }
.actions { display: flex; gap: 0.35rem; white-space: nowrap; }

.card-note {
    padding: 0 1.5rem 1.2rem;
    color: var(--card-text-muted);
    font-size: 0.84rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--card-text-dim);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

input, select {
    width: 100%;
    padding: 0.62rem 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--card-text);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: none;
}

input:focus, select:focus {
    outline: none;
    border-color: rgba(21, 190, 210, 0.42);
    box-shadow: 0 0 0 4px rgba(21, 190, 210, 0.12);
    background: rgba(255, 255, 255, 0.12);
}

.input-sm { padding: 0.42rem 0.62rem; font-size: 0.84rem; }

.secret-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.secret-field input {
    flex: 1;
    min-width: 0;
}

.secret-toggle {
    flex: 0 0 auto;
    min-width: 4.5rem;
}

/* Day checkboxes */
.day-checks { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.day-check { position: relative; }
.day-check input { position: absolute; opacity: 0; width: 0; height: 0; }

.day-label {
    display: block;
    padding: 0.44rem 0.84rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--card-text-dim);
    background: rgba(255, 255, 255, 0.06);
}

.day-check input:checked + .day-label {
    background: linear-gradient(135deg, rgba(21, 190, 210, 0.2), rgba(97, 214, 199, 0.15));
    border-color: rgba(21, 190, 210, 0.3);
    color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--card-text);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: none;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-accent {
    background: linear-gradient(135deg, var(--accent), #58d6de);
    border-color: rgba(21, 190, 210, 0.22);
    color: white;
    box-shadow: 0 12px 24px rgba(21, 190, 210, 0.22);
}
.btn-accent:hover { background: linear-gradient(135deg, var(--accent-dim), #3fc6d1); border-color: rgba(8, 152, 177, 0.22); }
.btn-outline { background: rgba(255, 255, 255, 0.06); border-color: rgba(21, 190, 210, 0.2); color: var(--accent); }
.btn-outline:hover { background: rgba(21, 190, 210, 0.12); }
.btn-danger { background: rgba(255, 255, 255, 0.06); border-color: rgba(217, 101, 106, 0.2); color: var(--red); }
.btn-danger:hover { background: rgba(217, 101, 106, 0.12); }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Toasts */
.toast {
    padding: 0.82rem 1.25rem;
    border-radius: 18px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.toast-ok {
    background: rgba(97, 214, 199, 0.15);
    color: #61d6c7;
}

.toast-err {
    background: rgba(217, 101, 106, 0.15);
    color: #e87a7f;
}

/* ===== HISTORY ===== */
.history-list { display: flex; flex-direction: column; gap: 0.9rem; }

.history-card {
    --text: var(--card-text);
    --text-dim: var(--card-text-dim);
    --text-muted: var(--card-text-muted);

    background: linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: var(--card-text);
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
}

.history-spot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    color: var(--accent);
}

.history-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--card-text-muted);
}

.history-period { color: var(--card-text-dim); }

.history-message {
    padding: 1rem 1.25rem;
    font-size: 0.84rem;
    font-family: 'Space Mono', monospace;
    white-space: pre-wrap;
    color: var(--card-text-dim);
    background: transparent;
    border: none;
    margin: 0;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state p { margin-top: 1rem; font-size: 1.08rem; }
.empty-hint { font-size: 0.9rem !important; color: var(--text-muted); opacity: 0.84; }

/* ===== WIND MAP ===== */
.page-map .main-content {
    max-width: none;
    padding: 0;
}

.map-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#wind-map {
    width: 100%;
    height: calc(100% - 64px);
}

.wind-heatmap { image-rendering: auto; filter: saturate(1.08); }

.map-expanding {
    display: none;
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    background: rgba(255, 248, 238, 0.55);
    backdrop-filter: blur(14px);
    color: var(--text-dim);
    font-size: 0.76rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(210, 175, 130, 0.25);
    box-shadow: var(--shadow-sm);
    pointer-events: none;
}

/* Floating controls */
.map-ctrl {
    position: absolute;
    z-index: 1000;
    background: rgba(255, 248, 238, 0.6);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(210, 175, 130, 0.25);
    border-radius: 18px;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}

.map-ctrl-top-left {
    top: 12px;
    left: 12px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Timeline bar */
.map-timeline-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    align-items: stretch;
    height: 64px;
    background: rgba(14, 24, 40, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

.timeline-left {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    scrollbar-width: none;
}
.timeline-scroll::-webkit-scrollbar { display: none; }

.timeline-track {
    display: flex;
    height: 100%;
    position: relative;
}

.timeline-day {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.timeline-day:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.timeline-day:nth-child(even) { background: rgba(21, 190, 210, 0.04); }

.timeline-day-label {
    font-size: 0.64rem;
    font-weight: 800;
    color: var(--card-text-dim);
    text-align: center;
    height: 24px;
    line-height: 24px;
    white-space: nowrap;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 4px;
    text-transform: uppercase;
}

.timeline-hours {
    display: flex;
    height: 40px;
    align-items: stretch;
}

.timeline-cell {
    width: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    font-family: 'Space Mono', monospace;
    color: rgba(180, 200, 220, 0.5);
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    user-select: none;
}
.timeline-cell:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--card-text-dim);
}
.timeline-cell.is-midnight {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.timeline-cell.is-active {
    background: linear-gradient(135deg, var(--accent), #58d6de);
    color: white;
    font-weight: 700;
}

.timeline-right {
    display: flex;
    align-items: center;
    padding: 0 12px;
    flex-shrink: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.model-select-timeline {
    width: auto;
    min-width: 92px;
    padding: 0.4rem 0.68rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--card-text);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--card-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: none;
}

.map-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.days-select {
    width: auto !important;
    min-width: 58px;
    padding: 0.4rem 0.68rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

/* Legend bar */
.map-legend-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--card-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.map-legend-bar {
    display: flex;
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
}

.map-legend-bar span {
    flex: 1;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    line-height: 16px;
    color: #fff;
    min-width: 22px;
}

/* Loading overlay */
.map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(254, 246, 236, 0.92), rgba(253, 232, 208, 0.95));
    z-index: 2000;
    color: var(--text);
}

.map-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 2.4rem;
    background: rgba(10, 20, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    color: var(--card-text);
}

/* Kite pump scene */
.kite-pump-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.kite-svg {
    flex-shrink: 0;
}

/* Pump */
.pump-assembly {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.pump-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 18px;
}

.pump-handle {
    width: 28px;
    height: 6px;
    background: #7a95a6;
    border-radius: 3px;
    position: relative;
    animation: pump-action 0.8s ease-in-out infinite;
}
.pump-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 3px;
    height: 20px;
    background: #8ab0c4;
    border-radius: 1px;
}

.pump-cylinder {
    width: 14px;
    height: 30px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px 2px 0 0;
    margin-top: 20px;
}

.pump-base {
    width: 22px;
    height: 5px;
    background: #7b96a4;
    border-radius: 0 0 2px 2px;
}

.pump-hose {
    width: 1.5px;
    height: 10px;
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 2px;
}

@keyframes pump-action {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(18px); }
}

/* Progress bar */
.loading-progress-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 220px;
}

.loading-status {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--card-text-muted);
    letter-spacing: 0.02em;
}

.loading-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22d3ee, #06b6d4);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Leaflet light overrides */
.leaflet-container {
    background: #1a2a3a !important;
}

.leaflet-control-zoom a {
    background: rgba(14, 24, 40, 0.8) !important;
    color: var(--card-text) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
    background: rgba(14, 24, 40, 0.92) !important;
}

.leaflet-control-attribution {
    background: rgba(14, 24, 40, 0.6) !important;
    color: var(--card-text-muted) !important;
    font-size: 0.65rem !important;
}

.leaflet-control-attribution a {
    color: var(--card-text-muted) !important;
}

/* Spot tooltip on map */
.spot-tooltip {
    background: rgba(14, 24, 40, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--card-text) !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-sm) !important;
}

.spot-tooltip::before {
    border-top-color: rgba(14, 24, 40, 0.88) !important;
}

/* Mini card tooltip on map spot hover */
.spot-minicard-tooltip {
    background: rgba(14, 24, 40, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    font-family: 'Manrope', sans-serif !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000 !important;
}

.spot-minicard-tooltip::before {
    border-top-color: rgba(14, 24, 40, 0.94) !important;
}

.spot-minicard-popup .leaflet-popup-content-wrapper {
    background: rgba(14, 24, 40, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    font-family: 'Manrope', sans-serif !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 !important;
}

.spot-minicard-popup .leaflet-popup-content {
    margin: 0 !important;
    min-width: 180px;
}

.spot-minicard-popup .leaflet-popup-tip {
    background: rgba(14, 24, 40, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: none !important;
    border-left: none !important;
}

.spot-minicard-popup .leaflet-popup-close-button {
    display: none !important;
}

.spot-minicard {
    padding: 10px 14px;
    min-width: 180px;
}

.mc-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

.mc-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #e4ecf4;
}

.mc-time {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
}

.mc-weather {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mc-weather-icon {
    font-size: 1rem;
    line-height: 1;
}

.mc-weather-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.mc-ride {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.mc-ride-val {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.mc-ride-unit {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.mc-ride.wc-0  .mc-ride-val { color: rgba(255, 255, 255, 0.55); }
.mc-ride.wc-5  .mc-ride-val { color: #67f7f1; }
.mc-ride.wc-10 .mc-ride-val { color: #00ff00; }
.mc-ride.wc-15 .mc-ride-val { color: #fff000; }
.mc-ride.wc-20 .mc-ride-val { color: #ff322c; }
.mc-ride.wc-25 .mc-ride-val { color: #ff0ac8; }
.mc-ride.wc-30 .mc-ride-val { color: #ff00ff; }
.mc-ride.wc-35 .mc-ride-val { color: #9632ff; }
.mc-ride.wc-40 .mc-ride-val { color: #3c3cff; }

.mc-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}

.mc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.mc-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mc-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: #e4ecf4;
}

.mc-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-wind-col {
    flex: 1;
}

.mc-kite-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-kite {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.mc-kite-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.mc-kite-size {
    font-size: 0.75rem;
    font-weight: 900;
    color: #e4ecf4;
}

.mc-kite-danger {
    background: rgba(255, 40, 40, 0.2);
}

.mc-kite-danger .mc-kite-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: #ff4444;
}

.mc-forecast-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(21, 190, 210, 0.15);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.18s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mc-forecast-btn:hover {
    background: rgba(21, 190, 210, 0.3);
}

.mc-forecast-btn svg {
    flex-shrink: 0;
}

.mc-dir {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mc-dir-arrow {
    font-size: 1rem;
    color: #15bed2;
    display: inline-block;
    line-height: 1;
}

.mc-dir-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== RESPONSIVE ===== */

/* Large desktop (1440+) — generous spacing */
@media (min-width: 1440px) {
    .nav-inner { padding: 0.8rem 1.8rem; }
}

/* Medium desktop / laptop (1024–1279) — 3 cards base, 4 for 5d+ */
@media (max-width: 1279px) {
    .days-5 .day-card { flex: 0 0 calc(100% / 3); max-width: calc(100% / 3); }
    .days-7 .day-card,
    .days-10 .day-card,
    .days-14 .day-card { flex: 0 0 calc(100% / 3); max-width: calc(100% / 3); }
}

/* Small laptop / large tablet (768–1023) */
@media (max-width: 1023px) {
    html { font-size: 16px; }
    .page-dashboard .page-header { min-height: 220px; }
    .page-title { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
    .spot-header { padding: 1.1rem 1.2rem; }
    .spot-name { font-size: 1.25rem; }
    .day-card { flex: 0 0 calc(100% / 2); max-width: calc(100% / 2); min-height: 460px; }
    .days-5 .day-card,
    .days-7 .day-card,
    .days-10 .day-card,
    .days-14 .day-card { flex: 0 0 calc(100% / 2); max-width: calc(100% / 2); min-height: 460px; }
    .days-5 { overflow-x: auto; scroll-snap-type: x mandatory; cursor: grab; }
    .hour-bars { height: 190px; gap: 6px; }
    .form-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* Tablet portrait (600–767) */
@media (max-width: 767px) {
    html { font-size: 15px; }
    body { background-attachment: scroll; }
    .nav-inner { padding: 0.7rem 0.8rem; min-height: 60px; }
    .nav-link { padding: 0.55rem 0.8rem; font-size: 0.84rem; }
    .main-content { padding: 1.5rem 1rem 3.25rem; }
    .page-dashboard .page-header {
        min-height: 180px;
        padding: clamp(1.2rem, 3vw, 2rem);
        background:
            linear-gradient(180deg, rgba(20, 50, 75, 0.9) 0%, rgba(20, 50, 75, 0.7) 60%, transparent 100%),
            url('/static/hero-kitesurf.svg') no-repeat center center / cover,
            linear-gradient(180deg, rgba(20, 50, 75, 0.75) 0%, rgba(16, 42, 65, 0.8) 100%);
    }
    .page-dashboard .page-title { max-width: none; }
    .spot-header { padding: 1rem; flex-direction: column; align-items: flex-start; }
    .spot-header-side { align-items: flex-start; }
    .day-card { flex: 0 0 calc(100% / 2); max-width: calc(100% / 2); min-height: 440px; }
    .days-5 .day-card,
    .days-7 .day-card,
    .days-10 .day-card,
    .days-14 .day-card { flex: 0 0 calc(100% / 2); max-width: calc(100% / 2); min-height: 440px; }
    .hour-bars { height: 172px; gap: 5px; padding: 0.55rem 0.55rem 0.35rem; }
    .hour-top { min-height: 42px; }
    .kite-badge { width: 27px; height: 24px; bottom: clamp(5px, calc(var(--bar-height) + 4px), calc(100% - 18px)); }
    .hour-bar { min-height: 26px; }
    .kite-badge-size { font-size: 0.66rem; left: 31%; top: 67%; }
    .kite-badge-danger { width: 27px; height: 27px; }
    .kite-skull-icon { width: 100%; height: 100%; }
    .forecast-tabs { flex-wrap: wrap; width: auto; }
    .legend { gap: 0.6rem; padding: 0.8rem 1rem; font-size: 0.76rem; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .settings-card form,
    .settings-card .table-wrap { padding: 1rem; }
    .map-wrap { top: 0; }
    .map-timeline-bar { height: 58px; }
    #wind-map { height: calc(100% - 58px); }
    .timeline-day-label { height: 22px; line-height: 22px; font-size: 0.58rem; }
    .timeline-hours { height: 36px; }
    .timeline-cell { width: 22px; font-size: 0.5rem; }
    .dashboard-controls { gap: 0.75rem; }
}

/* Phone (≤599px) — mobile bottom nav + full layout */
@media (max-width: 599px) {
    html { font-size: 15px; }

    /* --- Top nav: minimal header --- */
    .top-nav { padding: 0.5rem 0.6rem 0; }
    .nav-inner {
        padding: 0.5rem 0.75rem;
        min-height: 48px;
        border-radius: 18px;
    }
    .logo-icon { width: 2rem; height: 2rem; }
    .logo-text { font-size: 1.02rem; }

    /* --- Bottom tab bar (non-map pages) --- */
    body:not(.page-map) .nav-links {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        display: flex;
        justify-content: space-around;
        gap: 0;
        padding: 0.3rem 0.5rem;
        padding-bottom: max(0.3rem, env(safe-area-inset-bottom));
        background: rgba(14, 24, 40, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
        flex-wrap: nowrap;
        border-radius: 0;
    }

    body:not(.page-map) .nav-link {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        padding: 0.3rem 0.15rem;
        border-radius: 12px;
        min-height: 48px;
    }

    body:not(.page-map) .nav-link svg { width: 22px; height: 22px; }

    body:not(.page-map) .nav-label {
        display: block;
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        white-space: nowrap;
    }

    body:not(.page-map) .nav-link:hover,
    body:not(.page-map) .nav-link:active {
        transform: none;
        background: rgba(255, 255, 255, 0.08);
    }

    body:not(.page-map) .nav-link.active {
        background: rgba(21, 190, 210, 0.15);
    }

    /* --- Map page: keep top nav compact with icons --- */
    .page-map .nav-label { display: none; }
    .page-map .nav-link { padding: 0.45rem; }
    .page-map .nav-inner { min-height: 44px; padding: 0.4rem 0.65rem; }

    /* --- Main content spacing with bottom nav --- */
    body:not(.page-map) .main-content {
        padding: 1rem 0.75rem calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
    .page-map .main-content { padding: 0; }

    /* --- Dashboard header --- */
    .page-dashboard .page-header {
        min-height: 140px;
        border-radius: 20px;
        padding: 1.2rem;
    }
    .page-title { font-size: clamp(1.5rem, 5vw, 2rem); }
    .page-subtitle { font-size: 0.85rem; margin-top: 0.3rem; }

    /* --- Dashboard controls: stack vertically --- */
    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-bottom: 1.25rem;
    }

    .forecast-tabs {
        padding: 0.28rem;
        gap: 0.2rem;
        width: 100%;
        flex-shrink: 1;
    }
    .tab {
        padding: 0.48rem 0.85rem;
        font-size: 0.8rem;
        flex: 1;
        text-align: center;
        min-width: 0;
    }

    .legend {
        width: 100%;
        margin-left: 0;
        gap: 0.4rem 0.6rem;
        padding: 0.6rem 0.75rem;
        font-size: 0.72rem;
        justify-content: center;
    }
    .legend-swatch { width: 1.15rem; height: 0.7rem; }

    /* --- Spot cards --- */
    .spot-card { border-radius: 20px; margin-bottom: 1.25rem; }
    .spot-header { padding: 0.9rem 1rem; gap: 0.75rem; }
    .spot-name { font-size: 1.2rem; }
    .spot-country { font-size: 0.82rem; }
    .alert-badge { font-size: 0.78rem; padding: 0.42rem 0.8rem; }

    /* --- Day cards: single column swipe --- */
    .day-card { flex: 0 0 100%; max-width: 100%; min-height: 0; }
    .days-5 .day-card,
    .days-7 .day-card,
    .days-10 .day-card,
    .days-14 .day-card { flex: 0 0 100%; max-width: 100%; min-height: 0; }

    /* Day card header: show map button always on mobile */
    .day-card-head { justify-content: space-between; }
    .day-card-map-btn {
        opacity: 0.8;
        position: static;
        pointer-events: auto;
    }
    .day-card-head-left { transform: none !important; }
    .day-card:hover .day-card-head-left { transform: none; }

    /* --- Model tabs --- */
    .model-tabs-bar { gap: 0.25rem; padding: 0.5rem 0.5rem 0; }
    .model-tab { padding: 0.6rem 0.5rem; }
    .model-tab-label { font-size: 0.82rem; }
    .model-tab-tagline { font-size: 0.62rem; }
    .model-panels-wrap { padding: 0 0.5rem 0.5rem; }

    /* --- Hour bars --- */
    .hour-bars { height: 170px; gap: 4px; padding: 0.5rem 0.5rem 0.35rem; }
    .hour-top { min-height: 40px; gap: 0.15rem; }
    .hour-lbl { font-size: 0.6rem; }
    .hour-weather { font-size: 0.95rem; }
    .hour-dir { font-size: 0.88rem; }
    .kite-badge { width: 26px; height: 23px; }
    .kite-badge-size { font-size: 0.64rem; }
    .kite-badge-danger { width: 26px; height: 26px; }

    /* Touch-reveal wind speed on tap */
    .hour-bar-col:active .hour-bar::after {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    /* --- Inputs: prevent iOS zoom --- */
    input, select, textarea { font-size: 16px; }
    .input-sm { font-size: 16px; padding: 0.45rem 0.6rem; }

    /* --- Settings --- */
    .settings-card { border-radius: 20px; }
    .card-header { padding: 0.85rem 1rem; }
    .settings-card form,
    .settings-card .table-wrap { padding: 0.85rem; }
    .form-grid { grid-template-columns: 1fr; }
    .btn { padding: 0.6rem 1.1rem; min-height: 44px; }
    .btn-sm { padding: 0.4rem 0.7rem; min-height: 36px; }
    .btn-row { gap: 0.5rem; }

    /* Settings table → stacked cards on mobile */
    .settings-table thead { display: none; }
    .settings-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    .settings-table tr {
        display: block;
        padding: 0.75rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    .settings-table tr + tr td { border-top: none; }
    .settings-table td {
        display: block;
        padding: 0.2rem 0;
    }
    .settings-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 0.62rem;
        font-weight: 800;
        color: var(--card-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.07em;
        margin-bottom: 0.2rem;
    }
    .settings-table .actions { padding-top: 0.4rem; }
    .settings-table .actions::before { display: none; }
    .add-row td { border-top: none !important; }
    .add-row { border: 1px dashed rgba(21, 190, 210, 0.25) !important; }

    /* --- Map mobile --- */
    .map-timeline-bar { height: 54px; }
    #wind-map { height: calc(100% - 54px); }
    .timeline-cell { width: 26px; font-size: 0.52rem; min-height: 34px; }
    .timeline-left { padding: 0 8px; }
    .timeline-right { padding: 0 8px; }
    .map-btn { width: 38px; height: 38px; }
    .timeline-day-label { height: 20px; line-height: 20px; font-size: 0.56rem; }
    .timeline-hours { height: 34px; }
    .map-ctrl-top-left { top: 58px; left: 8px; }
    .map-loading-inner { padding: 1.5rem 1.8rem; border-radius: 24px; }

    /* --- History --- */
    .history-card { border-radius: 20px; }
    .history-meta { padding: 0.75rem 1rem; gap: 0.75rem; font-size: 0.82rem; }
    .history-message { padding: 0.75rem 1rem; font-size: 0.78rem; }

    /* --- Empty state --- */
    .empty-state { padding: 3rem 1.5rem; }
}

/* Small phone (≤479px) */
@media (max-width: 479px) {
    html { font-size: 14.5px; }

    .nav-inner { padding: 0.4rem 0.6rem; min-height: 42px; }
    .logo-icon { width: 1.75rem; height: 1.75rem; }
    .logo-text { font-size: 0.9rem; }

    .page-dashboard .page-header { min-height: 115px; border-radius: 16px; padding: 0.9rem; }
    .page-title { font-size: 1.35rem; }
    .page-subtitle { font-size: 0.8rem; }

    .spot-card { border-radius: 16px; margin-bottom: 0.9rem; }
    .spot-name { font-size: 1.05rem; }
    .spot-country { font-size: 0.76rem; }
    .alert-badge { font-size: 0.72rem; padding: 0.35rem 0.65rem; }

    .day-card-summary { padding: 0.65rem 0.55rem 0.55rem; }
    .day-wind-avg { font-size: 1.75rem; }
    .day-card-weather { font-size: 0.76rem; gap: 0.65rem; }

    .hour-bars { height: 145px; gap: 3px; padding: 0.35rem 0.35rem 0.25rem; }
    .hour-top { min-height: 32px; }
    .hour-lbl { font-size: 0.54rem; }
    .hour-weather { font-size: 0.85rem; }
    .hour-dir { font-size: 0.8rem; }

    .model-panels-wrap { padding: 0 0.4rem 0.4rem; }
    .model-tabs-bar { padding: 0.4rem 0.4rem 0; }

    body:not(.page-map) .main-content {
        padding: 0.75rem 0.5rem calc(4.2rem + env(safe-area-inset-bottom, 0px));
    }

    .legend { padding: 0.5rem 0.6rem; gap: 0.3rem 0.5rem; font-size: 0.66rem; }
    .legend-swatch { width: 1rem; height: 0.6rem; }

    .forecast-tabs { padding: 0.22rem; }
    .tab { padding: 0.4rem 0.65rem; font-size: 0.76rem; }

    body:not(.page-map) .nav-link { min-height: 44px; }
    body:not(.page-map) .nav-label { font-size: 0.55rem; }
    body:not(.page-map) .nav-link svg { width: 20px; height: 20px; }

    /* Timeline touch targets */
    .timeline-cell { width: 28px; min-height: 34px; }

    /* Day checks wrap better */
    .day-checks { gap: 0.3rem; }
    .day-label { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
}

/* Touch devices: disable hover effects, show map buttons */
@media (hover: none) {
    .nav-link:hover { transform: none; }
    .day-card:hover { transform: none; background-color: transparent; }
    .btn:hover { transform: none; }
    .map-btn:hover { transform: none; }

    .day-card .day-card-map-btn {
        opacity: 0.7;
        pointer-events: auto;
    }
    .day-card .day-card-head-left {
        transform: none !important;
    }
    .day-card:hover .day-card-head-left {
        transform: none;
    }
}
