:root {
    color-scheme: dark;
    --bg: #06111f;
    --bg-2: #081a2d;
    --card: rgba(12, 29, 49, .82);
    --card-strong: rgba(14, 35, 59, .94);
    --ink: #f4f8ff;
    --muted: #8fa2bb;
    --line: rgba(148, 177, 214, .18);
    --line-strong: rgba(148, 177, 214, .30);
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #fb7185;
    --blue: #2f8cff;
    --cyan: #22d3ee;
    --purple: #a855f7;
    --shadow: 0 22px 60px rgba(0, 0, 0, .35);
    --glow: 0 0 38px rgba(47, 140, 255, .20);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { min-height: 100%; overflow-x: hidden; }

body {
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% -10%, rgba(34, 211, 238, .24), transparent 26rem),
        radial-gradient(circle at 90% 4%, rgba(47, 140, 255, .20), transparent 22rem),
        linear-gradient(160deg, #040b15 0%, #071629 42%, #06111f 100%);
    background-attachment: fixed;
}


body, .app-main, main {
    max-width: 100%;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.020) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 80%);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -.045em;
}

h2 {
    margin-bottom: 0;
    font-size: 1rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

h3 {
    font-size: .82rem;
    margin: 14px 0 8px;
    color: var(--muted);
    letter-spacing: .08em;
    text-transform: uppercase;
}

code { color: #bfdbfe; }

a { color: #93c5fd; }

.app-shell-header,
.hero {
    max-width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px clamp(16px, 4vw, 42px);
    border-bottom: 1px solid rgba(148, 177, 214, .12);
    background: rgba(3, 10, 20, .72);
    backdrop-filter: blur(18px);
}

.hero {
    grid-template-columns: minmax(280px, 1fr) auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #38bdf8 0%, #0ea5e9 38%, #2563eb 100%);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 0;
    border: 0;
    box-shadow: 0 12px 34px rgba(37, 99, 235, .38);
}

.brand-mark svg {
    display: block;
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand strong {
    display: block;
    font-size: 1.34rem;
    line-height: 1;
    letter-spacing: -.03em;
}

.brand small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.desktop-nav {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(7, 19, 34, .72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}


.nav-button,
.bottom-nav-item {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 10px 14px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    font-size: .90rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.nav-button:hover,
.bottom-nav-item:hover {
    color: var(--ink);
    background: rgba(96, 165, 250, .10);
    border-color: rgba(96, 165, 250, .16);
}

.nav-button.active,
.nav-toggle.active,
.bottom-nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #1556c9, #2388ff);
    border-color: rgba(147, 197, 253, .42);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .30), inset 0 1px 0 rgba(255,255,255,.16);
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(7, 19, 34, .72);
    border: 1px solid var(--line);
    padding: 8px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.toolbar label {
    font-size: .82rem;
    color: var(--muted);
    font-weight: 800;
}

.compact-toolbar { justify-self: end; }

select, button, input {
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    padding: 10px 12px;
    font: inherit;
    background: rgba(6, 18, 32, .92);
    color: var(--ink);
    outline: none;
}

select:focus,
button:focus-visible,
input:focus {
    border-color: rgba(96, 165, 250, .7);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .16);
}

button {
    background: linear-gradient(135deg, #1556c9, #2f8cff);
    color: white;
    border-color: rgba(147, 197, 253, .35);
    cursor: pointer;
    font-weight: 900;
}

button:disabled {
    opacity: .65;
    cursor: wait;
}

.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;
}

.app-main,
main {
    width: min(1480px, calc(100% - clamp(24px, 5vw, 72px)));
    margin: 0 auto;
    padding: 18px 0 calc(44px + var(--safe-area-bottom));
}

.mobile-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(15, 43, 72, .86), rgba(8, 24, 42, .72)),
        radial-gradient(circle at 78% 24%, rgba(34, 211, 238, .16), transparent 18rem);
    box-shadow: var(--shadow), var(--glow);
}

.hero-status-dot {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(74,222,128,.95), rgba(22,163,74,.18) 58%, transparent 60%);
    box-shadow: 0 0 32px rgba(74, 222, 128, .38);
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .72rem;
    color: var(--cyan);
    font-weight: 900;
}

.lead {
    color: var(--muted);
    max-width: 760px;
    margin-bottom: 0;
}

.status-strip {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 16px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(12, 29, 49, .72);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    border-left: 6px solid var(--muted);
    color: var(--ink);
    font: inherit;
    text-align: left;
    appearance: none;
    cursor: pointer;
}

.status-strip.ok { border-left-color: var(--ok); }
.status-strip.warn { border-left-color: var(--warn); }
.status-strip.bad { border-left-color: var(--bad); }

.status-strip:hover,
.status-strip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, .55);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .34), 0 0 0 2px rgba(96, 165, 250, .14);
    outline: none;
}

.status-strip.has-warnings:hover,
.status-strip.has-warnings:focus-visible {
    border-color: rgba(251, 191, 36, .55);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .34), 0 0 0 2px rgba(251, 191, 36, .14);
}

.status-strip.has-warnings #statusText::after {
    content: ' · Näytä huomautukset';
    color: var(--accent-2);
    font-weight: 800;
}

.dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--muted);
    box-shadow: 0 0 18px currentColor;
}
.status-strip.ok .dot { background: var(--ok); color: var(--ok); }
.status-strip.warn .dot { background: var(--warn); color: var(--warn); }
.status-strip.bad .dot { background: var(--bad); color: var(--bad); }

.timestamp {
    margin-left: auto;
    color: var(--muted);
    font-size: .88rem;
}

.view-panel { display: none; }
.view-panel.active { display: block; }

.cards {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-1 { grid-template-columns: 1fr; }

.card {
    background:
        linear-gradient(180deg, rgba(15, 39, 65, .86), rgba(8, 24, 42, .78));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
}

.card:hover {
    border-color: rgba(96, 165, 250, .26);
}

.metric {
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.metric::after {
    content: '';
    position: absolute;
    inset: auto -20% -45% 28%;
    height: 80px;
    background: radial-gradient(circle, rgba(34, 211, 238, .12), transparent 70%);
}

.metric-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    border-radius: 13px;
    background: rgba(34, 211, 238, .10);
    color: var(--cyan);
    font-size: 1.25rem;
    font-weight: 900;
}

.metric .label {
    display: block;
    color: var(--muted);
    font-weight: 900;
    font-size: .78rem;
    margin-bottom: 8px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.metric strong {
    position: relative;
    z-index: 1;
    display: block;
    font-size: clamp(1.28rem, 3vw, 1.85rem);
    line-height: 1.13;
    margin-bottom: 8px;
    letter-spacing: -.02em;
}

.metric small {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 900;
    font-size: .74rem;
    background: rgba(148, 163, 184, .16);
    color: #dbeafe;
    border: 1px solid var(--line);
    white-space: nowrap;
}

.pill.ok { background: rgba(34, 197, 94, .14); color: #86efac; border-color: rgba(74, 222, 128, .26); }
.pill.warn { background: rgba(245, 158, 11, .13); color: #fde68a; border-color: rgba(251, 191, 36, .26); }
.pill.bad { background: rgba(244, 63, 94, .13); color: #fecdd3; border-color: rgba(251, 113, 133, .28); }
.pill.muted { background: rgba(59, 130, 246, .13); color: #bfdbfe; border-color: rgba(96, 165, 250, .24); }


#warningsSection {
    scroll-margin-top: calc(var(--sticky-header-offset, 104px) + 14px);
}

.warnings {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.warnings li {
    border-radius: 16px;
    padding: 12px 13px;
    background: rgba(3, 10, 20, .44);
    border: 1px solid var(--line);
    border-left: 5px solid var(--muted);
    color: #e5eefb;
}

.warnings li.ok { border-left-color: var(--ok); }
.warnings li.warn { border-left-color: var(--warn); }
.warnings li.bad { border-left-color: var(--bad); }

.note {
    color: var(--muted);
    font-size: .90rem;
    margin: 16px 0 0;
    line-height: 1.55;
}

.note.compact { margin: 6px 0 12px; }

.title-with-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.profile-date-label {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid rgba(125, 192, 255, .34);
    border-radius: 999px;
    background: rgba(20, 58, 98, .54);
    color: #d9edff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
}


.info-button {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(147, 197, 253, .38);
    background: rgba(96, 165, 250, .14);
    color: #bfdbfe;
    font-size: .82rem;
    line-height: 1;
    font-weight: 1000;
    box-shadow: none;
}

.info-button:hover,
.info-button[aria-expanded="true"] {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, .92), rgba(34, 211, 238, .72));
    border-color: rgba(191, 219, 254, .62);
}

.info-panel {
    margin: -2px 0 14px;
    padding: 14px 15px;
    border: 1px solid rgba(147, 197, 253, .24);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(12, 29, 49, .96), rgba(3, 10, 20, .92));
    color: #dbeafe;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.05);
}

.info-panel[hidden] { display: none; }

.info-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.info-panel-header strong {
    color: #f4f8ff;
    font-size: .94rem;
}

.info-panel p {
    margin: 0;
    color: #b9cbe2;
    line-height: 1.55;
    font-size: .90rem;
}

.info-panel p + p { margin-top: 7px; }

.info-close {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, .12);
    border-color: rgba(148, 177, 214, .20);
    color: #dbeafe;
    box-shadow: none;
    font-size: 1.05rem;
    line-height: 1;
}


.raw {
    white-space: pre-wrap;
    overflow-x: auto;
    min-height: 58px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(2, 8, 15, .74);
    color: #dbeafe;
    border: 1px solid rgba(148, 177, 214, .14);
    font-family: "Cascadia Mono", Consolas, monospace;
    line-height: 1.55;
    font-size: .88rem;
}

.chart-card { min-height: 420px; }
.featured-chart { min-height: 460px; }

.chart-card canvas {
    width: 100% !important;
    height: 330px !important;
}

.chart-scroll-wrap {
    width: 100%;
    overflow-x: visible;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.chart-scroll-inner {
    width: 100%;
    min-width: 0;
}

.chart-scroll-inner canvas {
    display: block;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(3, 10, 20, .36);
}

.wind-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .9rem;
}

.wind-table th,
.wind-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 177, 214, .13);
    text-align: left;
    white-space: nowrap;
}

.wind-table th {
    background: rgba(148, 177, 214, .08);
    color: #a8bdd6;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.wind-table tbody tr:last-child td { border-bottom: 0; }
.wind-table tbody tr:nth-child(even) td { background: rgba(148, 177, 214, .035); }


/* Maatuulihistoria kuvastaa mennyttä aikaa neutraalimmalla, harmaalla värimaailmalla. */
.groundwind-history-card {
    background:
        linear-gradient(180deg, rgba(36, 43, 52, .84), rgba(17, 24, 35, .78));
    border-color: rgba(156, 163, 175, .22);
}

.groundwind-history-card:hover {
    border-color: rgba(209, 213, 219, .28);
}

.groundwind-history-card .section-heading h2,
.groundwind-history-card .note {
    color: #c4ccd7;
}

.wind-history-wrap {
    background: rgba(13, 18, 25, .58);
    border-color: rgba(156, 163, 175, .24);
}

.wind-table-history th,
.wind-table-history td {
    border-bottom-color: rgba(156, 163, 175, .16);
}

.wind-table-history th {
    background: rgba(156, 163, 175, .13);
    color: #cbd5e1;
}

.wind-table-history tbody tr:nth-child(even) td {
    background: rgba(156, 163, 175, .055);
}

.wind-table-history .wind-time,
.wind-table-history .wind-direction {
    color: #d1d5db;
}

.wind-table-history .wind-cell-main {
    color: #e5e7eb;
}

.wind-table-history .wind-cell-unit {
    color: #9ca3af;
}

.wind-table-history .wind-cell-kt {
    color: #b6beca;
}


/* Yhteenvedon maatuulitaulukko yhdistää harmaan havaintohistorian, korostetun nykyhetken ja lähiennusteen. */
.overview-groundwind-card {
    overflow: hidden;
}

.overview-groundwind-heading {
    align-items: flex-start;
}

.overview-groundwind-heading > div {
    min-width: 0;
}

.overview-groundwind-heading .note {
    margin-bottom: 0;
}

.overview-groundwind-wrap {
    margin-top: 12px;
}

.wind-table-overview tbody tr.overview-groundwind-history td {
    background: rgba(156, 163, 175, .055);
    border-bottom-color: rgba(156, 163, 175, .16);
    color: #c5ccd6;
}

.wind-table-overview tbody tr.overview-groundwind-history:nth-child(even) td {
    background: rgba(156, 163, 175, .085);
}

.wind-table-overview .overview-groundwind-history .wind-cell-main {
    color: #e5e7eb;
}

.wind-table-overview .overview-groundwind-history .wind-cell-unit,
.wind-table-overview .overview-groundwind-history .wind-cell-kt {
    color: #9ca3af;
}

.wind-table-overview tbody tr.overview-groundwind-now td {
    padding-top: 14px;
    padding-bottom: 14px;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, .28), rgba(34, 211, 238, .13)),
        rgba(7, 24, 43, .94);
    border-top: 1px solid rgba(96, 165, 250, .55);
    border-bottom: 1px solid rgba(34, 211, 238, .45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.wind-table-overview tbody tr.overview-groundwind-now td:first-child {
    border-left: 4px solid var(--cyan);
}

.wind-table-overview tbody tr.overview-groundwind-now .wind-cell-main {
    font-size: 1.12rem;
    color: #ffffff;
}

.overview-groundwind-separator td {
    height: 9px;
    padding: 0 !important;
    border: 0 !important;
    background: rgba(3, 10, 20, .62) !important;
}

.overview-now-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    margin-right: 9px;
    padding: 4px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1556c9, #22d3ee);
    color: #ffffff;
    font-size: .70rem;
    font-weight: 1000;
    letter-spacing: .08em;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
}

.overview-now-time {
    color: #eaf6ff;
    font-weight: 900;
}

.overview-wind-direction {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.overview-wind-direction > span:last-child {
    white-space: nowrap;
}

.overview-wind-arrow {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 999px;
    background: rgba(96, 165, 250, .12);
    border: 1px solid rgba(96, 165, 250, .20);
    color: #bfdbfe;
    font-size: 1rem;
    font-weight: 1000;
    transform: rotate(var(--wind-rotation, 0deg));
}

.overview-groundwind-history .overview-wind-arrow {
    background: rgba(156, 163, 175, .10);
    border-color: rgba(156, 163, 175, .20);
    color: #cbd5e1;
}

/* Tuuli-sivun havaintohistorian suunnanuolet pidetään muun historiataulukon tavoin harmaana. */
.wind-table-history .overview-wind-arrow {
    background: rgba(156, 163, 175, .10);
    border-color: rgba(156, 163, 175, .20);
    color: #cbd5e1;
}

.overview-groundwind-actions {
    display: flex;
    justify-content: center;
    padding-top: 14px;
}

.overview-groundwind-toggle {
    min-width: 210px;
    padding-inline: 18px;
}

.overview-groundwind-toggle[hidden] {
    display: none;
}

.profile-card { margin-bottom: 16px; overflow: hidden; }
.profile-heading { align-items: flex-start; }

.profile-unit-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid rgba(148, 177, 214, .24);
    border-radius: 999px;
    background: rgba(3, 12, 25, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.profile-unit-button {
    min-height: 32px;
    padding: 6px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.profile-unit-button:hover {
    color: #eaf7ff;
    background: rgba(66, 211, 255, .08);
    transform: none;
}

.profile-unit-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(8, 145, 178, .88), rgba(37, 99, 235, .92));
    box-shadow: 0 6px 16px rgba(8, 145, 178, .22), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.profile-unit-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .18);
}

.profile-day-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 14px;
}

.profile-day-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid rgba(148, 177, 214, .22);
    background: rgba(148, 177, 214, .08);
    color: var(--muted);
    text-decoration: none;
    font-size: .86rem;
    font-weight: 800;
}

.profile-day-link:hover,
.profile-day-link.active {
    color: #eaf5ff;
    border-color: rgba(66, 211, 255, .48);
    background: rgba(66, 211, 255, .14);
}

.profile-canvas-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border-radius: 20px;
    background: #07192d;
    border: 1px solid var(--line);
}

#profileCanvas {
    display: block;
    min-width: 640px;
}

.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: .9rem;
    margin-top: 12px;
}

.legend-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-cloud,
.legend-metar,
.legend-wind {
    display: inline-block;
    width: 22px;
    height: 12px;
    border-radius: 999px;
}

.legend-cloud { background: rgba(148, 163, 184, .55); }
.legend-metar { height: 0; border-radius: 0; border-top: 3px dashed #f97316; }
.legend-wind {
    width: 26px;
    height: 2px;
    border-radius: 0;
    background: #e5e7eb;
    position: relative;
    transform: rotate(-25deg);
}
.legend-wind::after {
    content: '';
    position: absolute;
    right: 2px;
    top: -8px;
    width: 2px;
    height: 12px;
    background: #e5e7eb;
    transform: rotate(25deg);
    transform-origin: bottom center;
}

.cards-map {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: stretch;
}

.map-card { min-height: 680px; }

#weatherMap {
    width: 100%;
    height: min(72vh, 720px);
    min-height: 560px;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    background: #07192d;
    filter: saturate(.90) brightness(.86) contrast(1.06);
}

.map-list-card {
    display: flex;
    flex-direction: column;
    max-height: calc(min(72vh, 720px) + 96px);
}

.map-search {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 12px;
    font: inherit;
    margin-bottom: 12px;
    background: rgba(3, 10, 20, .52);
    color: var(--ink);
}

.map-location-list {
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
}

.map-location-button {
    display: grid;
    gap: 3px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: rgba(3, 10, 20, .38);
    color: var(--ink);
    text-align: left;
    box-shadow: none;
}

.map-location-button:hover {
    border-color: rgba(96, 165, 250, .38);
    background: rgba(37, 99, 235, .12);
}

.map-location-button strong { font-size: .95rem; }
.map-location-button span { color: var(--muted); font-size: .82rem; font-weight: 700; }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: rgba(8, 24, 42, .96);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.leaflet-popup-content { margin: 14px; }

.map-popup { min-width: 245px; color: var(--ink); }
.map-popup h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--ink); }
.map-popup-muted,
.map-popup-loading,
.map-popup-error { margin: 5px 0 10px; color: var(--muted); font-size: .86rem; }
.map-popup-error { color: #fecdd3; background: rgba(244, 63, 94, .16); border-radius: 12px; padding: 8px 10px; }
.map-popup dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 5px 10px; margin: 10px 0; font-size: .88rem; }
.map-popup dt { color: var(--muted); font-weight: 900; }
.map-popup dd { margin: 0; }
.map-popup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.map-popup-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(37, 99, 235, .16);
    color: #bfdbfe;
    text-decoration: none;
    font-weight: 900;
    font-size: .82rem;
}
.map-popup-actions a:hover { background: rgba(37, 99, 235, .28); }

footer {
    width: min(1480px, calc(100% - clamp(24px, 5vw, 72px)));
    margin: 0 auto;
    padding: 0 0 calc(92px + var(--safe-area-bottom));
    color: var(--muted);
    font-size: .88rem;
}

.bottom-nav {
    display: none;
}

@media (max-width: 1160px) {
    .app-shell-header { grid-template-columns: minmax(160px, auto) auto; }
    .desktop-nav { display: none; }
    .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards-map { grid-template-columns: 1fr; }
    .map-list-card { max-height: none; }
}

@media (max-width: 780px) {
    :root { --sticky-header-offset: 182px; }
    body { background-attachment: scroll; }

    .app-shell-header,
    .hero {
        position: sticky;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 14px;
    }


    .brand small { display: none; }

    .toolbar,
    .compact-toolbar {
        justify-self: stretch;
        width: 100%;
    }

    .toolbar select { flex: 1 1 auto; min-width: 0; }
    .toolbar button { flex: 0 0 auto; }

    .profile-day-nav { margin-top: 0; }
    .profile-day-link { flex: 1 1 0; padding-left: 8px; padding-right: 8px; }

    .app-main,
    main {
        width: calc(100% - 24px);
        padding-top: 12px;
        padding-bottom: calc(96px + var(--safe-area-bottom));
    }


    .mobile-hero-card {
        border-radius: 24px;
        padding: 18px;
    }

    .mobile-hero-card h1 { font-size: 2.15rem; }
    .hero-status-dot { width: 46px; height: 46px; }

    .status-strip {
        align-items: flex-start;
        flex-wrap: wrap;
        border-radius: 18px;
    }

    .timestamp {
        width: 100%;
        margin-left: 22px;
    }

    .cards-4,
    .cards-2,
    .cards-1 {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric {
        min-height: 142px;
        padding: 15px;
    }

    .metric strong { font-size: 1.28rem; }
    .metric-icon { width: 34px; height: 34px; margin-bottom: 8px; }

    .chart-card { min-height: 360px; }
    .chart-card canvas { height: 280px !important; }
    .featured-chart canvas { height: 300px !important; }

    .wind-chart-scroll {
        overflow-x: auto;
        padding-bottom: 8px;
        margin-inline: -2px;
    }

    .wind-chart-inner {
        min-width: 860px;
        padding-inline: 2px;
    }

    .table-wrap { border-radius: 14px; }
    .wind-table { min-width: 480px; }
    .wind-table-overview { min-width: 520px; }
    .overview-groundwind-heading { gap: 10px; }
    .overview-groundwind-heading .pill { white-space: normal; text-align: right; }

    #weatherMap {
        min-height: 480px;
        height: 62vh;
        border-radius: 18px;
    }

    .map-card { min-height: auto; }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: -1px;
        z-index: 80;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 7px 10px calc(8px + var(--safe-area-bottom));
        border: 1px solid var(--line);
        border-bottom: 0;
        border-radius: 22px 22px 0 0;
        background: rgba(3, 10, 20, .94);
        backdrop-filter: blur(18px);
        box-shadow: 0 -14px 42px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06);
        transform: none;
        margin: 0;
        overflow: visible;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -28px;
        height: 28px;
        background: rgba(3, 10, 20, .94);
        pointer-events: none;
    }

    .bottom-nav-item {
        display: grid;
        place-items: center;
        gap: 3px;
        padding: 9px 4px 7px;
        border-radius: 18px;
        font-size: .64rem;
        line-height: 1.1;
        color: var(--muted);
        text-align: center;
    }

    .bottom-nav-item span {
        font-size: 1.02rem;
        line-height: 1;
    }
}


@media (hover: none) and (pointer: coarse) {
    .bottom-nav-item:hover {
        color: var(--muted);
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    .bottom-nav-item.active,
    .bottom-nav-item.active:hover {
        color: #ffffff;
        background: linear-gradient(135deg, #1556c9, #2388ff);
        border-color: rgba(147, 197, 253, .42);
        box-shadow: 0 12px 26px rgba(37, 99, 235, .30), inset 0 1px 0 rgba(255,255,255,.16);
    }
}

@media (max-width: 430px) {
    .metric-grid { grid-template-columns: 1fr; }
    .mobile-hero-card h1 { font-size: 1.9rem; }
    .brand strong { font-size: 1.12rem; }
    .brand-mark { width: 38px; height: 38px; border-radius: 14px; }
    .bottom-nav-item { font-size: .60rem; }
}

.hyppysaa-map-pin {
    width: 24px !important;
    height: 24px !important;
    border-radius: 999px 999px 999px 4px;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    border: 2px solid #dbeafe;
    box-shadow: 0 10px 26px rgba(37, 99, 235, .48), 0 0 0 7px rgba(37, 99, 235, .18);
    transform: rotate(-45deg);
}

.hyppysaa-map-pin::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 999px;
    background: #06111f;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.hyppysaa-map-pin.selected {
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    box-shadow: 0 10px 28px rgba(34, 211, 238, .50), 0 0 0 10px rgba(74, 222, 128, .16);
}

/* Legal / privacy pages */
.page-legal .legal-header {
    position: sticky;
    top: 0;
}

.legal-main {
    width: min(1120px, calc(100% - clamp(24px, 5vw, 72px)));
    margin: 0 auto;
    padding: 24px 0 42px;
}

.legal-hero {
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(34, 211, 238, .08)), var(--card);
}

.legal-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 6vw, 4rem);
    letter-spacing: -.06em;
    color: var(--ink);
}

.legal-warning {
    margin-bottom: 18px;
    border-color: rgba(251, 191, 36, .35);
    background: linear-gradient(135deg, rgba(251, 191, 36, .14), rgba(3, 10, 20, .54));
}

.legal-warning h2,
.legal-card h2 {
    margin-top: 0;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.legal-card {
    font-size: .98rem;
    line-height: 1.65;
}

.legal-card.full-width {
    grid-column: 1 / -1;
}

.legal-card ul {
    padding-left: 1.2rem;
    margin: .65rem 0 0;
}

.legal-card li + li {
    margin-top: .35rem;
}

.legal-dl {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr);
    gap: 10px 16px;
    margin: 0;
}

.legal-dl dt {
    color: var(--muted);
    font-weight: 900;
}

.legal-dl dd {
    margin: 0;
    color: var(--ink);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 8px;
}

.footer-links a {
    color: #bfdbfe;
    font-weight: 900;
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 780px) {
    .legal-main {
        width: calc(100% - 24px);
        padding-top: 12px;
        padding-bottom: 36px;
    }

    .legal-grid {
        grid-template-columns: 1fr;
    }

    .legal-dl {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .page-legal .desktop-nav {
        display: flex;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 3px;
    }

    .page-legal .nav-button {
        white-space: nowrap;
    }
}

/* Mobile containment pass: cards stay within the viewport; wide content scrolls inside the card. */
.card,
.mobile-hero-card,
.status-strip,
.table-wrap,
.raw,
.chart-scroll-wrap,
.profile-canvas-wrap {
    max-width: 100%;
}

.card > *,
.mobile-hero-card > *,
.section-heading > * {
    min-width: 0;
}

.wind-cell-main {
    font-weight: 900;
    color: #f4f8ff;
}

.wind-cell-unit {
    margin-left: 3px;
    color: var(--muted);
    font-size: .78em;
    font-weight: 800;
}

.wind-cell-kt {
    display: inline-block;
    margin-left: 7px;
    color: #bfdbfe;
    font-size: .82em;
    font-weight: 900;
}

@media (max-width: 780px) {
    .cards {
        gap: 12px;
        margin-bottom: 12px;
    }

    .card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        border-radius: 22px;
        padding: 14px;
    }

    .section-heading {
        align-items: flex-start;
        gap: 8px;
    }

    .section-heading h2 {
        overflow-wrap: anywhere;
    }

    .pill {
        flex: 0 0 auto;
        padding: 5px 8px;
        font-size: .68rem;
    }

    .raw,
    .chart-scroll-wrap,
    .profile-canvas-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-wrap {
        overflow-x: hidden;
        border-radius: 14px;
    }

    .wind-table {
        min-width: 0 !important;
        width: 100%;
        table-layout: fixed;
        font-size: .72rem;
    }

    .wind-table th,
    .wind-table td {
        padding: 7px 5px;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.15;
        vertical-align: top;
    }

    .wind-table th {
        font-size: .58rem;
        letter-spacing: .045em;
    }

    .wind-table th:nth-child(1),
    .wind-table td:nth-child(1) { width: 16%; }

    .wind-table th:nth-child(2),
    .wind-table td:nth-child(2) { width: 22%; }

    .wind-table th:nth-child(3),
    .wind-table td:nth-child(3),
    .wind-table th:nth-child(4),
    .wind-table td:nth-child(4) { width: 31%; }

    .wind-direction .overview-wind-direction {
        max-width: 100%;
        overflow-wrap: normal;
        word-break: normal;
    }

    .wind-time,
    .wind-direction {
        font-weight: 900;
        color: #dbeafe;
    }

    .wind-speed {
        display: table-cell;
    }

    .wind-cell-main {
        display: inline-block;
        min-width: 2.2em;
        font-size: .92rem;
        line-height: 1;
    }

    .wind-cell-unit {
        margin-left: 2px;
        font-size: .63rem;
    }

    .wind-cell-kt {
        display: block;
        margin: 2px 0 0;
        font-size: .64rem;
        color: #93c5fd;
    }

    .note.compact {
        font-size: .78rem;
        line-height: 1.4;
    }
}


@media (hover: none) and (pointer: coarse) {
    .bottom-nav-item:hover {
        color: var(--muted);
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    .bottom-nav-item.active,
    .bottom-nav-item.active:hover {
        color: #ffffff;
        background: linear-gradient(135deg, #1556c9, #2388ff);
        border-color: rgba(147, 197, 253, .42);
        box-shadow: 0 12px 26px rgba(37, 99, 235, .30), inset 0 1px 0 rgba(255,255,255,.16);
    }
}

@media (max-width: 430px) {
    .card {
        padding: 12px;
        border-radius: 20px;
    }

    .wind-table {
        font-size: .68rem;
    }

    .wind-table th,
    .wind-table td {
        padding: 6px 4px;
    }

    .wind-cell-main {
        font-size: .84rem;
    }
}

.learning-metric-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.learning-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 177, 214, .14);
    border-radius: 14px;
    background: rgba(7, 19, 34, .42);
}

.learning-metric-row span {
    color: var(--muted);
    font-size: .90rem;
}

.learning-metric-row strong {
    color: var(--ink);
    font-size: .98rem;
    white-space: nowrap;
}

@media (max-width: 780px) {
    .learning-metric-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}


/* Profiilin otsikkorivin mobiilikorjaus: estää pitkän otsikon jakautumisen kirjaimiksi. */
.title-with-info h2 {
    white-space: nowrap;
    flex: 0 0 auto;
}

.profile-date-label,
.title-with-info .info-button {
    flex: 0 0 auto;
}

@media (max-width: 780px) {
    .profile-heading {
        display: block;
    }

    .profile-heading > div {
        min-width: 0;
    }

    .profile-heading > .pill,
    .profile-heading > .section-heading-actions > .pill {
        margin-top: 10px;
        max-width: 100%;
    }

    .title-with-info {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .title-with-info h2 {
        flex-basis: 100%;
        width: 100%;
        margin-bottom: 4px;
        font-size: 1.08rem;
        letter-spacing: .04em;
        line-height: 1.15;
    }
}


/* Näkyvät ja sisältökohtaiset palautelinkit */
.feedback-toolbar-link,
.context-feedback-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(34, 211, 238, .34);
    color: #d9f7ff;
    text-decoration: none;
    font-weight: 900;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.feedback-toolbar-link {
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(8, 145, 178, .22), rgba(37, 99, 235, .20));
    font-size: .84rem;
}

.feedback-toolbar-link:hover,
.context-feedback-link:hover {
    color: #ffffff;
    border-color: rgba(103, 232, 249, .66);
    background: linear-gradient(135deg, rgba(8, 145, 178, .34), rgba(37, 99, 235, .30));
    box-shadow: 0 10px 24px rgba(8, 145, 178, .16);
    transform: translateY(-1px);
}

.feedback-toolbar-link:focus-visible,
.context-feedback-link:focus-visible {
    outline: none;
    border-color: rgba(103, 232, 249, .86);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .14);
}

.feedback-link-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.context-feedback-link {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(8, 145, 178, .10);
    font-size: .74rem;
}

.context-feedback-link .feedback-link-icon {
    width: 16px;
    height: 16px;
}

.section-heading-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

@media (max-width: 780px) {
    .feedback-toolbar-link {
        flex: 0 0 42px;
        width: 42px;
        padding: 9px;
    }

    .feedback-toolbar-link > span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .section-heading-actions {
        justify-content: flex-start;
    }

    .profile-heading > .section-heading-actions {
        margin-top: 10px;
    }

    .context-feedback-link {
        white-space: normal;
        line-height: 1.2;
        text-align: left;
    }
}

@media (max-width: 430px) {
    .context-feedback-link span {
        font-size: .70rem;
    }
}

/* Palautelomake ja salattu ylläpitonäkymä */
.feedback-main,
.feedback-admin-main {
    width: min(1120px, calc(100% - clamp(24px, 5vw, 72px)));
    margin: 0 auto;
    padding: 24px 0 calc(56px + var(--safe-area-bottom));
}

.feedback-hero,
.feedback-admin-hero {
    margin-bottom: 16px;
    padding: clamp(22px, 5vw, 38px);
    background:
        linear-gradient(135deg, rgba(15, 43, 72, .92), rgba(8, 24, 42, .80)),
        radial-gradient(circle at 85% 15%, rgba(34, 211, 238, .18), transparent 20rem);
}

.feedback-hero h1,
.feedback-admin-hero h1,
.admin-login-card h1 {
    margin-bottom: 12px;
}

.feedback-back-link {
    display: inline-flex;
    margin-top: 18px;
    font-weight: 900;
    text-decoration: none;
}

.feedback-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 16px;
    align-items: start;
}

.feedback-layout-single {
    grid-template-columns: minmax(0, 1fr);
}

.feedback-form-card,
.feedback-security-card,
.admin-login-card {
    padding: clamp(18px, 4vw, 28px);
}

.feedback-form {
    display: grid;
    gap: 18px;
}

.feedback-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.feedback-field {
    display: grid;
    gap: 7px;
}

.feedback-field label,
.feedback-filter-form label {
    color: #dbeafe;
    font-weight: 900;
    font-size: .84rem;
    letter-spacing: .025em;
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea,
.feedback-filter-form select {
    width: 100%;
    border-color: rgba(148, 177, 214, .28);
    background: rgba(4, 15, 28, .80);
}

.feedback-field textarea {
    min-height: 190px;
    resize: vertical;
    line-height: 1.5;
}

.feedback-field textarea:focus,
.feedback-field select:focus,
.feedback-field input:focus {
    border-color: rgba(96, 165, 250, .76);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .16);
}

.feedback-field small,
.optional-label {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.optional-label {
    margin-left: 5px;
    text-transform: none;
}

.feedback-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(7, 19, 34, .48);
    color: #cbd5e1;
    font-size: .85rem;
    line-height: 1.45;
}

.feedback-consent input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    padding: 0;
    accent-color: var(--blue);
}

.feedback-submit {
    min-height: 48px;
    font-size: .98rem;
}

.feedback-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.feedback-alert {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(12, 29, 49, .86);
    line-height: 1.45;
}

.feedback-alert ul {
    flex-basis: 100%;
    margin: 3px 0 0;
}

.feedback-alert-success {
    border-color: rgba(74, 222, 128, .42);
    background: rgba(20, 83, 45, .27);
}

.feedback-alert-error {
    border-color: rgba(251, 113, 133, .45);
    background: rgba(127, 29, 29, .25);
}

.feedback-security-card {
    position: sticky;
    top: 104px;
}

.feedback-security-card ul {
    margin: 16px 0;
    padding-left: 20px;
    color: #cbd5e1;
    line-height: 1.55;
}

.feedback-security-card li + li {
    margin-top: 8px;
}

.feedback-security-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 17px;
    background: rgba(74, 222, 128, .12);
    color: var(--ok);
    font-size: 1.4rem;
    font-weight: 900;
}

.feedback-https-warning {
    padding: 12px;
    border-radius: 12px;
    background: rgba(127, 29, 29, .28);
    color: #fecdd3;
    font-weight: 800;
}

.admin-login-card {
    width: min(560px, 100%);
    margin: 7vh auto 0;
}

.admin-login-form {
    margin-top: 22px;
}

.admin-logout-form {
    justify-self: end;
}

.secondary-button,
.danger-button {
    background: rgba(15, 39, 65, .86);
    border-color: var(--line-strong);
}

.danger-button {
    color: #fecdd3;
    border-color: rgba(251, 113, 133, .32);
    padding: 8px 11px;
    font-size: .78rem;
}

.feedback-admin-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.feedback-filter-form {
    display: grid;
    gap: 7px;
    min-width: min(290px, 100%);
}

.feedback-admin-grid {
    display: grid;
    gap: 14px;
}

.feedback-item-card {
    padding: clamp(17px, 4vw, 24px);
}

.feedback-item-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.feedback-item-heading h2 {
    margin-top: 10px;
    font-size: 1rem;
}

.feedback-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 14px 0;
    color: var(--muted);
    font-size: .82rem;
}

.feedback-message {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(4, 15, 28, .58);
    color: #e2e8f0;
    line-height: 1.58;
    overflow-wrap: anywhere;
}

.feedback-contact {
    margin: 14px 0 0;
    color: #bfdbfe;
    overflow-wrap: anywhere;
}

.feedback-password-card {
    margin-top: 16px;
}

.feedback-password-card summary {
    cursor: pointer;
    font-weight: 900;
}

.feedback-password-form {
    margin-top: 18px;
}

.feedback-empty-card {
    text-align: center;
    color: var(--muted);
}

.feedback-pill-error {
    color: #fecdd3;
    border-color: rgba(251, 113, 133, .38);
}

@media (max-width: 900px) {
    .feedback-layout {
        grid-template-columns: 1fr;
    }

    .feedback-security-card {
        position: static;
    }

    .feedback-admin-hero {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .feedback-main,
    .feedback-admin-main {
        width: min(100% - 22px, 1120px);
        padding-top: 12px;
    }

    .feedback-form-grid {
        grid-template-columns: 1fr;
    }

    .feedback-item-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .feedback-item-heading form,
    .feedback-item-heading button {
        width: 100%;
    }
}

/* Mobiilin yläpalkki: sijaintivalinta joustaa, jotta Päivitä ja palauteikoni pysyvät näkyvissä. */
@media (max-width: 780px) {
    .toolbar select {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        max-width: 100%;
    }

    .toolbar > button,
    .toolbar > .feedback-toolbar-link {
        flex-shrink: 0;
    }
}

@media (max-width: 420px) {
    .toolbar,
    .compact-toolbar {
        gap: 8px;
        padding: 7px;
    }

    .toolbar > button {
        padding-left: 13px;
        padding-right: 13px;
    }
}

/* Koko sivuston responsiivisuustarkistus 15.7.2026:
   otsikkorivien kapselit saavat siirtyä hallitusti omalle rivilleen,
   eikä niiden sisältöä leikata kortin reunan kohdalta. */
@media (max-width: 780px) {
    .section-heading {
        flex-wrap: wrap;
    }

    .section-heading > .pill,
    .section-heading > .section-heading-actions {
        max-width: 100%;
    }

    .section-heading-actions {
        flex: 0 0 auto;
    }

    .section-heading-actions .pill,
    .section-heading > .pill {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .overview-groundwind-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .overview-groundwind-heading .section-heading-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .overview-groundwind-heading .pill {
        flex: 0 1 auto;
        width: fit-content;
        max-width: 100%;
    }
}

/* Erittäin kapeilla puhelimilla NYT-tunnus ja kellonaika pinotaan,
   jotta taulukon muita sarakkeita tai fonttikokoa ei tarvitse pienentää. */
@media (max-width: 430px) {
    .wind-table-overview .overview-groundwind-now .wind-time {
        white-space: normal;
    }

    .overview-groundwind-now .overview-now-badge {
        display: flex;
        width: fit-content;
        min-width: 0;
        margin: 0 0 3px;
        padding: 3px 6px;
    }

    .overview-groundwind-now .overview-now-time {
        display: block;
    }

    .overview-wind-direction {
        gap: 5px;
    }

    .overview-wind-arrow {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }
}

/* 320–340 px leveillä näytöillä pisin alavalikon sana tarvitsee vain
   hieman tiiviimmän kirjainkoon ja sivuvälit. */
@media (max-width: 340px) {
    .bottom-nav {
        gap: 2px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .bottom-nav-item {
        padding-left: 2px;
        padding-right: 2px;
        font-size: .57rem;
    }
}

/* SEO-semanttiset sivuotsikot näyttävät samoilta kuin aiemmat korttiotsikot. */
.seo-section-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.title-with-info .seo-section-title {
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 780px) {
    .title-with-info .seo-section-title {
        flex-basis: 100%;
        width: 100%;
        margin-bottom: 4px;
        font-size: 1.08rem;
        letter-spacing: .04em;
        line-height: 1.15;
    }
}

/* Palautteiden valinta kehityskoosteeseen */
.feedback-selection-toolbar {
    position: sticky;
    top: 88px;
    z-index: 18;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 20px;
    align-items: center;
    margin-bottom: 14px;
    padding: 16px 18px;
    border-color: rgba(96, 165, 250, .34);
    background: rgba(6, 20, 36, .94);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

.feedback-selection-summary {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.feedback-selection-summary strong {
    color: #f8fafc;
    font-size: 1rem;
}

.feedback-selection-summary span {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}

.feedback-selection-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.feedback-selection-actions button {
    min-height: 40px;
    padding: 9px 13px;
    font-size: .78rem;
}

.feedback-selection-actions button:disabled {
    cursor: not-allowed;
    opacity: .45;
    transform: none;
}

.feedback-copy-status {
    grid-column: 1 / -1;
    min-height: 1.25em;
    margin: 0;
    color: #86efac;
    font-size: .78rem;
    font-weight: 800;
}

.feedback-production-select {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: #dbeafe;
    font-size: .8rem;
    font-weight: 900;
    cursor: pointer;
}

.feedback-production-select input {
    width: 19px;
    height: 19px;
    margin: 0;
    padding: 0;
    accent-color: var(--blue);
    cursor: pointer;
}

.feedback-item-card {
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.feedback-item-card.is-selected {
    border-color: rgba(74, 222, 128, .62);
    background:
        linear-gradient(135deg, rgba(22, 101, 52, .14), rgba(8, 24, 42, .82)),
        var(--card);
    box-shadow: 0 0 0 2px rgba(74, 222, 128, .13), 0 18px 44px rgba(0, 0, 0, .28);
}

@media (max-width: 900px) {
    .feedback-selection-toolbar {
        top: 76px;
        grid-template-columns: 1fr;
    }

    .feedback-selection-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .feedback-selection-toolbar {
        top: 68px;
        padding: 13px;
    }

    .feedback-selection-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .feedback-selection-actions button {
        width: 100%;
    }

    .feedback-selection-actions #copySelectedFeedback {
        grid-column: 1 / -1;
    }
}


/* Aikapoikkileikkauksen ft/kt – m/m/s -yksikkövaihto */
@media (max-width: 780px) {
    .profile-heading .section-heading-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .profile-unit-switch {
        flex: 0 0 auto;
    }
}

@media (max-width: 380px) {
    .profile-unit-button {
        padding-inline: 9px;
        font-size: .74rem;
    }
}

/* ============================================================
   Vaalea / tumma teema 22.7.2026
   Vaalea on tämän projektiversion oletus. Alkuperäinen tumma tyyli
   säilyy html[data-theme="dark"]-tilassa.
   ============================================================ */

html[data-theme="light"] {
    color-scheme: light;
    --bg: #eef5fc;
    --bg-2: #f8fbff;
    --card: rgba(255, 255, 255, .90);
    --card-strong: rgba(255, 255, 255, .98);
    --ink: #10233f;
    --muted: #61748f;
    --line: rgba(72, 111, 166, .13);
    --line-strong: rgba(72, 111, 166, .24);
    --ok: #16a34a;
    --warn: #d97706;
    --bad: #dc2626;
    --blue: #2563eb;
    --cyan: #0891b2;
    --purple: #7c3aed;
    --shadow: 0 18px 48px rgba(31, 65, 109, .11);
    --glow: 0 0 34px rgba(37, 99, 235, .12);
}

html[data-theme="dark"] { color-scheme: dark; }

html.theme-transitioning body,
html.theme-transitioning body::before,
html.theme-transitioning .app-shell-header,
html.theme-transitioning .hero,
html.theme-transitioning .desktop-nav,
html.theme-transitioning .toolbar,
html.theme-transitioning .card,
html.theme-transitioning .status-strip,
html.theme-transitioning .bottom-nav,
html.theme-transitioning input,
html.theme-transitioning select,
html.theme-transitioning textarea,
html.theme-transitioning .table-wrap,
html.theme-transitioning .raw,
html.theme-transitioning .info-panel,
html.theme-transitioning .feedback-message,
html.theme-transitioning .feedback-selection-toolbar {
    transition: background .38s ease, background-color .38s ease, border-color .38s ease,
                color .32s ease, box-shadow .38s ease, opacity .32s ease;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .34s;
    animation-timing-function: ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
    html.theme-transitioning *,
    html.theme-transitioning *::before,
    html.theme-transitioning *::after {
        transition: none !important;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0s;
    }
}

.theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: color-mix(in srgb, var(--card-strong) 88%, transparent);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
    font-size: .79rem;
    font-weight: 900;
    white-space: nowrap;
}

.theme-toggle-button:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, .34);
    background: color-mix(in srgb, var(--blue) 9%, var(--card-strong));
}

.theme-toggle-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle-standalone {
    justify-self: end;
    margin-left: auto;
}

html[data-theme="dark"] .theme-toggle-button {
    background: rgba(7, 19, 34, .72);
    border-color: var(--line-strong);
    color: #dbeafe;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

/* Vaalean teeman pohja ja yläpalkit */
html[data-theme="light"] body {
    color: var(--ink);
    background:
        radial-gradient(circle at 13% -8%, rgba(56, 189, 248, .18), transparent 27rem),
        radial-gradient(circle at 92% 1%, rgba(37, 99, 235, .12), transparent 25rem),
        linear-gradient(160deg, #edf5fc 0%, #f8fbff 44%, #eef5fc 100%);
}

html[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(37, 99, 235, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, .020) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.42), transparent 78%);
}

html[data-theme="light"] a { color: #1d64d8; }
html[data-theme="light"] code { color: #1e4f8f; }

html[data-theme="light"] .app-shell-header,
html[data-theme="light"] .hero {
    border-bottom-color: rgba(72, 111, 166, .14);
    background: rgba(248, 252, 255, .84);
    box-shadow: 0 10px 34px rgba(31, 65, 109, .07);
}

html[data-theme="light"] .brand-mark {
    background: linear-gradient(145deg, #38bdf8 0%, #0ea5e9 38%, #2563eb 100%);
    color: #ffffff;
    border: 0;
    box-shadow: 0 11px 30px rgba(37, 99, 235, .20);
}

html[data-theme="light"] .desktop-nav,
html[data-theme="light"] .toolbar {
    background: rgba(255, 255, 255, .76);
    border-color: rgba(72, 111, 166, .14);
    box-shadow: 0 10px 28px rgba(31, 65, 109, .07), inset 0 1px 0 rgba(255,255,255,.9);
}

html[data-theme="light"] select,
html[data-theme="light"] input,
html[data-theme="light"] textarea {
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    border-color: var(--line-strong);
}

html[data-theme="light"] select option { color: #10233f; background: #ffffff; }

html[data-theme="light"] .nav-button:hover,
html[data-theme="light"] .bottom-nav-item:hover {
    color: #12365f;
    background: rgba(37, 99, 235, .07);
    border-color: rgba(37, 99, 235, .12);
}

/* Kortit ja sisältö */
html[data-theme="light"] .mobile-hero-card {
    border-color: rgba(72, 111, 166, .14);
    background:
        linear-gradient(135deg, rgba(255,255,255,.95), rgba(243,249,255,.91)),
        radial-gradient(circle at 85% 15%, rgba(22, 163, 74, .12), transparent 18rem);
    box-shadow: var(--shadow);
}

html[data-theme="light"] .card {
    border-color: rgba(72, 111, 166, .13);
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,253,255,.90)),
        var(--card);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.95);
}

html[data-theme="light"] .card:hover {
    border-color: rgba(37, 99, 235, .21);
    box-shadow: 0 21px 54px rgba(31, 65, 109, .14), inset 0 1px 0 rgba(255,255,255,.98);
}

html[data-theme="light"] .metric::after {
    background: radial-gradient(circle, rgba(14, 165, 233, .09), transparent 70%);
}

html[data-theme="light"] .metric-icon {
    background: rgba(14, 165, 233, .09);
    color: #087f9e;
    border: 1px solid rgba(14, 165, 233, .10);
}

html[data-theme="light"] .status-strip,
html[data-theme="light"] .feedback-alert {
    background: rgba(255, 255, 255, .83);
    border-color: rgba(72, 111, 166, .14);
    box-shadow: 0 12px 34px rgba(31, 65, 109, .08);
}

html[data-theme="light"] .status-strip.ok,
html[data-theme="light"] .feedback-alert-success {
    background: linear-gradient(90deg, rgba(240, 253, 244, .96), rgba(255,255,255,.86));
}

html[data-theme="light"] .status-strip.warn {
    background: linear-gradient(90deg, rgba(255, 251, 235, .98), rgba(255,255,255,.88));
}

html[data-theme="light"] .status-strip.bad,
html[data-theme="light"] .feedback-alert-error {
    background: linear-gradient(90deg, rgba(254, 242, 242, .97), rgba(255,255,255,.88));
}

html[data-theme="light"] .pill {
    background: rgba(71, 85, 105, .07);
    color: #405776;
    border-color: rgba(72, 111, 166, .13);
}

html[data-theme="light"] .pill.ok { background: rgba(22, 163, 74, .09); color: #15803d; border-color: rgba(22, 163, 74, .20); }
html[data-theme="light"] .pill.warn { background: rgba(217, 119, 6, .09); color: #a45608; border-color: rgba(217, 119, 6, .20); }
html[data-theme="light"] .pill.bad { background: rgba(220, 38, 38, .08); color: #b91c1c; border-color: rgba(220, 38, 38, .19); }
html[data-theme="light"] .pill.muted { background: rgba(37, 99, 235, .07); color: #315c96; border-color: rgba(37, 99, 235, .15); }

html[data-theme="light"] .warnings li {
    background: rgba(255,255,255,.74);
    color: #283d59;
    border-color: rgba(72,111,166,.12);
}

html[data-theme="light"] .warnings li.ok {
    background: linear-gradient(90deg, rgba(240,253,244,.96), rgba(255,255,255,.82));
    color: #245b37;
    border-color: rgba(22,163,74,.16);
    border-left-color: var(--ok);
}

html[data-theme="light"] .warnings li.warn {
    background: linear-gradient(90deg, rgba(255,251,235,.98), rgba(255,255,255,.84));
    color: #70430a;
    border-color: rgba(217,119,6,.17);
    border-left-color: var(--warn);
}

html[data-theme="light"] .warnings li.bad {
    background: linear-gradient(90deg, rgba(254,242,242,.98), rgba(255,255,255,.84));
    color: #842d36;
    border-color: rgba(220,38,38,.16);
    border-left-color: var(--bad);
}

html[data-theme="light"] .profile-date-label,
html[data-theme="light"] .info-button,
html[data-theme="light"] .profile-day-link,
html[data-theme="light"] .overview-wind-arrow {
    background: rgba(37, 99, 235, .065);
    color: #315c96;
    border-color: rgba(37, 99, 235, .14);
}

html[data-theme="light"] .info-button[aria-expanded="true"] {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

html[data-theme="light"] .info-panel {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,249,255,.97));
    color: #203650;
    border-color: rgba(72,111,166,.17);
    box-shadow: 0 16px 38px rgba(31,65,109,.14);
}

html[data-theme="light"] .info-panel-header strong { color: #10233f; }
html[data-theme="light"] .info-panel p { color: #536b89; }
html[data-theme="light"] .info-close { background: rgba(37,99,235,.06); color: #315c96; border-color: rgba(37,99,235,.13); }

html[data-theme="light"] .raw,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .chart-scroll-wrap {
    background: rgba(244, 248, 253, .82);
    color: #213852;
    border-color: rgba(72, 111, 166, .12);
}

html[data-theme="light"] .wind-table th {
    background: rgba(37, 99, 235, .055);
    color: #536b89;
}

html[data-theme="light"] .wind-table td { border-color: rgba(72,111,166,.10); }
html[data-theme="light"] .wind-table tbody tr:nth-child(even) td { background: rgba(37, 99, 235, .022); }

html[data-theme="light"] .groundwind-history-card {
    background: linear-gradient(180deg, rgba(248,250,252,.96), rgba(241,245,249,.90));
    border-color: rgba(100,116,139,.18);
}

html[data-theme="light"] .groundwind-history-card .note,
html[data-theme="light"] .wind-table-history th,
html[data-theme="light"] .wind-table-history .wind-direction,
html[data-theme="light"] .wind-table-history .wind-cell-main,
html[data-theme="light"] .wind-table-overview .overview-groundwind-history .wind-cell-main {
    color: #536276;
}

html[data-theme="light"] .wind-history-wrap { background: rgba(241,245,249,.82); border-color: rgba(100,116,139,.16); }
html[data-theme="light"] .wind-table-history th { background: rgba(100,116,139,.09); }
html[data-theme="light"] .wind-table-history tbody tr:nth-child(even) td,
html[data-theme="light"] .wind-table-overview tbody tr.overview-groundwind-history td { background: rgba(100,116,139,.035); color: #5b6777; }
html[data-theme="light"] .wind-table-overview tbody tr.overview-groundwind-history:nth-child(even) td { background: rgba(100,116,139,.065); }
html[data-theme="light"] .wind-table-history .wind-cell-unit,
html[data-theme="light"] .wind-table-history .wind-cell-kt,
html[data-theme="light"] .wind-table-overview .overview-groundwind-history .wind-cell-kt { color: #768499; }

html[data-theme="light"] .wind-table-overview tbody tr.overview-groundwind-now td {
    background: linear-gradient(90deg, rgba(219,234,254,.72), rgba(236,254,255,.72));
    border-color: rgba(37, 99, 235, .16);
}

html[data-theme="light"] .wind-table-overview tbody tr.overview-groundwind-now .wind-cell-main,
html[data-theme="light"] .overview-now-time { color: #12365f; }
html[data-theme="light"] .overview-groundwind-separator td { background: rgba(226, 235, 246, .72) !important; }
html[data-theme="light"] .overview-groundwind-history .overview-wind-arrow,
html[data-theme="light"] .wind-table-history .overview-wind-arrow { background: rgba(100,116,139,.06); border-color: rgba(100,116,139,.13); color: #627087; }

html[data-theme="light"] .profile-unit-switch { background: rgba(226, 235, 246, .68); border-color: rgba(72,111,166,.13); }
html[data-theme="light"] .profile-unit-button:hover { color: #12365f; background: rgba(14,165,233,.08); }
html[data-theme="light"] .profile-day-link.active { color: #14507e; background: rgba(14,165,233,.09); border-color: rgba(14,165,233,.26); }
html[data-theme="light"] .profile-canvas-wrap { background: #e8f4fc; border-color: rgba(72,111,166,.14); }

html[data-theme="light"] .legend-wind,
html[data-theme="light"] .legend-wind::after { background: #17324d; }

/* Kartta */
html[data-theme="light"] #weatherMap { background: #e8f2f8; }
html[data-theme="light"] .map-search,
html[data-theme="light"] .map-location-button { background: rgba(248,251,255,.92); color: var(--ink); }
html[data-theme="light"] .map-location-button:hover { background: rgba(37,99,235,.06); border-color: rgba(37,99,235,.20); }
html[data-theme="light"] .leaflet-popup-content-wrapper,
html[data-theme="light"] .leaflet-popup-tip {
    background: rgba(255,255,255,.98);
    color: var(--ink);
    box-shadow: 0 18px 44px rgba(31,65,109,.18);
}
html[data-theme="light"] .map-popup-actions a { background: rgba(37,99,235,.08); color: #1d64d8; }
html[data-theme="light"] .map-popup-actions a:hover { background: rgba(37,99,235,.14); }
html[data-theme="light"] .map-popup-error { color: #b91c1c; background: rgba(220,38,38,.08); }
html[data-theme="light"] .hyppysaa-map-pin::after { background: #ffffff; }

/* Alavalikko */
@media (max-width: 780px) {
    html[data-theme="light"] .bottom-nav,
    html[data-theme="light"] .bottom-nav::after {
        background: rgba(251, 253, 255, .95);
    }

    html[data-theme="light"] .bottom-nav {
        box-shadow: 0 -14px 38px rgba(31,65,109,.13), inset 0 1px 0 rgba(255,255,255,.9);
    }

    .theme-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .theme-toggle-button {
        flex: 0 0 42px;
        width: 42px;
        padding: 9px;
    }
}

/* Laki-, palaute- ja ylläpitosivut */
html[data-theme="light"] .legal-hero,
html[data-theme="light"] .feedback-hero,
html[data-theme="light"] .feedback-admin-hero {
    background:
        linear-gradient(135deg, rgba(239,246,255,.98), rgba(236,254,255,.78)),
        radial-gradient(circle at 85% 15%, rgba(14,165,233,.11), transparent 20rem);
}

html[data-theme="light"] .legal-warning { background: linear-gradient(135deg, rgba(255,251,235,.96), rgba(255,255,255,.90)); }
html[data-theme="light"] .footer-links a { color: #1d64d8; }
html[data-theme="light"] .footer-links a:hover,
html[data-theme="light"] .footer-links a:focus-visible { color: #12365f; }

html[data-theme="light"] .feedback-field label,
html[data-theme="light"] .feedback-filter-form label,
html[data-theme="light"] .feedback-production-select { color: #294666; }
html[data-theme="light"] .feedback-field input,
html[data-theme="light"] .feedback-field select,
html[data-theme="light"] .feedback-field textarea,
html[data-theme="light"] .feedback-filter-form select { background: rgba(255,255,255,.96); }
html[data-theme="light"] .feedback-consent { background: rgba(244,248,253,.84); color: #475b75; }
html[data-theme="light"] .feedback-security-card ul { color: #475b75; }
html[data-theme="light"] .feedback-https-warning { background: rgba(220,38,38,.08); color: #b91c1c; }
html[data-theme="light"] .secondary-button,
html[data-theme="light"] .danger-button { background: rgba(239,244,250,.94); }
html[data-theme="light"] .danger-button { color: #b91c1c; border-color: rgba(220,38,38,.18); }
html[data-theme="light"] .feedback-message { background: rgba(244,248,253,.88); color: #203650; }
html[data-theme="light"] .feedback-contact { color: #315c96; }
html[data-theme="light"] .feedback-selection-toolbar { background: rgba(250,253,255,.95); border-color: rgba(37,99,235,.18); box-shadow: 0 14px 34px rgba(31,65,109,.12); }
html[data-theme="light"] .feedback-selection-summary strong { color: #10233f; }
html[data-theme="light"] .feedback-copy-status { color: #15803d; }
html[data-theme="light"] .feedback-item-card.is-selected {
    border-color: rgba(22,163,74,.32);
    background: linear-gradient(135deg, rgba(240,253,244,.96), rgba(255,255,255,.92));
    box-shadow: 0 0 0 2px rgba(22,163,74,.07), 0 18px 44px rgba(31,65,109,.12);
}

html[data-theme="light"] .feedback-toolbar-link {
    color: #176b8a;
    background: linear-gradient(135deg, rgba(8,145,178,.08), rgba(37,99,235,.07));
    border-color: rgba(8,145,178,.19);
}
html[data-theme="light"] .feedback-toolbar-link:hover { color: #0b4e69; border-color: rgba(8,145,178,.34); }

html[data-theme="light"] .learning-metric-row { background: rgba(244,248,253,.82); border-color: rgba(72,111,166,.12); }

/* Korjaa suorat tumman teeman tekstivärit vaaleassa tilassa. */
html[data-theme="light"] .wind-cell-main,
html[data-theme="light"] .wind-time,
html[data-theme="light"] .wind-direction { color: #173a64; }
html[data-theme="light"] .wind-cell-kt { color: #315c96; }
html[data-theme="light"] .feedback-selection-summary span { color: var(--muted); }

@media (max-width: 1160px) and (min-width: 781px) {
    .theme-toggle-standalone { grid-column: 2; grid-row: 1; }
}

/* Leveän työpöytänäkymän tiivistys: teemapainike ei saa puristaa navigaatiota. */
@media (min-width: 1161px) and (max-width: 1500px) {
    .app-shell-header,
    .hero {
        grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
        gap: 10px;
        padding-left: 22px;
        padding-right: 22px;
    }

    .brand small { display: none; }
    .desktop-nav { gap: 3px; padding: 5px; }
    .nav-button { padding: 9px 10px; font-size: .83rem; }
    .toolbar { gap: 7px; padding: 7px; }
    .toolbar select { width: 210px; max-width: 210px; }

    .theme-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .theme-toggle-button { width: 42px; padding: 9px; }
}

/* ------------------------------------------------------------
   Yhteenveto: sääsanomat ja tärkeimmät hyppysäätiedot
   ------------------------------------------------------------ */
.overview-metar-card {
    overflow: hidden;
}

.overview-metar-heading {
    align-items: center;
}

.overview-metar-heading .eyebrow {
    margin-bottom: 4px;
}

.overview-metar-heading h1 {
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.overview-metar-layout {
    display: grid;
    gap: 14px;
}

.overview-weather-messages {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 8, 15, .62);
}

.overview-metar-raw {
    display: block;
    min-height: 88px;
    margin: 0;
    padding: 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: clamp(.9rem, 1.45vw, 1.04rem);
    font-weight: 750;
}

.overview-taf-raw {
    min-width: 0;
    max-height: 118px;
    overflow: auto;
    margin: 0;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: rgba(96, 165, 250, .045);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(.71rem, 1.05vw, .80rem);
    font-weight: 650;
    line-height: 1.52;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.overview-metar-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.overview-metar-ceiling,
.overview-current-wind {
    position: relative;
    min-width: 0;
    min-height: 146px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 15px;
}

.overview-metar-ceiling {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(34, 211, 238, .055);
}

.overview-metar-ceiling::after,
.overview-current-wind::after {
    content: '';
    position: absolute;
    right: -34px;
    bottom: -48px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,.15), transparent 68%);
    pointer-events: none;
}

.overview-metar-ceiling .metric-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 7px;
}

.overview-metar-ceiling .label,
.overview-current-wind .label {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.overview-metar-ceiling .label {
    margin-bottom: 6px;
}

.overview-metar-ceiling strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 5px;
    font-size: clamp(1.12rem, 2vw, 1.48rem);
    line-height: 1.18;
}

.overview-metar-ceiling small,
.overview-current-wind-source {
    position: relative;
    z-index: 1;
    color: var(--muted);
    line-height: 1.4;
}

.overview-current-wind {
    --wind-accent: #60a5fa;
    background: rgba(96, 165, 250, .055);
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.overview-current-wind.ok {
    --wind-accent: #4ade80;
    border-color: rgba(74, 222, 128, .29);
    background: linear-gradient(145deg, rgba(74,222,128,.09), rgba(34,211,238,.035));
}

.overview-current-wind.warn {
    --wind-accent: #fbbf24;
    border-color: rgba(251, 191, 36, .34);
    background: linear-gradient(145deg, rgba(251,191,36,.10), rgba(249,115,22,.035));
}

.overview-current-wind.bad {
    --wind-accent: #fb7185;
    border-color: rgba(251, 113, 133, .36);
    background: linear-gradient(145deg, rgba(251,113,133,.11), rgba(239,68,68,.035));
}

.overview-current-wind-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
}

.overview-current-wind-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--wind-accent) 32%, transparent);
    border-radius: 10px;
    color: var(--wind-accent);
    background: color-mix(in srgb, var(--wind-accent) 12%, transparent);
    font-size: 1.05rem;
    font-weight: 950;
}

.overview-current-wind-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 11px;
}

.overview-current-wind-arrow {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--wind-accent) 36%, transparent);
    border-radius: 50%;
    color: var(--wind-accent);
    background: color-mix(in srgb, var(--wind-accent) 12%, transparent);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--wind-accent) 13%, transparent);
    font-size: 1.62rem;
    font-weight: 950;
    line-height: 1;
    transform: rotate(var(--wind-rotation, 0deg));
    transition: transform .35s ease, opacity .2s ease;
}

.overview-current-wind-main strong {
    display: block;
    color: var(--ink);
    font-size: 1.06rem;
    line-height: 1.15;
}

.overview-current-wind-main small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.3;
}

.overview-current-wind-values {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.overview-current-wind-values > span {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--wind-accent) 22%, transparent);
    border-radius: 12px;
    padding: 8px 9px;
    background: color-mix(in srgb, var(--wind-accent) 7%, transparent);
}

.overview-current-wind-values small {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.overview-current-wind-values strong {
    display: block;
    color: var(--ink);
    font-size: .83rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.overview-current-wind-source {
    display: block;
    font-size: .68rem;
}

html[data-theme="light"] .overview-weather-messages {
    border-color: rgba(72,111,166,.13);
    background: linear-gradient(180deg, rgba(248,251,255,.98), rgba(241,247,255,.92));
}

html[data-theme="light"] .overview-metar-raw {
    color: #173a64;
}

html[data-theme="light"] .overview-taf-raw {
    border-top-color: rgba(72,111,166,.13);
    background: rgba(228,239,253,.38);
}

html[data-theme="light"] .overview-metar-ceiling {
    border-color: rgba(72,111,166,.14);
    background: linear-gradient(180deg, rgba(239,248,255,.96), rgba(247,251,255,.96));
}

html[data-theme="light"] .overview-current-wind {
    --wind-accent: #2563eb;
    border-color: rgba(72,111,166,.14);
    background: linear-gradient(180deg, rgba(247,251,255,.98), rgba(239,247,255,.94));
}

html[data-theme="light"] .overview-current-wind.ok {
    --wind-accent: #15803d;
    border-color: rgba(22,163,74,.23);
    background: linear-gradient(145deg, rgba(240,253,244,.98), rgba(240,249,255,.94));
}

html[data-theme="light"] .overview-current-wind.warn {
    --wind-accent: #b86708;
    border-color: rgba(217,119,6,.25);
    background: linear-gradient(145deg, rgba(255,251,235,.98), rgba(255,247,237,.92));
}

html[data-theme="light"] .overview-current-wind.bad {
    --wind-accent: #c62626;
    border-color: rgba(220,38,38,.24);
    background: linear-gradient(145deg, rgba(254,242,242,.98), rgba(255,247,247,.94));
}

.overview-summary-card-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 8px;
}

.overview-summary-card-head .metric-icon,
.overview-summary-card-head .overview-current-wind-icon {
    margin-bottom: 0;
    flex: 0 0 auto;
}

.overview-summary-card-head .label {
    margin-top: 4px;
    margin-bottom: 0;
}

.overview-layerwind-card {
    overflow: hidden;
}

.overview-layerwind-heading {
    align-items: flex-start;
}

.overview-layerwind-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.overview-layerwind-day-nav {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid rgba(148,177,214,.18);
    border-radius: 999px;
    background: rgba(148,177,214,.06);
}

.overview-layerwind-day-button {
    appearance: none;
    min-height: 30px;
    padding: 5px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, box-shadow .16s ease;
}

.overview-layerwind-day-button:hover {
    color: var(--ink);
}

.overview-layerwind-day-button.active {
    color: #eaf5ff;
    background: linear-gradient(135deg, rgba(8,145,178,.82), rgba(37,99,235,.88));
    box-shadow: 0 5px 14px rgba(8,145,178,.16);
}

.overview-layerwind-day-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34,211,238,.18);
}

.overview-layerwind-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.overview-layerwind-title h2 {
    margin-bottom: 4px;
}

.overview-layerwind-title .note {
    margin: 0;
    max-width: 62ch;
}

.overview-layerwind-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 13px;
    border: 1px solid rgba(34, 211, 238, .24);
    background: rgba(34, 211, 238, .10);
    color: var(--cyan);
}

.overview-layerwind-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.overview-layerwind-wrap {
    margin-top: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    overscroll-behavior: auto;
    scrollbar-gutter: stable both-edges;
    padding: 1px;
    border-radius: 18px;
    background: var(--line);
}

.overview-layerwind-grid {
    display: grid;
    grid-template-columns: 92px repeat(8, minmax(88px, 1fr));
    gap: 1px;
    min-width: 860px;
}

.overview-layerwind-corner,
.overview-layerwind-head,
.overview-layerwind-alt,
.overview-layerwind-cell,
.overview-layerwind-status {
    border: 0;
    border-radius: 0;
}

.overview-layerwind-corner {
    display: grid;
    place-items: center;
    padding: 10px 8px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: #0f2239;
}

.overview-layerwind-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 62px;
    padding: 8px 6px;
    background: rgba(96,165,250,.06);
    color: var(--ink);
    text-align: center;
}

.overview-layerwind-head span {
    display: block;
    font-size: .87rem;
    font-weight: 800;
    line-height: 1.15;
}

.overview-layerwind-head small {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(34, 211, 238, .14);
    color: var(--cyan);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.overview-layerwind-head.is-current {
    background: linear-gradient(180deg, rgba(14, 165, 233, .30), rgba(37, 99, 235, .16));
}

.overview-layerwind-alt {
    display: grid;
    place-items: center;
    min-height: 72px;
    padding: 8px 6px;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 850;
    background: #0f2239;
}

.overview-layerwind-corner,
.overview-layerwind-alt {
    position: sticky;
    left: 0;
    z-index: 20;
    isolation: isolate;
    overflow: hidden;
    box-shadow: 12px 0 16px -12px rgba(2, 6, 23, .55);
}

.overview-layerwind-corner {
    z-index: 14;
}

.overview-layerwind-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 72px;
    padding: 9px 10px;
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.overview-layerwind-cell strong {
    display: block;
    font-size: .97rem;
    font-weight: 850;
    line-height: 1.1;
}

.overview-layerwind-cell span {
    color: inherit;
}

.overview-layerwind-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: rgba(233, 241, 255, .90);
    font-size: .75rem;
    font-weight: 700;
}

.overview-layerwind-arrow {
    display: inline-block;
    color: rgba(255,255,255,.98);
    text-shadow: 0 1px 0 rgba(0,0,0,.18), 0 0 10px rgba(255,255,255,.10);
    font-size: 1.5rem;
    font-weight: 950;
    line-height: 1;
    transform: rotate(var(--wind-rotation, 0deg));
    transform-origin: 50% 50%;
}

.overview-layerwind-cell.is-ok {
    background: linear-gradient(180deg, rgba(74,222,128,.18), rgba(34,197,94,.11));
    border-color: rgba(74,222,128,.20);
}

.overview-layerwind-cell.is-warn {
    background: linear-gradient(180deg, rgba(250,204,21,.22), rgba(251,191,36,.14));
    border-color: rgba(250,204,21,.24);
}

.overview-layerwind-cell.is-alert {
    background: linear-gradient(180deg, rgba(251,146,60,.24), rgba(249,115,22,.16));
    border-color: rgba(251,146,60,.25);
}

.overview-layerwind-cell.is-bad {
    background: linear-gradient(180deg, rgba(251,113,133,.23), rgba(239,68,68,.16));
    border-color: rgba(251,113,133,.28);
}

.overview-layerwind-cell.is-empty {
    background: rgba(96,165,250,.04);
    color: var(--muted);
}

.overview-layerwind-cell.is-current {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 6px 18px rgba(2, 6, 23, .14);
}

.overview-layerwind-cell.is-current strong,
.overview-layerwind-cell.is-current .overview-layerwind-meta {
    color: rgba(255,255,255,.98);
}

.overview-layerwind-cell.is-current.is-ok {
    background: linear-gradient(180deg, rgba(34,197,94,.42), rgba(22,163,74,.28));
}

.overview-layerwind-cell.is-current.is-warn {
    background: linear-gradient(180deg, rgba(250,204,21,.48), rgba(245,158,11,.30));
}

.overview-layerwind-cell.is-current.is-alert {
    background: linear-gradient(180deg, rgba(251,146,60,.50), rgba(249,115,22,.34));
}

.overview-layerwind-cell.is-current.is-bad {
    background: linear-gradient(180deg, rgba(248,113,113,.48), rgba(220,38,38,.34));
}

.overview-layerwind-cell.is-current.is-empty {
    background: rgba(96,165,250,.12);
}

.overview-layerwind-status {
    grid-column: 1 / -1;
    padding: 18px 16px;
    background: rgba(96,165,250,.04);
    color: var(--muted);
    text-align: center;
}

html[data-theme="light"] .overview-layerwind-day-nav {
    border-color: rgba(72,111,166,.14);
    background: rgba(228,239,253,.42);
}

html[data-theme="light"] .overview-layerwind-day-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb);
}

html[data-theme="light"] .overview-layerwind-icon {
    border-color: rgba(72,111,166,.16);
    background: rgba(228,239,253,.72);
    color: #0f8bb8;
}

html[data-theme="light"] .overview-layerwind-corner,
html[data-theme="light"] .overview-layerwind-head,
html[data-theme="light"] .overview-layerwind-alt,
html[data-theme="light"] .overview-layerwind-cell,
html[data-theme="light"] .overview-layerwind-status {
    border-color: rgba(72,111,166,.14);
}

html[data-theme="light"] .overview-layerwind-corner,
html[data-theme="light"] .overview-layerwind-head,
html[data-theme="light"] .overview-layerwind-alt,
html[data-theme="light"] .overview-layerwind-status {
    background: #f7fbff;
}

html[data-theme="light"] .overview-layerwind-corner,
html[data-theme="light"] .overview-layerwind-alt {
    box-shadow: 12px 0 16px -12px rgba(15, 35, 60, .28);
}

html[data-theme="light"] .overview-layerwind-head.is-current {
    background: linear-gradient(180deg, rgba(191,219,254,.98), rgba(219,234,254,.96));
}

html[data-theme="light"] .overview-layerwind-head small {
    background: rgba(37,99,235,.10);
    color: #2563eb;
}

html[data-theme="light"] .overview-layerwind-meta {
    color: #365170;
}

html[data-theme="light"] .overview-layerwind-arrow {
    color: #17365d;
    text-shadow: 0 1px 0 rgba(255,255,255,.55), 0 0 8px rgba(23,54,93,.06);
}

html[data-theme="light"] .overview-layerwind-cell.is-ok {
    background: linear-gradient(180deg, rgba(220,252,231,.96), rgba(240,253,244,.92));
}

html[data-theme="light"] .overview-layerwind-cell.is-warn {
    background: linear-gradient(180deg, rgba(254,249,195,.97), rgba(255,251,235,.94));
}

html[data-theme="light"] .overview-layerwind-cell.is-alert {
    background: linear-gradient(180deg, rgba(255,237,213,.98), rgba(255,247,237,.95));
}

html[data-theme="light"] .overview-layerwind-cell.is-bad {
    background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(255,241,242,.95));
}

html[data-theme="light"] .overview-layerwind-cell.is-empty {
    background: rgba(247,251,255,.94);
}

html[data-theme="light"] .overview-layerwind-cell.is-current {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.68), 0 6px 16px rgba(37, 99, 235, .10);
}

html[data-theme="light"] .overview-layerwind-cell.is-current strong,
html[data-theme="light"] .overview-layerwind-cell.is-current .overview-layerwind-meta {
    color: #102847;
}

html[data-theme="light"] .overview-layerwind-cell.is-current.is-ok {
    background: linear-gradient(180deg, rgba(134,239,172,.98), rgba(187,247,208,.94));
}

html[data-theme="light"] .overview-layerwind-cell.is-current.is-warn {
    background: linear-gradient(180deg, rgba(253,224,71,.98), rgba(254,240,138,.94));
}

html[data-theme="light"] .overview-layerwind-cell.is-current.is-alert {
    background: linear-gradient(180deg, rgba(253,186,116,.98), rgba(254,215,170,.94));
}

html[data-theme="light"] .overview-layerwind-cell.is-current.is-bad {
    background: linear-gradient(180deg, rgba(252,165,165,.98), rgba(254,202,202,.94));
}

html[data-theme="light"] .overview-layerwind-cell.is-current.is-empty {
    background: rgba(219,234,254,.98);
}

@media (max-width: 700px) {
    .overview-metar-heading {
        align-items: flex-start;
    }

    .overview-metar-heading .pill {
        max-width: 48%;
        white-space: normal;
        text-align: right;
    }

    .overview-metar-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ------------------------------------------------------------
   Hyppysää 404
   ------------------------------------------------------------ */
.page-error {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.page-error .error-header {
    position: sticky;
    top: 0;
}

.error-page-main {
    display: grid;
    flex: 1 0 auto;
    width: min(1120px, calc(100% - clamp(24px, 5vw, 72px)));
    margin: 0 auto;
    padding: clamp(28px, 7vh, 76px) 0 clamp(36px, 8vh, 88px);
    place-items: center;
}

.error-card {
    position: relative;
    display: grid;
    width: 100%;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(26px, 6vw, 72px);
    overflow: hidden;
    padding: clamp(26px, 6vw, 64px);
    background:
        radial-gradient(circle at 18% 28%, rgba(34,211,238,.18), transparent 18rem),
        linear-gradient(135deg, rgba(37,99,235,.13), rgba(34,211,238,.055)),
        var(--card-strong);
}

.error-card::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(96,165,250,.12);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(96,165,250,.035), 0 0 0 86px rgba(34,211,238,.025);
    pointer-events: none;
}

.error-visual {
    position: relative;
    display: grid;
    min-height: 300px;
    place-items: center;
    isolation: isolate;
}

.error-code {
    position: absolute;
    z-index: -1;
    color: rgba(96,165,250,.10);
    font-size: clamp(8.5rem, 21vw, 15rem);
    font-weight: 950;
    line-height: .72;
    letter-spacing: -.09em;
    user-select: none;
}

.error-cloud {
    width: min(250px, 75%);
    overflow: visible;
    filter: drop-shadow(0 24px 34px rgba(37,99,235,.25));
    animation: error-cloud-float 5.5s ease-in-out infinite;
}

.error-cloud > path:first-child {
    fill: rgba(15,42,69,.88);
    stroke: rgba(125,211,252,.78);
    stroke-width: 2.2;
}

.error-cloud-smile {
    fill: none;
    stroke: #67e8f9;
    stroke-width: 3.2;
    stroke-linecap: round;
}

.error-radar {
    position: absolute;
    z-index: -1;
    width: 178px;
    height: 178px;
    border: 1px solid rgba(34,211,238,.20);
    border-radius: 50%;
    animation: error-radar-pulse 3.8s ease-out infinite;
}

.error-radar-two {
    animation-delay: 1.9s;
}

.error-copy {
    position: relative;
    z-index: 1;
}

.error-copy h1 {
    max-width: 720px;
    margin-bottom: 16px;
    font-size: clamp(2.7rem, 7vw, 5.7rem);
}

.error-copy .lead {
    max-width: 690px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.16rem);
    line-height: 1.72;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.error-primary-action,
.error-secondary-action {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 11px 16px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.error-primary-action,
.error-primary-action:visited {
    color: #fff;
    background: linear-gradient(135deg, #1556c9, #2f8cff);
    border-color: rgba(147,197,253,.42);
    box-shadow: 0 14px 30px rgba(37,99,235,.28);
}

.error-secondary-action {
    color: var(--ink);
    background: rgba(96,165,250,.075);
}

.error-primary-action:hover,
.error-secondary-action:hover,
.error-primary-action:focus-visible,
.error-secondary-action:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(96,165,250,.54);
}

.error-help {
    margin: 28px 0 5px;
}

.error-feedback-link {
    color: #7dd3fc;
    font-weight: 900;
    text-underline-offset: 4px;
}

.error-footer {
    flex: 0 0 auto;
}

@keyframes error-cloud-float {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
    50% { transform: translate3d(0, -11px, 0) rotate(1deg); }
}

@keyframes error-radar-pulse {
    0% { opacity: .05; transform: scale(.60); }
    45% { opacity: .50; }
    100% { opacity: 0; transform: scale(1.55); }
}

html[data-theme="light"] .error-card {
    background:
        radial-gradient(circle at 18% 28%, rgba(14,165,233,.12), transparent 18rem),
        linear-gradient(135deg, rgba(239,246,255,.98), rgba(236,254,255,.74)),
        #fff;
}

html[data-theme="light"] .error-code {
    color: rgba(37,99,235,.075);
}

html[data-theme="light"] .error-cloud > path:first-child {
    fill: rgba(255,255,255,.96);
    stroke: #2f8cff;
}

html[data-theme="light"] .error-cloud-smile {
    stroke: #0891b2;
}

html[data-theme="light"] .error-primary-action,
html[data-theme="light"] .error-primary-action:visited {
    color: #ffffff;
}

html[data-theme="light"] .error-secondary-action {
    color: #173a64;
    background: rgba(37,99,235,.06);
}

html[data-theme="light"] .error-feedback-link {
    color: #1d64d8;
}

@media (max-width: 780px) {
    .page-error .error-header .desktop-nav {
        display: none;
    }

    .error-page-main {
        width: calc(100% - 24px);
        padding-top: 18px;
    }

    .error-card {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 26px 20px 30px;
        text-align: center;
    }

    .error-visual {
        min-height: 205px;
    }

    .error-code {
        font-size: clamp(7.5rem, 46vw, 11rem);
    }

    .error-cloud {
        width: min(185px, 66%);
    }

    .error-copy .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-primary-action,
    .error-secondary-action {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .error-cloud,
    .error-radar {
        animation: none;
    }
}


/* ------------------------------------------------------------
   Mobiilin ensisilmäys: METAR, pilvikorkeus ja pintatuuli nopeasti näkyviin
   ------------------------------------------------------------ */
@media (max-width: 780px) {
    :root { --sticky-header-offset: 124px; }

    .page-dashboard .app-shell-header {
        gap: 8px;
        padding: 8px 10px;
    }

    .page-dashboard .brand {
        gap: 9px;
    }

    .page-dashboard .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 13px;
    }

    .page-dashboard .brand-mark svg {
        width: 23px;
        height: 23px;
    }

    .page-dashboard .brand strong {
        font-size: 1.06rem;
    }

    .page-dashboard .toolbar,
    .page-dashboard .compact-toolbar {
        gap: 7px;
        padding: 6px;
        border-radius: 15px;
    }

    .page-dashboard .toolbar select,
    .page-dashboard .toolbar > button,
    .page-dashboard .toolbar > .feedback-toolbar-link,
    .page-dashboard .theme-toggle-button {
        min-height: 40px;
        padding-top: 8px;
        padding-bottom: 8px;
        border-radius: 11px;
    }

    .page-dashboard .feedback-toolbar-link,
    .page-dashboard .theme-toggle-button {
        width: 40px;
        min-width: 40px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .page-dashboard .app-main,
    .page-dashboard main {
        width: calc(100% - 16px);
        padding-top: 8px;
    }

    .page-dashboard .mobile-hero-card {
        gap: 10px;
        margin-bottom: 8px;
        padding: 11px 13px;
        border-radius: 19px;
    }

    .page-dashboard .mobile-hero-card .eyebrow {
        margin-bottom: 3px;
        font-size: .60rem;
        letter-spacing: .12em;
    }

    .page-dashboard .mobile-hero-card h1 {
        margin-bottom: 4px;
        font-size: 1.48rem;
        line-height: 1.02;
    }

    .page-dashboard .mobile-hero-card .lead {
        display: -webkit-box;
        overflow: hidden;
        font-size: .79rem;
        line-height: 1.32;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .page-dashboard .hero-status-dot {
        width: 34px;
        height: 34px;
    }

    .page-dashboard .status-strip {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 2px 9px;
        margin: 0 0 8px;
        padding: 8px 10px;
        border-left-width: 4px;
        border-radius: 15px;
        font-size: .82rem;
        line-height: 1.25;
    }

    .page-dashboard .status-strip .dot {
        grid-row: 1 / span 2;
        width: 9px;
        height: 9px;
    }

    .page-dashboard .status-strip .timestamp {
        grid-column: 2;
        width: auto;
        margin: 0;
        font-size: .67rem;
        line-height: 1.2;
    }

    .page-dashboard .status-strip.has-warnings #statusText::after {
        content: ' · Huomiot';
    }

    .page-dashboard .cards {
        gap: 8px;
        margin-bottom: 10px;
    }

    .page-dashboard .overview-metar-card {
        padding: 11px;
        border-radius: 19px;
    }

    .page-dashboard .overview-metar-heading {
        margin-bottom: 7px;
    }

    .page-dashboard .overview-metar-heading .eyebrow {
        margin-bottom: 2px;
        font-size: .58rem;
        letter-spacing: .12em;
    }

    .page-dashboard .overview-metar-heading h1 {
        font-size: .88rem;
    }

    .page-dashboard .overview-metar-heading .pill {
        max-width: none;
        padding: 4px 7px;
        font-size: .64rem;
        white-space: nowrap;
    }

    .page-dashboard .overview-metar-layout {
        gap: 8px;
    }

    .page-dashboard .overview-weather-messages {
        border-radius: 13px;
    }

    .page-dashboard .overview-metar-raw {
        min-height: 54px;
        padding: 9px 10px;
        font-size: .74rem;
        line-height: 1.38;
    }

    .page-dashboard .overview-metar-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .page-dashboard .overview-metar-ceiling,
    .page-dashboard .overview-current-wind {
        min-height: 116px;
        padding: 9px;
        border-radius: 14px;
    }

    .page-dashboard .overview-metar-ceiling .metric-icon {
        width: 26px;
        height: 26px;
        margin-bottom: 4px;
        border-radius: 9px;
        font-size: .95rem;
    }

    .page-dashboard .overview-metar-ceiling .label,
    .page-dashboard .overview-current-wind .label {
        font-size: .59rem;
        letter-spacing: .045em;
    }

    .page-dashboard .overview-metar-ceiling .label {
        margin-bottom: 4px;
    }

    .page-dashboard .overview-metar-ceiling strong {
        margin-bottom: 3px;
        font-size: .96rem;
    }

    .page-dashboard .overview-metar-ceiling small {
        font-size: .66rem;
        line-height: 1.2;
    }

    .page-dashboard .overview-current-wind-heading {
        gap: 6px;
    }

    .page-dashboard .overview-current-wind-icon {
        width: 25px;
        height: 25px;
        border-radius: 8px;
        font-size: .88rem;
    }

    .page-dashboard .overview-current-wind-main {
        gap: 7px;
        margin: 6px 0;
    }

    .page-dashboard .overview-current-wind-arrow {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 1.05rem;
    }

    .page-dashboard .overview-current-wind-main strong {
        font-size: .91rem;
    }

    .page-dashboard .overview-current-wind-main small {
        margin-top: 2px;
        font-size: .61rem;
        line-height: 1.15;
    }

    .page-dashboard .overview-current-wind-values {
        gap: 4px;
        margin-bottom: 0;
    }

    .page-dashboard .overview-current-wind-values > span {
        padding: 5px 6px;
        border-radius: 9px;
    }

    .page-dashboard .overview-current-wind-values small {
        margin-bottom: 1px;
        font-size: .52rem;
        letter-spacing: .025em;
    }

    .page-dashboard .overview-current-wind-values strong {
        font-size: .65rem;
    }

    .page-dashboard .overview-summary-card-head {
        gap: 6px;
        margin-bottom: 6px;
    }

    .page-dashboard .overview-summary-card-head .label {
        margin-top: 2px;
    }

    .page-dashboard .overview-layerwind-card {
        padding: 11px;
        border-radius: 19px;
    }

    .page-dashboard .overview-layerwind-heading {
        gap: 8px;
    }

    .page-dashboard .overview-layerwind-actions {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
    }

    .page-dashboard .overview-layerwind-day-button {
        min-height: 28px;
        padding: 4px 9px;
        font-size: .70rem;
    }

    .page-dashboard .overview-layerwind-actions .pill {
        font-size: .62rem;
    }

    .page-dashboard .overview-layerwind-title {
        gap: 8px;
    }

    .page-dashboard .overview-layerwind-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        border-radius: 10px;
    }

    .page-dashboard .overview-layerwind-icon svg {
        width: 16px;
        height: 16px;
    }

    .page-dashboard .overview-layerwind-title h2 {
        margin-bottom: 3px;
        font-size: .98rem;
    }

    .page-dashboard .overview-layerwind-title .note {
        font-size: .67rem;
        line-height: 1.35;
    }

    .page-dashboard .overview-layerwind-wrap {
        margin-top: 10px;
        border-radius: 14px;
    }

    .page-dashboard .overview-layerwind-grid {
        grid-template-columns: 68px repeat(8, minmax(70px, 1fr));
        gap: 1px;
        min-width: 640px;
    }

    .page-dashboard .overview-layerwind-corner {
        padding: 8px 4px;
        font-size: .62rem;
    }

    .page-dashboard .overview-layerwind-head {
        min-height: 50px;
        padding: 6px 4px;
    }

    .page-dashboard .overview-layerwind-head span {
        font-size: .74rem;
    }

    .page-dashboard .overview-layerwind-head small {
        font-size: .52rem;
        padding: 2px 5px;
    }

    .page-dashboard .overview-layerwind-alt,
    .page-dashboard .overview-layerwind-cell {
        min-height: 60px;
    }

    .page-dashboard .overview-layerwind-alt {
        font-size: .68rem;
        padding: 6px 4px;
    }

    .page-dashboard .overview-layerwind-cell {
        gap: 4px;
        padding: 6px 6px;
    }

    .page-dashboard .overview-layerwind-cell strong {
        font-size: .75rem;
    }

    .page-dashboard .overview-layerwind-meta {
        font-size: .64rem;
    }

    .page-dashboard .overview-layerwind-arrow {
        font-size: 1.22rem;
    }

    .page-dashboard .overview-layerwind-status {
        padding: 12px;
        font-size: .74rem;
    }

    .page-dashboard .overview-current-wind-source {
        display: none;
    }

    .page-dashboard .overview-taf-raw {
        max-height: 54px;
        padding: 7px 10px 8px;
        font-size: .63rem;
        line-height: 1.35;
    }
}

@media (max-width: 390px) {
    .page-dashboard .app-shell-header {
        padding-left: 8px;
        padding-right: 8px;
    }

    .page-dashboard .mobile-hero-card {
        padding-left: 11px;
        padding-right: 11px;
    }

    .page-dashboard .mobile-hero-card h1 {
        font-size: 1.35rem;
    }

    .page-dashboard .mobile-hero-card .lead {
        font-size: .74rem;
    }

    .page-dashboard .overview-metar-ceiling,
    .page-dashboard .overview-current-wind {
        padding: 8px;
    }

    .page-dashboard .overview-current-wind-arrow {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
}

/* =========================================================
   HYPPYSÄÄ 2.0 – minimalistinen vaihtoehtoinen etusivu
   ========================================================= */
.hyppysaa-v2 {
    --v2-surface: rgba(9, 27, 46, .84);
    --v2-surface-strong: rgba(12, 35, 58, .94);
    --v2-line: rgba(127, 166, 207, .18);
}

.hyppysaa-v2 .v2-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 74px;
    padding-top: 12px;
    padding-bottom: 12px;
    background: rgba(3, 11, 21, .88);
}

.hyppysaa-v2 .v2-brand-name strong {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: 1.34rem;
}

.hyppysaa-v2 .v2-brand-name em {
    color: var(--blue);
    font-style: normal;
    font-size: .82em;
    font-weight: 900;
}

.hyppysaa-v2 .v2-toolbar {
    padding: 5px;
    gap: 7px;
    box-shadow: none;
    background: rgba(7, 19, 34, .50);
}

.hyppysaa-v2 .v2-toolbar select {
    min-width: 180px;
}

.hyppysaa-v2 .v2-icon-button,
.hyppysaa-v2 .v2-feedback-button,
.hyppysaa-v2 .theme-toggle-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 13px;
}

.hyppysaa-v2 .v2-icon-button {
    display: inline-grid;
    place-items: center;
    background: rgba(5, 24, 42, .84);
    color: var(--cyan);
}

.hyppysaa-v2 .v2-icon-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hyppysaa-v2 .v2-feedback-button,
.hyppysaa-v2 .theme-toggle-button {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
}

.hyppysaa-v2 .v2-feedback-button > span,
.hyppysaa-v2 .theme-toggle-button .theme-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hyppysaa-v2 .status-strip {
    min-height: 48px;
    margin: 4px 0 14px;
    padding: 10px 14px;
    border-left-width: 1px;
    border-radius: 16px;
    box-shadow: none;
    background: rgba(9, 26, 45, .70);
}

.hyppysaa-v2 .status-strip.has-warnings #statusText::after {
    content: '';
}

.hyppysaa-v2 .status-strip .timestamp {
    font-size: .78rem;
}

.hyppysaa-v2 .v2-now-section,
.hyppysaa-v2 .v2-layerwind-section {
    margin-bottom: 14px;
}

.hyppysaa-v2 .v2-now-card,
.hyppysaa-v2 .v2-layerwind-card {
    border-radius: 24px;
    padding: clamp(16px, 3vw, 26px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255,255,255,.035);
}

.hyppysaa-v2 .v2-now-card {
    position: relative;
    overflow: visible;
    border-color: rgba(47, 140, 255, .34);
    background:
        radial-gradient(circle at 72% 30%, rgba(47,140,255,.10), transparent 18rem),
        linear-gradient(145deg, rgba(11, 34, 57, .95), rgba(7, 24, 41, .90));
}

.hyppysaa-v2 .v2-now-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.hyppysaa-v2 .v2-now-heading h1 {
    margin: 0;
    color: #4bc6ff;
    font-size: clamp(1.45rem, 4vw, 2rem);
    letter-spacing: -.025em;
}

.hyppysaa-v2 .v2-location-pill {
    max-width: min(52vw, 360px);
    overflow: hidden;
    padding: 6px 10px;
    border: 1px solid rgba(96, 165, 250, .22);
    border-radius: 999px;
    color: #a9bdd4;
    background: rgba(4, 18, 32, .42);
    font-size: .75rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hyppysaa-v2 .v2-now-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.hyppysaa-v2 .v2-now-stat {
    min-width: 0;
    min-height: 198px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px clamp(10px, 2vw, 22px);
    text-align: center;
}

.hyppysaa-v2 .v2-now-stat + .v2-now-stat {
    border-left: 1px solid rgba(148, 177, 214, .18);
}

.hyppysaa-v2 .v2-stat-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--cyan);
}

.hyppysaa-v2 .v2-stat-icon svg {
    width: 46px;
    height: 46px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hyppysaa-v2 .v2-stat-label {
    color: #9bacbf;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.hyppysaa-v2 .v2-cloud-stat > strong {
    margin-top: 2px;
    color: var(--ink);
    font-size: clamp(1.45rem, 4vw, 2.45rem);
    line-height: 1.02;
    letter-spacing: -.035em;
}

.hyppysaa-v2 .v2-cloud-stat > small {
    color: #61caff;
    font-size: .86rem;
    font-weight: 800;
}

.hyppysaa-v2 .v2-wind-stat {
    background: transparent !important;
    border-radius: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none !important;
}

.hyppysaa-v2 .v2-wind-compass {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 1px;
    border: 2px solid rgba(148, 177, 214, .27);
    border-radius: 50%;
    box-shadow: inset 0 0 0 5px rgba(3, 10, 20, .30);
}

.hyppysaa-v2 .v2-wind-compass .overview-current-wind-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    display: grid;
    place-items: center;
    color: var(--cyan);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 1.35rem;
    line-height: 1;
    transform: rotate(var(--wind-rotation, 0deg));
    transform-origin: 50% 44px;
}

.hyppysaa-v2 .v2-wind-compass > strong {
    font-size: 1.4rem;
    line-height: 1;
}

.hyppysaa-v2 .v2-wind-speed {
    color: var(--ink);
    font-size: clamp(1.35rem, 3.6vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.hyppysaa-v2 .v2-wind-stat > small:not(.sr-only) {
    color: #9fb2c9;
    font-size: .84rem;
}

.hyppysaa-v2 .v2-wind-stat .v2-wind-compass-name {
    color: #58c7ff !important;
    font-weight: 750;
}

.hyppysaa-v2 .v2-message-stat {
    display: none;
    justify-content: center;
}

.hyppysaa-v2 .v2-weather-hold {
    min-width: 112px;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin-top: 4px;
    padding: 8px 16px;
    border: 1px solid rgba(34, 211, 238, .28);
    border-radius: 18px;
    background: rgba(4, 23, 40, .72);
    color: #dff9ff;
    box-shadow: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.hyppysaa-v2 .v2-weather-hold strong {
    font-size: .96rem;
}

.hyppysaa-v2 .v2-weather-hold small {
    color: #86a5c1;
    font-size: .68rem;
    font-weight: 750;
}

.hyppysaa-v2 .v2-weather-hold.is-active {
    border-color: rgba(34, 211, 238, .72);
    background: rgba(8, 71, 102, .78);
    transform: scale(.98);
}

.hyppysaa-v2 .v2-weather-backdrop {
    display: none;
}

.hyppysaa-v2 .v2-weather-panel {
    position: static;
    margin-top: 14px;
    max-height: none;
    overflow: visible;
    padding: 14px 16px;
    border: 1px solid rgba(96, 165, 250, .18);
    border-radius: 17px;
    background: rgba(4, 18, 32, .44);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.hyppysaa-v2 .v2-weather-panel.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.hyppysaa-v2 .v2-weather-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    color: var(--ink);
}

.hyppysaa-v2 .v2-weather-panel-head > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.hyppysaa-v2 .v2-weather-panel-head span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.hyppysaa-v2 .v2-weather-close {
    display: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(148,177,214,.18);
    border-radius: 10px;
    background: rgba(255,255,255,.035);
    color: var(--ink);
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.hyppysaa-v2 .v2-weather-panel .overview-weather-messages {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(148, 177, 214, .14);
}

.hyppysaa-v2 .v2-weather-panel .overview-taf-raw {
    border-top: 0;
    border-left: 1px solid rgba(148, 177, 214, .14);
}

.hyppysaa-v2 .v2-weather-panel pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: .78rem;
    line-height: 1.45;
}

.hyppysaa-v2 .v2-layerwind-card {
    padding-top: 18px;
}

.hyppysaa-v2 .v2-layerwind-heading {
    align-items: center;
    margin-bottom: 12px;
}

.hyppysaa-v2 .v2-layerwind-heading h2 {
    color: #4bc6ff;
    font-size: clamp(1.16rem, 3vw, 1.55rem);
    letter-spacing: -.01em;
    text-transform: none;
}

.hyppysaa-v2 .v2-layerwind-guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin: -2px 0 12px;
    color: var(--muted);
    font-size: .72rem;
}

.hyppysaa-v2 .v2-layerwind-guide p {
    margin: 0;
    line-height: 1.45;
}

.hyppysaa-v2 .v2-layerwind-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 10px;
    white-space: nowrap;
}

.hyppysaa-v2 .v2-layerwind-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hyppysaa-v2 .v2-layerwind-legend i {
    width: 9px;
    height: 9px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 999px;
}

.hyppysaa-v2 .v2-layerwind-legend i.is-ok { background: #22c55e; }
.hyppysaa-v2 .v2-layerwind-legend i.is-warn { background: #facc15; }
.hyppysaa-v2 .v2-layerwind-legend i.is-alert { background: #fb923c; }
.hyppysaa-v2 .v2-layerwind-legend i.is-bad { background: #f87171; }

.hyppysaa-v2 .overview-layerwind-day-nav {
    padding: 3px;
    border-radius: 999px;
    background: rgba(5, 22, 39, .62);
}

.hyppysaa-v2 .overview-layerwind-day-button {
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .75rem;
}

.hyppysaa-v2 .overview-layerwind-wrap {
    margin-top: 0;
    border-radius: 16px;
}

.hyppysaa-v2 .overview-layerwind-grid {
    gap: 1px;
}

.hyppysaa-v2 .overview-layerwind-cell {
    min-height: 66px;
    gap: 2px;
    padding: 7px 8px;
    align-items: center;
    text-align: center;
}

.hyppysaa-v2 .overview-layerwind-cell strong {
    order: 2;
    font-size: .75rem;
    font-weight: 650;
    opacity: .84;
}

.hyppysaa-v2 .overview-layerwind-meta {
    order: 1;
    justify-content: center;
    min-height: 29px;
}

.hyppysaa-v2 .overview-layerwind-meta > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.hyppysaa-v2 .overview-layerwind-arrow {
    font-size: 1.62rem;
    text-shadow: none;
}

.hyppysaa-v2 .overview-layerwind-head {
    min-height: 50px;
    padding: 6px 4px;
}

.hyppysaa-v2 .overview-layerwind-alt {
    min-height: 66px;
    background: #0f2239;
}

.hyppysaa-v2 .v2-warnings-section {
    margin-top: 4px;
    opacity: .92;
}

.hyppysaa-v2 .v2-warnings-section .card {
    box-shadow: none;
}

/* Vaalea teema 2.0 */
html[data-theme="light"] .hyppysaa-v2 {
    --v2-surface: #ffffff;
    --v2-surface-strong: #f7fbff;
}

html[data-theme="light"] .hyppysaa-v2 .v2-header {
    background: rgba(248, 252, 255, .94);
}

html[data-theme="light"] .hyppysaa-v2 .v2-now-card {
    border-color: rgba(37,99,235,.20);
    background:
        radial-gradient(circle at 72% 30%, rgba(37,99,235,.07), transparent 18rem),
        linear-gradient(145deg, rgba(255,255,255,.99), rgba(245,250,255,.98));
}

html[data-theme="light"] .hyppysaa-v2 .v2-wind-compass {
    border-color: rgba(72,111,166,.26);
    box-shadow: inset 0 0 0 5px rgba(228,239,253,.62);
}

html[data-theme="light"] .hyppysaa-v2 .v2-weather-hold {
    border-color: rgba(37,99,235,.18);
    background: rgba(239,247,255,.90);
    color: #17365d;
}

html[data-theme="light"] .hyppysaa-v2 .v2-weather-panel {
    border-color: rgba(37,99,235,.22);
    background: rgba(255,255,255,.99);
    box-shadow: 0 24px 60px rgba(15,35,60,.20);
}

html[data-theme="light"] .hyppysaa-v2 .v2-location-pill {
    border-color: rgba(37,99,235,.18);
    background: rgba(239,247,255,.86);
    color: #315478;
}

html[data-theme="light"] .hyppysaa-v2 .v2-weather-backdrop {
    background: rgba(23, 54, 93, .28);
}

html[data-theme="light"] .hyppysaa-v2 .v2-now-stat + .v2-now-stat {
    border-left-color: rgba(72,111,166,.16);
}

html[data-theme="light"] .hyppysaa-v2 .overview-layerwind-alt {
    background: #f7fbff;
}

@media (max-width: 780px) {
    :root { --sticky-header-offset: 142px; }

    .hyppysaa-v2 .v2-header {
        grid-template-columns: 1fr;
        gap: 9px;
        padding: 9px 12px 10px;
    }

    .hyppysaa-v2 .v2-brand {
        width: fit-content;
    }

    .hyppysaa-v2 .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 13px;
    }

    .hyppysaa-v2 .brand-mark svg {
        width: 23px;
        height: 23px;
    }

    .hyppysaa-v2 .v2-brand-name strong {
        font-size: 1.14rem;
    }

    .hyppysaa-v2 .v2-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
        width: 100%;
        gap: 6px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .hyppysaa-v2 .v2-toolbar select {
        width: 100%;
        min-width: 0;
        height: 42px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .hyppysaa-v2 .v2-feedback-button,
    .hyppysaa-v2 .theme-toggle-button,
    .hyppysaa-v2 .v2-icon-button {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }

    .hyppysaa-v2 .app-main,
    .hyppysaa-v2 main {
        width: calc(100% - 18px);
        padding-top: 8px;
    }

    .hyppysaa-v2 .status-strip {
        display: grid;
        grid-template-columns: 12px minmax(0, 1fr);
        grid-template-areas:
            "dot text"
            "dot time";
        align-items: start;
        column-gap: 10px;
        row-gap: 2px;
        min-height: 52px;
        margin-bottom: 10px;
        padding: 9px 11px;
        border-radius: 14px;
    }

    .hyppysaa-v2 .status-strip .dot {
        grid-area: dot;
        width: 8px;
        height: 8px;
        align-self: center;
    }

    .hyppysaa-v2 .status-strip #statusText {
        grid-area: text;
        min-width: 0;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        line-height: 1.25;
        font-size: .78rem;
    }

    .hyppysaa-v2 .status-strip .timestamp {
        grid-area: time;
        width: auto;
        margin: 0;
        white-space: normal;
        text-align: left;
        font-size: .66rem;
        opacity: .92;
    }

    .hyppysaa-v2 .v2-now-card,
    .hyppysaa-v2 .v2-layerwind-card {
        border-radius: 20px;
        padding: 13px;
    }

    .hyppysaa-v2 .v2-now-heading {
        margin-bottom: 8px;
    }

    .hyppysaa-v2 .v2-now-heading h1 {
        font-size: 1.22rem;
    }

    .hyppysaa-v2 .v2-location-pill {
        max-width: 62vw;
        padding: 4px 8px;
        font-size: .63rem;
    }

    .hyppysaa-v2 .v2-now-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hyppysaa-v2 .v2-now-stat {
        min-height: 158px;
        gap: 5px;
        padding: 7px 6px;
    }

    .hyppysaa-v2 .v2-stat-icon {
        width: 38px;
        height: 38px;
    }

    .hyppysaa-v2 .v2-stat-icon svg {
        width: 35px;
        height: 35px;
    }

    .hyppysaa-v2 .v2-stat-label {
        font-size: .58rem;
        letter-spacing: .07em;
    }

    .hyppysaa-v2 .v2-cloud-stat > strong {
        font-size: 1.16rem;
    }

    .hyppysaa-v2 .v2-cloud-stat > small,
    .hyppysaa-v2 .v2-wind-stat > small:not(.sr-only) {
        font-size: .65rem;
    }

    .hyppysaa-v2 .v2-wind-compass {
        width: 54px;
        height: 54px;
        box-shadow: inset 0 0 0 3px rgba(3, 10, 20, .28);
    }

    .hyppysaa-v2 .v2-wind-compass .overview-current-wind-arrow {
        top: -7px;
        font-size: 1.08rem;
        transform-origin: 50% 34px;
    }

    .hyppysaa-v2 .v2-wind-compass > strong {
        font-size: 1rem;
    }

    .hyppysaa-v2 .v2-wind-speed {
        font-size: 1.1rem;
    }

    .hyppysaa-v2 .v2-weather-hold {
        min-width: 0;
        width: 100%;
        min-height: 50px;
        padding: 6px 5px;
        border-radius: 14px;
    }

    .hyppysaa-v2 .v2-weather-hold strong {
        font-size: .78rem;
    }

    .hyppysaa-v2 .v2-weather-hold small {
        font-size: .58rem;
    }

    .hyppysaa-v2 .v2-message-stat {
        display: flex;
    }

    .hyppysaa-v2 .v2-weather-backdrop {
        position: fixed;
        z-index: 118;
        inset: 0;
        display: block;
        background: rgba(1, 8, 17, .64);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .14s ease, visibility .14s linear;
    }

    .hyppysaa-v2 .v2-weather-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .hyppysaa-v2 .v2-weather-panel {
        position: fixed;
        z-index: 120;
        top: 50%;
        left: 12px;
        right: 12px;
        margin: 0;
        max-height: min(72vh, 620px);
        overflow: auto;
        padding: 14px;
        border-radius: 18px;
        background: rgba(4, 18, 32, .99);
        box-shadow: 0 30px 80px rgba(0,0,0,.58), 0 0 0 1px rgba(34,211,238,.06);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(calc(-50% + 8px)) scale(.985);
        transition: opacity .14s ease, transform .14s ease, visibility .14s linear;
    }

    .hyppysaa-v2 .v2-weather-panel.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(-50%) scale(1);
    }

    .hyppysaa-v2 .v2-weather-panel-head > div {
        display: block;
    }

    .hyppysaa-v2 .v2-weather-panel-head span {
        display: block;
        margin-top: 2px;
    }

    .hyppysaa-v2 .v2-weather-close {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
    }

    .hyppysaa-v2 .v2-weather-panel .overview-weather-messages {
        display: block;
    }

    .hyppysaa-v2 .v2-weather-panel .overview-taf-raw {
        border-left: 0;
        border-top: 1px solid rgba(148, 177, 214, .14);
    }

    .hyppysaa-v2 .v2-weather-panel pre {
        font-size: .70rem;
        user-select: text;
        -webkit-user-select: text;
    }

    .hyppysaa-v2.weather-messages-visible {
        overflow: hidden;
    }

    .hyppysaa-v2 .v2-layerwind-heading {
        gap: 8px;
        margin-bottom: 9px;
    }

    .hyppysaa-v2 .v2-layerwind-heading h2 {
        font-size: 1rem;
    }

    .hyppysaa-v2 .v2-layerwind-guide {
        display: block;
        margin-bottom: 9px;
        font-size: .64rem;
    }

    .hyppysaa-v2 .v2-layerwind-legend {
        justify-content: flex-start;
        gap: 4px 8px;
        margin-top: 6px;
        white-space: normal;
    }

    .hyppysaa-v2 .overview-layerwind-day-button {
        min-height: 29px;
        padding: 5px 9px;
        font-size: .66rem;
    }

    .hyppysaa-v2 .overview-layerwind-grid {
        grid-template-columns: 66px repeat(8, minmax(66px, 1fr));
        min-width: 600px;
    }

    .hyppysaa-v2 .overview-layerwind-head {
        min-height: 42px;
    }

    .hyppysaa-v2 .overview-layerwind-head span {
        font-size: .68rem;
    }

    .hyppysaa-v2 .overview-layerwind-alt,
    .hyppysaa-v2 .overview-layerwind-cell {
        min-height: 57px;
    }

    .hyppysaa-v2 .overview-layerwind-alt {
        padding: 5px 3px;
        font-size: .61rem;
    }

    .hyppysaa-v2 .overview-layerwind-cell {
        padding: 4px;
    }

    .hyppysaa-v2 .overview-layerwind-cell strong {
        font-size: .63rem;
    }

    .hyppysaa-v2 .overview-layerwind-arrow {
        font-size: 1.35rem;
    }

    .hyppysaa-v2 .v2-warnings-section {
        margin-top: 0;
    }
}

@media (max-width: 430px) {
    .hyppysaa-v2 .status-strip .timestamp {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }

    .hyppysaa-v2 .v2-now-stat {
        min-height: 150px;
        padding-inline: 4px;
    }

    .hyppysaa-v2 .v2-cloud-stat > strong,
    .hyppysaa-v2 .v2-wind-speed {
        font-size: 1.02rem;
    }
}

.hyppysaa-v2 #overviewLayerWindUpdated { display: none !important; }
