:root {
    --gp-gradient-home: linear-gradient(135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100%);
    --gp-gradient-go: linear-gradient(110deg, #047857 0%, #0f766e 52%, #2563eb 100%);
    --gp-gradient-watch: linear-gradient(110deg, #0e7490 0%, #2563eb 52%, #7c3aed 100%);
    --gp-gradient-quiet: linear-gradient(110deg, #475569 0%, #4f46e5 100%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0b1020;
    color: #e5e7eb;
    font-family: Inter, Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: #7dd3fc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    background: #111827;
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand strong {
    font-size: 1.25rem;
}

.tagline {
    color: #94a3b8;
    font-size: 0.85rem;
}

.site-header nav:not(.site-nav) {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.site-header nav:not(.site-nav) a {
    color: #cbd5e1;
}

.site-header nav:not(.site-nav) a.active,
.site-header nav:not(.site-nav) a.cta-link {
    color: #fff;
    background: #0284c7;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
}

.page {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px;
}

body.map-page {
    background: #f8fafc;
    color: #0f172a;
}

body.map-page a {
    color: #0369a1;
}

body.map-page .site-header {
    background: #ffffff;
    border-bottom-color: #d1d5db;
    color: #0f172a;
}

body.map-page .site-header nav a {
    color: #475569;
}

body.map-page .site-header nav a.active,
body.map-page .site-header nav a.cta-link {
    color: #fff;
    background: #0369a1;
}

body.map-page .page {
    background: #f8fafc;
    padding: 0;
}

body.map-page #map {
    background: #ffffff;
}

body.map-page .radar-box {
    background: rgba(255,255,255,0.96);
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    margin-bottom: 32px;
    padding: 32px 28px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-radius: 24px;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.hero-copy h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    margin: 0 0 12px;
    background: linear-gradient(135deg, #e0f2fe 0%, #ddd6fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero-copy p {
    color: #cbd5e1;
    max-width: 52ch;
    font-size: 1.05rem;
    line-height: 1.6;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
    color: #93c5fd;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    border: 1px solid rgba(147, 197, 253, 0.2);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.button {
    display: inline-block;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(2, 132, 199, 0.5);
    background: linear-gradient(135deg, #0369a1 0%, #034e89 100%);
}

.button.ghost {
    background: transparent;
    border: 2px solid #7dd3fc;
    color: #7dd3fc;
    box-shadow: none;
}

.button.ghost:hover {
    background: rgba(125, 211, 252, 0.1);
    border-color: #38bdf8;
}

.hero-card,
.panel,
.promo-box,
.card,
.login-box {
    background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.hero-card {
    border: 2px solid rgba(2, 132, 199, 0.3);
}

.hero-card h2 {
    font-size: 1.3rem;
    margin: 0 0 16px;
    color: #e0f2fe;
}

.hero-card:hover {
    border-color: rgba(2, 132, 199, 0.6);
    box-shadow: 0 12px 40px rgba(2, 132, 199, 0.2);
}

.checklist {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
    list-style: none;
}

.checklist li {
    padding: 8px 0;
    position: relative;
    font-size: 1rem;
}

.checklist li:before {
    content: "✓";
    position: absolute;
    left: -20px;
    color: #22c55e;
    font-weight: 700;
}

.panel {
    margin-bottom: 32px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.panel h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #e0f2fe;
}

.station-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.station-tab {
    display: inline-block;
    background: #0f172a;
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    text-decoration: none;
}

.station-tab.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

.train-board {
    overflow-x: auto;
}

.train-head,
.train-row {
    display: grid;
    grid-template-columns: 70px 1.2fr 1fr 80px;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #1f2937;
    min-width: 520px;
}

.train-head {
    color: #94a3b8;
    font-size: 0.85rem;
}

.train-row.delayed {
    color: #fca5a5;
}

.demand-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.demand-chip {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 110px;
}

.demand-chip strong {
    display: block;
}

.demand-chip.level-green { border-color: #22c55e; }
.demand-chip.level-yellow { border-color: #f59e0b; }
.demand-chip.level-red { border-color: #ef4444; }
.demand-chip.level-purple { border-color: #a855f7; }

.two-col {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.two-col > div > h2 {
    font-size: 1.3rem;
    margin: 0 0 20px;
    color: #e0f2fe;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.event-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 14px;
    padding: 14px;
    border-bottom: none;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(147, 197, 253, 0.1);
    transition: all 0.2s ease;
}

.event-item:hover {
    background: rgba(15, 23, 42, 1);
    border-color: rgba(147, 197, 253, 0.3);
}

.event-time {
    color: #38bdf8;
    font-weight: 700;
    font-size: 1rem;
}

.event-item strong {
    color: #e0f2fe;
}

/* Compact train list na starcie */
.train-list-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.train-row-compact {
    display: grid;
    grid-template-columns: 70px 1fr 80px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    border-left: 3px solid #0284c7;
    transition: all 0.2s ease;
}

.train-row-compact:hover {
    background: rgba(15, 23, 42, 1);
    border-left-color: #38bdf8;
    transform: translateX(4px);
}

.trc-time {
    font-size: 0.95rem;
    color: #e0f2fe;
}

.trc-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trc-train {
    font-size: 0.9rem;
    color: #e0f2fe;
    font-weight: 600;
}

.trc-route {
    font-size: 0.75rem;
    color: #94a3b8;
}

.muted {
    color: #94a3b8;
}

.small {
    font-size: 0.85rem;
}

.notice {
    background: #451a03;
    border: 1px solid #92400e;
    padding: 12px;
    border-radius: 12px;
}

.site-footer {
    max-width: 1280px;
    margin: 0 auto;
    color: #64748b;
    font-size: 0.78rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #60a5fa;
    font-weight: 750;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #a5b4fc;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer--desktop {
    margin-top: 18px;
    padding: 22px 24px 0;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 20px 20px 0 0;
    background:
        linear-gradient(120deg, rgba(56, 189, 248, 0.05), transparent 34%, rgba(139, 92, 246, 0.06)),
        rgba(8, 15, 30, 0.96);
    box-shadow: 0 -8px 34px rgba(2, 8, 23, 0.2);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(280px, 1.15fr) minmax(190px, 0.8fr);
    gap: 30px;
    align-items: start;
}

.site-footer__brand-line {
    display: flex;
    align-items: center;
    gap: 11px;
}

.site-footer__logo {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(129, 140, 248, 0.34);
    border-radius: 13px;
    background: var(--gp-gradient-home);
    font-size: 1.2rem;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.25);
}

.site-footer__brand-line strong,
.site-footer__brand-line small {
    display: block;
}

.site-footer__brand-line strong {
    color: #f8fafc;
    font-size: 1rem;
}

.site-footer__brand-line small {
    margin-top: 1px;
    color: #94a3b8;
    font-size: 0.68rem;
}

.site-footer__brand p {
    max-width: 440px;
    margin-top: 11px;
    color: #8191a7;
    font-size: 0.72rem;
    line-height: 1.55;
}

.site-footer__nav > strong,
.site-footer__system > strong {
    display: block;
    margin-bottom: 9px;
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer__nav > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
}

.site-footer__nav a,
.site-footer__system span,
.site-footer__system a {
    font-size: 0.72rem;
}

.site-footer__system {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.site-footer__system > strong {
    margin-bottom: 4px;
}

.site-footer__system span {
    color: #94a3b8;
}

.site-footer__system i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 9px rgba(34, 197, 94, 0.65);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: 10px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #65758b;
    font-size: 0.66rem;
}

.site-footer__bottom a,
.site-footer--mobile a {
    color: inherit;
    text-decoration: none;
}

.site-footer__bottom a:hover,
.site-footer--mobile a:hover {
    color: #7dd3fc;
}

.site-footer--mobile {
    display: none;
}

@media (max-width: 767px) {
    .site-footer--desktop {
        display: none;
    }

    .site-footer--mobile {
        display: block;
        margin: 0;
        padding: 9px 12px max(9px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(148, 163, 184, 0.12);
        color: #64748b;
        font-size: 0.68rem;
        text-align: center;
    }

    .site-footer--mobile p {
        margin: 2px 0;
    }
}

.login-box {
    width: min(420px, calc(100% - 32px));
    margin: 80px auto;
}

input,
button,
select {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
}

button {
    background: #0284c7;
    border: none;
    cursor: pointer;
}

.error {
    background: #7f1d1d;
    padding: 10px;
    border-radius: 10px;
    margin: 10px 0;
}

.auth-body {
    min-height: 100vh;
    background: #0b1020;
}

.auth-top {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
}

.auth-brand {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.auth-brand strong {
    font-size: 1rem;
    color: #f8fafc;
}

.auth-brand span {
    font-size: 0.72rem;
    color: #94a3b8;
}

.auth-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 16px 32px;
}

.auth-box {
    width: min(440px, 100%);
    margin: 0;
    padding: 24px 22px;
}

.auth-box h1 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: #f8fafc;
}

.auth-box .muted {
    margin: 0 0 16px;
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.45;
}

.auth-form {
    margin-top: 4px;
}

.form-field {
    display: block;
    margin-bottom: 4px;
}

.form-label {
    display: block;
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
}

.optional-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: normal;
    margin-left: 4px;
}

.auth-form input,
.auth-form select,
.auth-form button {
    margin: 0;
}

.auth-form .btn-primary,
.auth-form button[type="submit"] {
    margin-top: 14px;
    font-weight: 700;
}

.plan-summary {
    margin: 16px 0 20px;
    padding: 0;
    list-style: none;
}

.plan-summary li {
    padding: 6px 0;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 4px;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.4;
    cursor: pointer;
}

.form-check input {
    width: auto;
    margin: 3px 0 0;
    flex-shrink: 0;
}

.auth-switch {
    margin: 18px 0 0;
    text-align: center;
    font-size: 0.86rem;
    color: #94a3b8;
}

.auth-switch a {
    font-weight: 600;
}

.auth-footer {
    text-align: center;
    padding: 8px 16px max(10px, env(safe-area-inset-bottom));
}

.coming-soon {
    max-width: 520px;
    margin: 24px auto 40px;
    padding: 36px 28px;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(2, 8, 23, 0.2);
}

.coming-soon--compact {
    max-width: none;
    margin: 0 0 24px;
    padding: 20px 18px;
    text-align: left;
}

.coming-soon-icon {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 12px;
}

.coming-soon h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.coming-soon-lead {
    margin: 0 0 10px;
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 0.95rem;
}

.coming-soon-badge {
    display: inline-block;
    margin: 0 0 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #c4b5fd;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.coming-soon-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 22px;
}

.coming-soon-actions .button {
    width: auto;
    margin: 0;
    padding: 12px 18px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .auth-page {
        padding-top: 4px;
    }

    .auth-box {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .auth-box h1 {
        font-size: 1.2rem;
    }
}

.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    width: min(100%, 280px);
}

.hot {
    border-color: #ef4444;
}

#map {
    height: calc(100vh - 72px);
}

.map-page header {
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
}

.radar-box {
    position: absolute;
    right: 24px;
    top: 92px;
    background: #111827;
    padding: 16px;
    border-radius: 16px;
    z-index: 999;
    width: 260px;
    border: 1px solid #1f2937;
}

:root {
    color-scheme: dark;
    --bg: #060816;
    --bg-grad-1: rgba(96, 165, 250, 0.14);
    --bg-grad-2: rgba(139, 92, 246, 0.15);
    --bg-alt: #0e1428;
    --panel: rgba(12, 18, 35, 0.82);
    --panel-strong: #10182f;
    --text: #f8fafc;
    --text-soft: #e2e8f0;
    --muted: #94a3b8;
    --accent: #60a5fa;
    --accent-soft: #93c5fd;
    --accent-2: #8b5cf6;
    --border: rgba(148, 163, 184, 0.2);
    --header-bg: rgba(6, 8, 22, 0.82);
    --input-bg: #0f172a;
    --link: #7dd3fc;
    --shadow: rgba(2, 8, 23, 0.35);
    --hero-text: #f8fafc;
    --hero-sub: #dbeafe;
    --eyebrow: #93c5fd;
    --dash-card-bg: linear-gradient(135deg, #111827 0%, #0f172a 100%);
    --dash-card-border: rgba(2, 132, 199, 0.3);
    --dash-shadow: rgba(0, 0, 0, 0.3);
    --map-shell-bg: #060816;
    --map-panel-bg: rgba(6, 8, 22, 0.98);
    --map-header-bg: rgba(6, 8, 22, 0.94);
}

body {
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.24), transparent 34%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.24), transparent 30%),
        #060816;
}

.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 56px;
}

.notice {
    background: rgba(2, 132, 199, 0.14);
    border: 1px solid rgba(125, 211, 252, 0.24);
    color: #e0f2fe;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.dashboard-hero,
.events-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 28px 30px;
    margin-bottom: 24px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.35) 0%, rgba(139, 92, 246, 0.24) 100%);
    border: 1px solid rgba(125, 211, 252, 0.28);
    box-shadow: 0 24px 60px rgba(2, 8, 23, 0.32);
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    color: #7dd3fc;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-hero h1,
.events-hero-card h1 {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.15;
    color: #f8fafc;
}

.dashboard-hero p,
.events-hero-card p {
    margin: 0;
    color: #dbeafe;
    max-width: 62ch;
}

.hero-actions-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-page,
.events-page {
    position: relative;
}

.page.dashboard-page,
.page.events-page {
    background: linear-gradient(145deg, rgba(9, 14, 29, 0.97) 0%, rgba(12, 19, 35, 0.96) 100%);
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 34px;
    box-shadow: 0 30px 90px rgba(2, 8, 23, 0.45);
    padding: 30px 30px 48px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 861px) {
    .page.dashboard-page {
        padding: 16px 16px 34px;
    }
}

.page.dashboard-page::before,
.page.events-page::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(96, 165, 250, 0.08), transparent 40%, rgba(139, 92, 246, 0.08));
}

.dashboard-page::before,
.events-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 24%);
}

.dashboard-page .section-head,
.events-page .page-head {
    margin-bottom: 20px;
    padding: 6px 0 10px;
}

.dashboard-page .cc-map-card,
.dashboard-page .cc-alert,
.dashboard-page .stat-card,
.dashboard-page .pkp-panel,
.dashboard-page .coming-soon--compact,
.events-page .coming-soon,
.events-page #events-map,
.events-page .event-list-card,
.events-page .event-filter-pill {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.98) 0%, rgba(9, 15, 30, 0.98) 100%);
    border: 1px solid rgba(125, 211, 252, 0.24);
    box-shadow: 0 24px 64px rgba(2, 8, 23, 0.34);
    backdrop-filter: blur(20px);
}

.dashboard-page .cc-map-card,
.dashboard-page .cc-alert,
.dashboard-page .stat-card,
.dashboard-page .pkp-panel,
.dashboard-page .coming-soon--compact,
.events-page .coming-soon,
.events-page .event-list-card {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.dashboard-page .cc-map-card::before,
.dashboard-page .cc-alert::before,
.dashboard-page .stat-card::before,
.dashboard-page .pkp-panel::before,
.dashboard-page .coming-soon--compact::before,
.events-page .coming-soon::before,
.events-page .event-list-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #8b5cf6);
    opacity: 1;
}

.dashboard-page .cc-map-card,
.events-page #events-map {
    border-radius: 24px;
    overflow: hidden;
}

.dashboard-page .cc-alert,
.dashboard-page .stat-card,
.dashboard-page .pkp-panel,
.dashboard-page .coming-soon--compact,
.events-page .coming-soon,
.events-page .event-list-card,
.events-page .event-filter-pill {
    border-radius: 18px;
}

.dashboard-page .stat-card,
.dashboard-page .cc-alert,
.dashboard-page .pkp-panel,
.events-page .event-list-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-page .stat-card:hover,
.events-page .event-list-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.32);
    box-shadow: 0 24px 56px rgba(2, 8, 23, 0.28);
}

.events-page .page-head {
    padding-top: 4px;
}

.events-page .page-head h1 {
    font-size: clamp(1.7rem, 3.4vw, 2.35rem);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.events-page .page-head .muted {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.events-page .event-filter-pill {
    font-size: 0.82rem;
    padding: 8px 14px;
    border: 1px solid rgba(125, 211, 252, 0.16);
    color: #cbd5e1;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.events-page .event-filter-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.32);
}

.events-page .event-filter-pill.is-active {
    background: linear-gradient(135deg, #0284c7 0%, #7c3aed 100%);
    color: #fff;
    border-color: rgba(125, 211, 252, 0.32);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.24);
}

.events-page .event-filter-pill.ghost {
    background: rgba(15, 23, 42, 0.7);
}

.events-page #events-map {
    border: 1px solid rgba(125, 211, 252, 0.18);
    margin-bottom: 24px;
}

.events-page .event-list-card {
    padding: 16px;
}

.events-page .event-list-card strong {
    color: #f8fafc;
}

.events-page .event-list-card .muted {
    color: #94a3b8;
}

.events-page .events-empty-state {
    max-width: 680px;
}

.site-header {
    background: rgba(6, 8, 22, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(125, 211, 252, 0.16);
    box-shadow: 0 10px 36px rgba(2, 8, 23, 0.24);
}

.site-header nav a {
    padding: 8px 12px;
    border-radius: 999px;
    transition: all 0.2s ease;
    color: #cbd5e1;
}

.site-header nav a:hover,
.site-header nav a.active {
    background: rgba(2, 132, 199, 0.2);
    color: #f8fafc;
}

.site-header nav a:hover {
    background: rgba(96, 165, 250, 0.12);
    color: var(--text);
    text-decoration: none;
}

.site-header .site-nav a:hover {
    background: rgba(96, 165, 250, 0.12);
    color: var(--text);
    text-decoration: none;
}

.hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    padding: 36px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(139, 92, 246, 0.14));
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(2, 8, 23, 0.35);
}

.hero-copy h1 {
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    color: var(--text);
    letter-spacing: -0.02em;
}

.hero-copy p {
    color: #dbeafe;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.metric-card,
.hero-panel,
.insight-card,
.promo-box,
.upcoming-card,
.board-card,
.panel,
.hero-card,
.card,
.login-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(2, 8, 23, 0.2);
    backdrop-filter: blur(12px);
}

.metric-card {
    padding: 16px;
}

.metric-label,
.eyebrow {
    display: block;
    color: #93c5fd;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.metric-card strong {
    display: block;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 4px;
}

.metric-note {
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-panel-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.hero-panel h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-pill::before {
    content: "●";
    color: #4ade80;
}

.demand-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.demand-chip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    min-width: 88px;
}

.demand-chip strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 2px;
    color: var(--text);
}

.demand-chip span {
    color: var(--muted);
    font-size: 0.85rem;
}

.demand-chip.level-blue { border-color: rgba(96, 165, 250, 0.4); }
.demand-chip.level-green { border-color: rgba(74, 222, 128, 0.4); }
.demand-chip.level-purple { border-color: rgba(168, 85, 247, 0.4); }

.checklist {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist li {
    color: #e2e8f0;
}

.checklist li::before {
    color: #60a5fa;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.insight-card {
    padding: 20px;
}

.insight-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(139, 92, 246, 0.22));
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.insight-card h3,
.promo-box h3,
.upcoming-card h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1.08rem;
}

.insight-card p,
.promo-box p,
.upcoming-card p,
.event-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.insight-card a,
.panel-link {
    display: inline-block;
    margin-top: 12px;
    color: #93c5fd;
    font-weight: 600;
}

.panel {
    padding: 24px;
    margin-bottom: 24px;
}

.panel-head.compact {
    margin-bottom: 14px;
}

.panel-head h2,
.board-card h2 {
    color: var(--text);
}

.station-tab {
    background: rgba(15, 23, 42, 0.85);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.station-tab.active {
    background: linear-gradient(135deg, var(--accent), #2563eb);
    border-color: transparent;
}

.button {
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.button.ghost {
    border-color: rgba(147, 197, 253, 0.35);
    color: #bfdbfe;
}

.two-col {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 18px;
}

.sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.promo-box,
.upcoming-card {
    padding: 18px;
}

.hero-actions.stacked {
    flex-direction: column;
    align-items: stretch;
    margin-top: 16px;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.event-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.event-time {
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 42px;
}

.event-copy strong {
    color: var(--text);
}

.train-row-compact {
    background: rgba(15, 23, 42, 0.72);
    border-left-color: rgba(96, 165, 250, 0.7);
}

.train-row-compact:hover {
    background: rgba(15, 23, 42, 0.95);
    border-left-color: #60a5fa;
}

.status-now {
    color: #4ade80;
    font-weight: 700;
}

.status-upcoming {
    color: #38bdf8;
    font-weight: 700;
}

@media (max-width: 960px) {
    .hero,
    .two-col,
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }
}

/* ── Mobile-first layout ─────────────────────────────────────────────── */
.site-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
}

.city-badge {
    max-width: 92px;
    overflow: hidden;
    padding: 2px 6px;
    font-size: 10.5px;
    text-overflow: ellipsis;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.city-badge:hover {
    border-color: #0284c7;
    color: #e0f2fe;
}

.plan-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.plan-badge--free {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.plan-badge--pro {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.plan-badge--premium {
    color: #fcd34d;
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.35);
}

.cc-plan-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.72rem;
}

.cc-airport-locked {
    margin-bottom: 0;
}

.site-nav {
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 3px;
    width: 100%;
    padding-top: 6px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.site-nav a {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    border-radius: 8px;
    font-size: clamp(0.58rem, 2.65vw, 0.72rem);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    min-height: 32px;
    box-sizing: border-box;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.1;
}

.site-header .site-nav a.active {
    color: #fff;
    background: rgba(96, 165, 250, 0.22);
    padding: 6px 2px;
    border-radius: 8px;
    text-decoration: none;
}

.site-nav .nav-admin {
    display: none;
}

.site-header {
    flex-direction: row;
    align-items: center;
    padding: 3px 8px;
    padding-top: max(3px, env(safe-area-inset-top));
    gap: 0;
}

.site-header .brand {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.site-header .brand strong {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
}

.site-header .tagline {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 7px;
    line-height: 1;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.button,
.station-tab,
.station-tab-like {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-actions .button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.panel-head {
    flex-direction: column;
    align-items: stretch;
}

.station-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.station-tabs::-webkit-scrollbar {
    display: none;
}

.station-tab {
    flex-shrink: 0;
    white-space: nowrap;
}

.train-row-compact {
    grid-template-columns: 58px 1fr 72px;
    gap: 8px;
    padding: 10px;
}

@media (min-width: 768px) {
    .site-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 4px 14px;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .site-header-top {
        width: 100%;
        flex: 1 1 auto;
    }

    .site-header .brand strong {
        font-size: 14px;
    }

    .site-header .tagline {
        font-size: 8px;
    }

    .city-badge {
        max-width: 140px;
        padding: 3px 8px;
        font-size: 10px;
    }

    .site-nav {
        flex: 1 1 auto;
        justify-content: flex-end;
        width: auto;
        padding-top: 0;
        margin-top: 0;
        border-top: none;
        gap: 8px;
    }

    .site-nav a {
        flex: 0 0 auto;
        display: inline-flex;
        padding: 8px 12px;
        font-size: inherit;
        min-height: auto;
        min-width: auto;
    }

    .site-header .site-nav a.active {
        padding: 8px 12px;
        border-radius: 999px;
    }

    .site-nav .nav-admin {
        display: inline-flex;
    }

    .hero-actions .button {
        width: auto;
    }

    .panel-head {
        flex-direction: row;
        align-items: center;
    }
}

/* ── Dashboard 3.4: zwarty widok „Gdzie jechać teraz?” ──────────────── */
.demand-now {
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 26px;
    background:
        radial-gradient(circle at 90% 0, rgba(139, 92, 246, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(8, 15, 30, 0.98), rgba(12, 20, 37, 0.98));
    box-shadow: 0 22px 70px rgba(2, 8, 23, 0.38);
    overflow: hidden;
}

.demand-now::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8 48%, #a855f7);
}

.demand-now__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 12px;
}

.demand-now__kicker-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-bottom: 4px;
}

.demand-now__kicker {
    display: block;
    color: #67e8f9;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.demand-now__head h1 {
    margin: 0 0 7px;
    color: #f8fafc;
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.demand-now__head p {
    max-width: 720px;
    margin: 0;
    color: #b8c5d8;
    font-size: 0.9rem;
    line-height: 1.5;
}

.demand-now__refresh {
    color: #8090a6;
    font-size: 0.68rem;
    white-space: nowrap;
}

.font-size-controls {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.62);
}

.font-size-controls button {
    min-width: 28px;
    min-height: 26px;
    padding: 2px 4px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 7px;
    background: rgba(56, 189, 248, 0.1);
    color: #bae6fd;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 850;
    cursor: pointer;
}

.font-size-controls button:hover,
.font-size-controls button:focus-visible {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    outline: none;
}

.font-size-controls button:disabled {
    opacity: 0.38;
    cursor: default;
}

.font-size-controls--header {
    flex: 0 0 auto;
    margin: 0;
    gap: 1px;
    padding: 1px;
    border-radius: 8px;
}

.font-size-controls--header button {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1;
}

.source-health {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 9px;
}

.source-health__item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.56);
}

.source-health__dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.source-health__item span:last-child {
    min-width: 0;
}

.source-health__item strong,
.source-health__item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-health__item strong {
    color: #e2e8f0;
    font-size: 0.73rem;
}

.source-health__item small {
    margin-top: 2px;
    color: #7f8da2;
    font-size: 0.62rem;
}

.source-health__item--fresh .source-health__dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.13), 0 0 12px rgba(34, 197, 94, 0.45);
}

.source-health__item--manual .source-health__dot {
    background: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.13);
}

.source-health__item--stale .source-health__dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.13);
}

.source-health__item--stale {
    border-color: rgba(239, 68, 68, 0.48);
    background: rgba(127, 29, 29, 0.18);
}

.source-health__item--stale strong {
    color: #fecaca;
}

.source-health__item--missing .source-health__dot,
.source-health__item--off .source-health__dot {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.recommendation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.825fr));
    gap: 9px;
    margin-top: 9px;
    align-items: stretch;
}

.recommendation-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 42px 14px 13px;
    border: 1px solid color-mix(in srgb, var(--reco-color, #38bdf8) 45%, rgba(148, 163, 184, 0.18));
    border-radius: 18px;
    background:
        linear-gradient(155deg, color-mix(in srgb, var(--reco-color, #38bdf8) 11%, transparent), transparent 45%),
        rgba(6, 12, 25, 0.92);
    box-shadow: 0 12px 28px rgba(2, 8, 23, 0.32);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recommendation-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--reco-color, #38bdf8) 68%, rgba(255, 255, 255, 0.18));
    box-shadow: 0 18px 42px rgba(2, 8, 23, 0.42);
}

.recommendation-card--primary {
    padding: 42px 14px 13px;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--reco-color, #38bdf8) 22%, transparent), transparent 42%),
        linear-gradient(155deg, color-mix(in srgb, var(--reco-color, #38bdf8) 13%, transparent), transparent 52%),
        rgba(5, 11, 24, 0.98);
    box-shadow: 0 22px 54px rgba(2, 8, 23, 0.45);
}

.recommendation-card::before {
    content: none;
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--reco-color, #38bdf8);
}

.recommendation-card__topbar {
    position: absolute;
    inset: 0 0 auto;
    min-height: 30px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 4px 9px;
    background: var(--gp-gradient-home);
    color: #ffffff;
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.2),
        inset 0 -1px rgba(15, 23, 42, 0.16);
}

.recommendation-card__topbar--go {
    background: var(--gp-gradient-go);
}

.recommendation-card__topbar--prepare {
    background: var(--gp-gradient-home);
}

.recommendation-card__topbar--watch {
    background: var(--gp-gradient-watch);
}

.recommendation-card__topbar--quiet {
    background: var(--gp-gradient-quiet);
}

.recommendation-card__action {
    display: inline-flex;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.recommendation-card__action::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 12px currentColor;
}

.recommendation-card__action--go {
    color: #ffffff;
}

.recommendation-card__action--prepare {
    color: #ffffff;
}

.recommendation-card__action--quiet {
    color: #ffffff;
}

.recommendation-card__context {
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.58rem;
    font-weight: 950;
    letter-spacing: 0.11em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommendation-card__quick {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 4px;
    font-size: 0.62rem;
    white-space: nowrap;
}

.recommendation-card__quick small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72);
    font-size: inherit;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-overflow: ellipsis;
}

.recommendation-card__quick a {
    color: #ffffff;
    font-size: inherit;
    font-weight: 900;
    text-decoration: none;
}

.recommendation-card__top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding-right: 2px;
}

.recommendation-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--reco-color, #38bdf8) 38%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--reco-color, #38bdf8) 14%, rgba(15, 23, 42, 0.92));
    font-size: 1.2rem;
}

.recommendation-card__title {
    min-width: 0;
}

.recommendation-card__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--reco-color, #38bdf8);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.recommendation-card__title h2,
.recommendation-card--empty h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 0.98rem;
    line-height: 1.18;
}

.recommendation-card__title > strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #aebdd1;
    font-size: 0.69rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommendation-card__score {
    display: flex;
    align-items: baseline;
    gap: 1px;
    margin-top: 0;
    color: var(--reco-color, #38bdf8);
}

.recommendation-card__score b {
    font-size: 1.1rem;
    line-height: 1;
}

.recommendation-card__score span {
    color: #718096;
    font-size: 0.55rem;
}

.recommendation-card__timing {
    margin-top: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.76);
    color: #f8fafc;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1.35;
}

.recommendation-card__reason {
    min-height: 3em;
    margin: 8px 0;
    color: #93a4bb;
    font-size: 0.69rem;
    line-height: 1.45;
}

.recommendation-card__bar {
    height: 4px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.14);
}

.recommendation-card__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--reco-color, #38bdf8) 72%, white), var(--reco-color, #38bdf8));
}

.recommendation-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    color: #7f8da2;
    font-size: 0.61rem;
}

.recommendation-card__meta strong {
    color: #cbd5e1;
}

.recommendation-card__foot {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.recommendation-card__foot small {
    color: #6f8096;
    font-size: 0.6rem;
}

.recommendation-card--primary .recommendation-card__action {
    font-size: 0.68rem;
}

.recommendation-card--primary .recommendation-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 1.22rem;
}

.recommendation-card--primary .recommendation-card__title h2 {
    font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.recommendation-card--primary .recommendation-card__title > strong {
    margin-top: 6px;
    font-size: 0.8rem;
}

.recommendation-card--primary .recommendation-card__score b {
    font-size: 1.45rem;
}

.recommendation-card--primary .recommendation-card__score span {
    font-size: 0.67rem;
}

.recommendation-card--primary .recommendation-card__timing {
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
}

.recommendation-card--primary .recommendation-card__reason {
    min-height: 0;
    margin: 7px 0;
    font-size: 0.72rem;
    line-height: 1.38;
}

.recommendation-card--primary .recommendation-card__bar {
    height: 4px;
}

.recommendation-card--primary .recommendation-card__meta {
    font-size: 0.72rem;
}

.recommendation-card--primary .recommendation-card__foot small {
    font-size: 0.68rem;
}

.recommendation-card--empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    --reco-color: #64748b;
}

@media (min-width: 921px) and (max-width: 1100px) {
    .recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recommendation-card--primary {
        grid-column: 1 / -1;
    }
}

.recommendation-card--empty p {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 0.76rem;
}

.demand-now__note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    margin-top: 13px;
    padding: 9px 11px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    background: rgba(2, 8, 23, 0.32);
}

.demand-now__note p {
    margin: 0;
    color: #8191a7;
    font-size: 0.65rem;
    line-height: 1.45;
}

.demand-now__note-copy {
    display: grid;
    gap: 1px;
}

.demand-now__note .demand-now__note-last {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.demand-now__note-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 50%;
    color: #67e8f9;
    font-size: 0.68rem;
    font-weight: 900;
}

.demand-now__note strong {
    color: #b9c6d8;
}

#recommendations-updated {
    margin-left: auto;
    color: #65758b;
    font-size: 0.6rem;
    white-space: nowrap;
}

.airport-arrival-countdown {
    color: #67e8f9;
    font-weight: 750;
}

/* Oś sygnałów na najbliższą część zmiany. */
.demand-timeline {
    margin-top: 11px;
    padding: 12px 13px 9px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(2, 8, 23, 0.38);
}

.demand-timeline__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 2px;
}

.demand-timeline__head > div:first-child > span {
    display: block;
    margin-bottom: 2px;
    color: #67e8f9;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.demand-timeline__head h2 {
    margin: 0;
    color: #eaf2ff;
    font-size: 0.94rem;
}

.demand-timeline__legend {
    display: grid;
    gap: 1px;
    padding-bottom: 1px;
}

.demand-timeline__legend small {
    color: #718096;
    font-size: 0.58rem;
    line-height: 1.32;
    text-align: right;
}

.demand-timeline__legend b {
    font-size: 0.68rem;
}

.demand-timeline__viewport {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
}

.demand-timeline__rail {
    --timeline-axis-y: 124px;
    --timeline-progress-y: 238px;
    --timeline-rail-height: 258px;
    position: relative;
    min-width: 780px;
    height: var(--timeline-rail-height);
    margin-top: 2px;
    transition: height 0.2s ease;
}

.demand-timeline__clock span,
.demand-timeline__progress span {
    position: absolute;
    left: clamp(30px, var(--tick), calc(100% - 30px));
    transform: translateX(-50%);
    color: #76869c;
    font-size: 0.56rem;
    white-space: nowrap;
}

.demand-timeline__clock span {
    top: 4px;
    z-index: 1;
}

.demand-timeline__clock span::after {
    content: "";
    position: absolute;
    top: 21px;
    left: 50%;
    width: 1px;
    height: calc(var(--timeline-progress-y) - 24px);
    transform: translateX(-50%);
    background: repeating-linear-gradient(
        to bottom,
        rgba(100, 116, 139, 0.22) 0 3px,
        transparent 3px 7px
    );
    pointer-events: none;
}

.demand-timeline__clock span::before {
    content: "";
    position: absolute;
    top: calc(var(--timeline-axis-y) - 4px);
    left: 50%;
    z-index: 2;
    width: 7px;
    height: 7px;
    transform: translate(-50%, -50%);
    border: 1px solid #ffffff;
    border-radius: 50%;
    background: #475569;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

.demand-timeline__line {
    position: absolute;
    top: var(--timeline-axis-y);
    right: 38px;
    left: 38px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, #22c55e 0%, #38bdf8 38%, #8b5cf6 72%, #475569 100%);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.14);
}

.demand-timeline__now-marker {
    position: absolute;
    top: 25px;
    left: clamp(38px, var(--timeline-now), calc(100% - 38px));
    z-index: 1;
    width: 2px;
    height: calc(var(--timeline-progress-y) - 25px);
    transform: translateX(-50%);
    border: 0;
    border-radius: 99px;
    background: linear-gradient(to bottom, rgba(34, 197, 94, 0.14), #22c55e 34%, #22c55e 52%, rgba(56, 189, 248, 0.16));
    box-shadow: 0 0 9px rgba(34, 197, 94, 0.32);
    pointer-events: none;
    transition: left 0.38s ease-out;
}

.demand-timeline__now-marker::before {
    content: "";
    position: absolute;
    top: calc(var(--timeline-axis-y) - 25px);
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22), 0 0 14px rgba(34, 197, 94, 0.48);
}

.demand-timeline__now-marker.is-ticking::before {
    animation: gp-timeline-now-tick 0.7s ease-out;
}

@keyframes gp-timeline-now-tick {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.52), 0 0 12px rgba(34, 197, 94, 0.42); }
    100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0), 0 0 16px rgba(34, 197, 94, 0.46); }
}

.demand-timeline__signal {
    position: absolute;
    top: 246px;
    left: clamp(92px, var(--timeline-pos), calc(100% - 92px));
    z-index: 3;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    width: 184px;
    min-height: 49px;
    padding: 6px 7px;
    transform: translateX(-50%);
    border: 1px solid color-mix(in srgb, var(--reco-color, #38bdf8) 48%, rgba(148, 163, 184, 0.18));
    border-radius: 12px;
    background: rgba(8, 15, 29, 0.98);
    color: #e2e8f0;
    box-shadow: 0 8px 22px rgba(2, 8, 23, 0.38);
    text-decoration: none;
}

.demand-timeline__signal::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 1px;
    height: 120px;
    background: color-mix(in srgb, var(--reco-color, #38bdf8) 65%, transparent);
}

.demand-timeline__signal:hover {
    border-color: var(--reco-color, #38bdf8);
    color: #fff;
}

.demand-timeline__pin {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    border-radius: 9px;
    background: color-mix(in srgb, var(--reco-color, #38bdf8) 16%, rgba(15, 23, 42, 0.92));
    font-size: 0.98rem;
}

.demand-timeline__signal-copy {
    min-width: 0;
}

.demand-timeline__signal-copy strong,
.demand-timeline__signal-copy small {
    display: block;
}

.demand-timeline__signal-copy strong {
    font-size: 0.67rem;
    white-space: nowrap;
}

.demand-timeline__signal-copy small {
    overflow: hidden;
    margin-top: 2px;
    color: #8b99ad;
    font-size: 0.52rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demand-timeline__signal-copy i {
    display: inline-grid;
    place-items: center;
    width: 13px;
    height: 13px;
    margin-left: 2px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-style: normal;
    font-size: 0.48rem;
    cursor: help;
}

.demand-timeline__signal em {
    padding: 3px 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--reco-color, #38bdf8) 14%, rgba(15, 23, 42, 0.9));
    color: var(--reco-color, #38bdf8);
    font-size: 0.48rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.demand-timeline__arrival {
    --arrival-top: 34px;
    --arrival-shift: -18px;
    --arrival-anchor-offset: 18px;
    --arrival-gap: 63px;
    --arrival-stem: 64px;
    --arrival-angle: -13deg;
    --arrival-color: #38bdf8;
    position: absolute;
    top: var(--arrival-top);
    left: clamp(34px, var(--timeline-pos), calc(100% - 34px));
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 64px;
    min-height: 27px;
    padding: 4px 8px;
    transform: translateX(-50%) translateX(var(--arrival-shift));
    border: 1px solid color-mix(in srgb, var(--arrival-color) 55%, rgba(148, 163, 184, 0.2));
    border-radius: 999px;
    background: rgba(8, 15, 29, 0.98);
    color: color-mix(in srgb, var(--arrival-color) 72%, white);
    box-shadow: 0 5px 12px rgba(2, 8, 23, 0.28);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    white-space: nowrap;
}

.demand-timeline__arrival--flight { --arrival-color: #a855f7; }
.demand-timeline__arrival--lane-1 { --arrival-top: 63px; --arrival-shift: 0px; --arrival-anchor-offset: 0px; --arrival-gap: 34px; --arrival-stem: 34px; --arrival-angle: 0deg; }
.demand-timeline__arrival--lane-2 { --arrival-top: 92px; --arrival-shift: 0px; --arrival-anchor-offset: 0px; --arrival-gap: 5px; --arrival-stem: 5px; --arrival-angle: 0deg; }
.demand-timeline__arrival--lane-3 { --arrival-top: 137px; --arrival-shift: 0px; --arrival-anchor-offset: 0px; --arrival-gap: 13px; --arrival-stem: 13px; --arrival-angle: 0deg; }
.demand-timeline__arrival--lane-4 { --arrival-top: 170px; --arrival-shift: 0px; --arrival-anchor-offset: 0px; --arrival-gap: 46px; --arrival-stem: 46px; --arrival-angle: 0deg; }
.demand-timeline__arrival--lane-5 { --arrival-top: 203px; --arrival-shift: 0px; --arrival-anchor-offset: 0px; --arrival-gap: 79px; --arrival-stem: 79px; --arrival-angle: 0deg; }

.demand-timeline__arrival::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 1px;
    height: var(--arrival-stem);
    transform: rotate(var(--arrival-angle));
    transform-origin: top;
    background: linear-gradient(color-mix(in srgb, var(--arrival-color) 48%, transparent), color-mix(in srgb, var(--arrival-color) 14%, transparent));
}

/* Pociąg prowadzi do dokładnego punktu czasu cienką, czarną linią. */
.demand-timeline__arrival--train::after {
    width: 1px;
    background: #111111;
    opacity: 0.78;
}

.demand-timeline__arrival--flight::after {
    width: 1px;
    background: color-mix(in srgb, var(--arrival-color) 76%, #475569);
    opacity: 0.76;
}

/* Kropka wskazuje dokładną minutę na osi, nawet gdy etykieta odsuwa się w bok. */
.demand-timeline__arrival::before {
    content: "";
    position: absolute;
    top: calc(100% + var(--arrival-gap));
    left: calc(50% + var(--arrival-anchor-offset));
    z-index: 3;
    width: 6px;
    height: 6px;
    transform: translate(-50%, -50%);
    border: 1px solid #ffffff;
    border-radius: 50%;
    background: var(--arrival-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--arrival-color) 18%, transparent);
    pointer-events: none;
}

.demand-timeline__arrival--train::before {
    background: #111111;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.12);
}

.demand-timeline__arrival--below::after {
    top: auto;
    bottom: 100%;
    transform-origin: bottom;
}

.demand-timeline__arrival--below::before {
    top: auto;
    bottom: calc(100% + var(--arrival-gap));
    transform: translate(-50%, 50%);
}

.demand-timeline__arrival:hover,
.demand-timeline__arrival:focus-visible {
    z-index: 5;
    border-color: var(--arrival-color);
    background: color-mix(in srgb, var(--arrival-color) 34%, #07101f);
    color: #ffffff;
    outline: none;
}

.demand-timeline__arrival span {
    font-size: 0.78rem;
    line-height: 1;
}

.demand-timeline__arrival strong {
    font-size: 0.78rem;
    line-height: 1;
}

.demand-timeline__arrival em {
    padding: 2px 8px;
    border-radius: 999px;
    background: linear-gradient(120deg, #450a0a 0%, #7f1d1d 35%, #b91c1c 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.38);
}

.demand-timeline__arrival[aria-expanded="true"] {
    z-index: 5;
    border-color: var(--arrival-color);
    background: color-mix(in srgb, var(--arrival-color) 34%, #07101f);
    color: #ffffff;
    outline: none;
}

.demand-timeline__arrival--delayed {
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 5px 14px rgba(127, 29, 29, 0.28);
}

.timeline-arrival-detail[hidden] {
    display: none;
}

.timeline-arrival-detail {
    position: fixed;
    z-index: 11990;
    width: min(370px, calc(100vw - 24px));
    max-height: min(620px, calc(100dvh - 24px));
    overflow: auto;
    padding: 17px;
    border: 1px solid rgba(56, 189, 248, 0.36);
    border-radius: 17px;
    background: rgba(8, 15, 29, 0.98);
    color: #e5edf8;
    box-shadow: 0 18px 55px rgba(2, 8, 23, 0.52);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.timeline-arrival-detail__head {
    display: flex;
    justify-content: space-between;
    padding-right: 34px;
}

.timeline-arrival-detail__head span {
    color: #38bdf8;
    font-size: 0.61rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.timeline-arrival-detail__head h2 {
    margin: 3px 0 12px;
    color: #f8fafc;
    font-size: 1rem;
    line-height: 1.25;
}

.timeline-arrival-detail__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.88);
    color: #e2e8f0;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.timeline-arrival-detail dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.timeline-arrival-detail__row {
    display: grid;
    grid-template-columns: minmax(112px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.timeline-arrival-detail__row dt,
.timeline-arrival-detail__row dd {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.42;
}

.timeline-arrival-detail__row dt {
    color: #94a3b8;
    font-weight: 700;
}

.timeline-arrival-detail__row dd {
    color: #f1f5f9;
    font-weight: 780;
    overflow-wrap: anywhere;
}

.timeline-arrival-detail__row--delayed {
    margin: 3px -7px;
    padding: 8px 7px;
    border: 1px solid rgba(248, 113, 113, 0.38);
    border-radius: 10px;
    background: linear-gradient(115deg, rgba(69, 10, 10, 0.84), rgba(127, 29, 29, 0.62) 52%, rgba(185, 28, 28, 0.42));
    box-shadow: inset 0 1px rgba(254, 202, 202, 0.08);
}

.timeline-arrival-detail__row--delayed dt {
    color: #fecaca;
}

.timeline-arrival-detail__row--delayed dd {
    color: #ffffff;
    font-weight: 900;
}

.timeline-arrival-detail__note {
    margin: 11px 0 0;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.11);
    color: #bae6fd;
    font-size: 0.72rem;
    line-height: 1.42;
}

.timeline-arrival-detail__cta {
    display: flex;
    justify-content: center;
    margin-top: 13px;
    padding: 10px 12px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0284c7, #4f46e5);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 850;
    text-decoration: none;
}

.timeline-arrival-detail__cta-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 13px;
}

.timeline-arrival-detail__cta-row .timeline-arrival-detail__cta {
    flex: 1;
    margin-top: 0;
}

.timeline-arrival-detail__collapse {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.75);
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 2px 10px rgba(2, 8, 23, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.timeline-arrival-detail__collapse:hover {
    background: rgba(30, 41, 59, 0.95);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 767px) {
    .timeline-arrival-detail {
        top: auto !important;
        right: 10px;
        bottom: calc(72px + env(safe-area-inset-bottom));
        left: 10px !important;
        width: auto;
        max-height: min(56dvh, 440px);
        padding: 15px;
        border-radius: 17px;
    }

    .timeline-arrival-detail__row {
        grid-template-columns: minmax(105px, 0.82fr) minmax(0, 1.18fr);
        gap: 9px;
        padding: 7px 0;
    }
}

.demand-timeline__arrival-empty {
    position: absolute;
    top: 76px;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
    color: #718096;
    font-size: 0.66rem;
    white-space: nowrap;
}

.demand-timeline__progress {
    position: absolute;
    top: var(--timeline-progress-y);
    right: 38px;
    left: 38px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, #a855f7, #38bdf8 50%, #22c55e);
}

.demand-timeline__progress span {
    top: 9px;
}

.demand-timeline__empty {
    position: absolute;
    top: 217px;
    right: 0;
    bottom: 42px;
    left: 0;
    display: grid;
    place-items: center;
    margin: 0;
    color: #718096;
    font-size: 0.75rem;
}

/* Skróty są celowo osobnym „paskiem narzędzi”, a nie kolejnym menu. */
.dash-toolbelt {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 22px;
}

.dash-tool {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--tool-color, #38bdf8) 25%, rgba(148, 163, 184, 0.16));
    border-radius: 15px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--tool-color, #38bdf8) 8%, transparent), rgba(8, 15, 29, 0.92));
    color: #e2e8f0;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(2, 8, 23, 0.25);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dash-tool:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--tool-color, #38bdf8) 58%, rgba(255, 255, 255, 0.16));
    color: #fff;
    box-shadow: 0 14px 34px rgba(2, 8, 23, 0.34);
    text-decoration: none;
}

.dash-tool__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--tool-color, #38bdf8) 13%, rgba(15, 23, 42, 0.9));
    font-size: 1.1rem;
}

.dash-tool strong,
.dash-tool small {
    display: block;
}

.dash-tool strong {
    color: #f1f5f9;
    font-size: 0.77rem;
}

.dash-tool small {
    margin-top: 2px;
    overflow: hidden;
    color: #75859b;
    font-size: 0.6rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-tool > b {
    color: var(--tool-color, #38bdf8);
    font-size: 1rem;
}

.cc-map-placeholder {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 20px;
    color: #94a3b8;
    text-align: center;
}

.cc-map-placeholder > span {
    margin-bottom: 8px;
    font-size: 2rem;
}

.cc-map-placeholder strong {
    color: #e2e8f0;
}

.cc-map-placeholder small {
    max-width: 360px;
    margin-top: 6px;
}

.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.panel-heading-row h2 {
    margin-bottom: 0;
}

.panel-heading-row > a {
    color: #67e8f9;
    font-size: 0.72rem;
    font-weight: 750;
    text-decoration: none;
}

.data-mode-badge {
    padding: 5px 9px;
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.08);
    color: #86efac;
    font-size: 0.62rem;
    font-weight: 800;
    white-space: nowrap;
}

.airport-manual-status {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
    padding: 9px 11px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 11px;
    background: rgba(56, 189, 248, 0.07);
}

.airport-manual-status strong {
    color: #bae6fd;
    font-size: 0.72rem;
}

.airport-manual-status span {
    color: #7f91a8;
    font-size: 0.64rem;
}

.airport-manual-status--fresh {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.07);
}

.airport-manual-status--fresh strong {
    color: #86efac;
}

.airport-manual-status--old,
.airport-manual-status--stale,
.airport-manual-status--missing {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.07);
}

.airport-manual-status--old strong,
.airport-manual-status--stale strong,
.airport-manual-status--missing strong {
    color: #fcd34d;
}

.gp-mini-demand-marker {
    background: transparent !important;
    border: 0 !important;
}

.gp-mini-demand-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--pin-color, #38bdf8);
    color: #fff;
    box-shadow: 0 0 18px color-mix(in srgb, var(--pin-color, #38bdf8) 68%, transparent), 0 4px 10px rgba(0, 0, 0, 0.42);
    line-height: 1;
}

.gp-mini-demand-pin span {
    font-size: 0.95rem;
}

.gp-mini-demand-pin b {
    margin-top: 2px;
    font-size: 1.05rem;
}

.gp-mini-demand-pin small {
    margin-top: 2px;
    font-size: 0.48rem;
    font-weight: 800;
}

@media (max-width: 920px) {
    .recommendation-grid {
        grid-template-columns: 1fr;
    }

    .recommendation-card__reason {
        min-height: 0;
    }

    .recommendation-card--primary {
        grid-row: auto;
    }

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

@media (max-width: 680px) {
    .page.dashboard-page {
        padding: 0 12px 38px;
        border-radius: 0 0 20px 20px;
    }

    .demand-now {
        margin-bottom: 9px;
        padding: 11px 10px 9px;
        border-radius: 0 0 18px 18px;
    }

    .demand-now__head {
        display: block;
        margin-bottom: 8px;
    }

    .demand-now__head h1 {
        font-size: 1.55rem;
    }

    .demand-now__head p {
        font-size: 0.76rem;
    }

    .source-health {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 1px;
        scrollbar-width: none;
    }

    .source-health::-webkit-scrollbar {
        display: none;
    }

    .source-health__item {
        min-width: 190px;
        padding: 6px 8px;
    }

    .recommendation-grid {
        gap: 7px;
    }

    .recommendation-card {
        padding: 38px 11px 10px;
        border-radius: 15px;
    }

    .recommendation-card--primary {
        padding: 40px 12px 11px;
    }

    .recommendation-card__action {
        font-size: 0.68rem;
    }

    .recommendation-card__topbar {
        gap: 5px;
    }

    .recommendation-card__context {
        font-size: 0.56rem;
    }

    .recommendation-card__top {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 7px;
    }

    .recommendation-card__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .recommendation-card__title h2 {
        font-size: 1.04rem;
    }

    .recommendation-card--primary .recommendation-card__title h2 {
        font-size: clamp(0.84rem, 4.5vw, 1rem);
        letter-spacing: -0.035em;
        white-space: nowrap;
    }

    .recommendation-card__title > strong {
        font-size: 0.78rem;
    }

    .recommendation-card__score b {
        font-size: 1.3rem;
    }

    .recommendation-card__timing {
        margin-top: 5px;
        padding: 7px 8px;
        font-size: 0.82rem;
    }

    .recommendation-card__reason {
        margin: 6px 0;
        font-size: 0.77rem;
    }

    .recommendation-card__meta {
        font-size: 0.7rem;
    }

    .recommendation-card__foot small,
    .recommendation-card__quick {
        font-size: 0.7rem;
    }

    .source-health__item strong {
        font-size: 0.82rem;
    }

    .source-health__item small {
        font-size: 0.7rem;
    }

    .demand-now__note p {
        font-size: 0.74rem;
    }

    #recommendations-updated {
        font-size: 0.68rem;
    }

    .demand-timeline {
        padding-right: 12px;
        padding-left: 12px;
    }

    .demand-timeline__viewport {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
    }

    .demand-timeline__viewport::-webkit-scrollbar {
        display: none;
    }

    .demand-timeline__rail {
        width: max(190%, 720px);
        min-width: max(190%, 720px);
    }

    .demand-timeline__clock span {
        left: var(--tick);
    }

    .demand-timeline__clock span:first-child {
        transform: none;
    }

    .demand-timeline__clock span:last-child {
        transform: translateX(-100%);
    }

    .demand-timeline__clock span:not(:first-child):not(:last-child) {
        transform: translateX(-50%);
    }

    .demand-timeline__clock span:nth-last-child(2) {
        transform: translateX(-50%);
    }

    .demand-timeline__clock span:first-child::after {
        left: 0;
    }

    .demand-timeline__clock span:last-child::after {
        left: 100%;
    }

    .demand-timeline__clock span:not(:first-child):not(:last-child)::after {
        left: 50%;
    }

    .demand-timeline__clock span:nth-last-child(2)::after {
        left: 50%;
    }

    .demand-timeline__clock span:nth-child(even) {
        top: 13px;
    }

    .demand-timeline__clock span:nth-child(even)::after {
        top: 12px;
    }

    .demand-timeline__clock span,
    .demand-timeline__progress span {
        left: clamp(18px, var(--tick), calc(100% - 18px));
    }

    .demand-timeline__line,
    .demand-timeline__progress {
        right: 18px;
        left: 18px;
    }

    .demand-timeline__now-marker {
        left: clamp(18px, var(--timeline-now), calc(100% - 18px));
    }

    .demand-timeline__arrival {
        left: clamp(34px, var(--timeline-pos), calc(100% - 34px));
    }

    .demand-timeline__signal {
        left: clamp(90px, var(--timeline-pos), calc(100% - 90px));
        grid-template-columns: 34px minmax(0, 1fr);
        grid-template-areas:
            "pin copy"
            "pin tag";
        width: 176px;
        min-height: 61px;
    }

    .demand-timeline__pin {
        grid-area: pin;
    }

    .demand-timeline__signal-copy {
        grid-area: copy;
    }

    .demand-timeline__signal em {
        grid-area: tag;
        justify-self: start;
        margin-top: -2px;
    }

    .demand-timeline__head {
        align-items: flex-start;
        gap: 8px;
    }

    .demand-timeline__head h2 {
        font-size: 1.06rem;
    }

    .demand-timeline__head > div:first-child {
        flex: 1 1 auto;
        min-width: 0;
    }

    .demand-timeline__legend {
        flex: 0 0 154px;
    }

    .demand-timeline__legend small {
        font-size: 0.61rem;
    }

    .demand-now__note .demand-now__note-last {
        gap: 8px;
    }

    .panel-heading-row {
        align-items: flex-start;
    }

    .train-row-dash small {
        display: block;
        margin-top: 2px;
    }
}

@media (max-width: 380px) {
    .recommendation-card__top {
        gap: 4px;
    }

    .recommendation-card__icon,
    .recommendation-card--primary .recommendation-card__icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        font-size: 0.92rem;
    }

    .recommendation-card--primary .recommendation-card__title h2 {
        max-width: 100%;
        font-size: 0.84rem;
        line-height: 1.08;
        white-space: normal;
    }

    .recommendation-card__score b,
    .recommendation-card--primary .recommendation-card__score b {
        font-size: 1.08rem;
    }

}

@media (max-width: 520px) {
    .dash-toolbelt {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .dash-tool {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 7px;
        padding: 9px 8px;
        border-radius: 13px;
    }

    .dash-tool__icon {
        width: 33px;
        height: 33px;
        border-radius: 10px;
        font-size: 0.96rem;
    }

    .dash-tool strong {
        font-size: 0.75rem;
    }

    .dash-tool small {
        margin-top: 1px;
        font-size: 0.6rem;
        line-height: 1.2;
        white-space: normal;
    }

    .dash-tool > b {
        font-size: 0.82rem;
    }
}

@media (max-width: 860px) {
    .page {
        padding: 8px 8px 32px;
        padding-bottom: max(32px, env(safe-area-inset-bottom));
    }
    .page.dashboard-page,
    .page.events-page {
        padding: 16px 12px 24px !important;
        border-radius: 20px !important;
    }

    .hero {
        padding: 20px 18px;
        border-radius: 18px;
    }

    .hero-copy h1 {
        font-size: 1.65rem;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .insight-card,
    .promo-box,
    .upcoming-card,
    .board-card {
        padding: 16px;
    }
}

/* ── Map page (mobile-first, full screen) ────────────────────────────── */
body.map-app {
    overflow: hidden;
    height: 100%;
    height: 100dvh;
    background: var(--map-shell-bg);
}

body.map-app .map-shell {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100vh;
}

.map-app-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 10px;
    padding-top: max(5px, env(safe-area-inset-top));
    background: rgba(6, 8, 22, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.map-app-header .brand-mini {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
}

.map-app-header .brand-mini span {
    color: var(--muted);
    font-weight: 500;
    font-size: 8px;
    line-height: 1;
    display: block;
}

.map-app-header nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.map-app-header nav a {
    color: var(--muted);
    font-size: 0.78rem;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.map-app-header nav a.active {
    color: #fff;
    background: rgba(96, 165, 250, 0.22);
}

.map-stage {
    position: relative;
    flex: 1;
    min-height: 0;
}

.map-loading {
    position: absolute;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 50% 46%, rgba(14, 165, 233, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(2, 6, 23, 0.94), rgba(8, 15, 34, 0.92));
    backdrop-filter: blur(8px);
    transition: opacity 0.34s ease, visibility 0.34s ease;
}

.map-loading.is-ready {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.map-loading__hud {
    position: relative;
    width: min(310px, calc(100vw - 44px));
    padding: 28px 24px 23px;
    border: 1px solid rgba(56, 189, 248, 0.32);
    background: rgba(3, 10, 26, 0.82);
    color: #e0f2fe;
    box-shadow: 0 24px 70px rgba(2, 8, 23, 0.55), inset 0 0 36px rgba(14, 165, 233, 0.06);
    text-align: center;
}

.map-loading__corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #38bdf8;
    border-style: solid;
}
.map-loading__corner--tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.map-loading__corner--tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.map-loading__corner--bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.map-loading__corner--br { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }

.map-loading__radar {
    position: relative;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    margin: 0 auto 17px;
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0 3px, transparent 4px);
    box-shadow: 0 0 32px rgba(14, 165, 233, 0.15), inset 0 0 22px rgba(14, 165, 233, 0.11);
}

.map-loading__radar::before,
.map-loading__radar::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.map-loading__radar::before {
    inset: 11px;
    border: 1px dashed rgba(125, 211, 252, 0.34);
    animation: gp-map-radar 2.8s linear infinite;
}

.map-loading__radar::after {
    inset: -6px;
    border-top: 2px solid #22d3ee;
    border-right: 2px solid transparent;
    animation: gp-map-radar 1.1s linear infinite;
}

.map-loading__radar span {
    position: relative;
    z-index: 1;
    color: #f0f9ff;
    font-size: 2.25rem;
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.78);
}

.map-loading__hud strong,
.map-loading__hud small {
    display: block;
}

.map-loading__hud strong {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.map-loading__hud small {
    margin-top: 6px;
    color: #8fa9c2;
    font-size: 0.7rem;
    line-height: 1.4;
}

.map-loading__progress {
    height: 3px;
    margin-top: 18px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.16);
}

.map-loading__progress span {
    display: block;
    width: 42%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #38bdf8, #a855f7, transparent);
    animation: gp-map-loading-progress 1.25s ease-in-out infinite;
}

#map-loading-retry {
    margin-top: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(248, 113, 113, 0.55);
    border-radius: 9px;
    background: rgba(127, 29, 29, 0.34);
    color: #fee2e2;
    font-weight: 800;
    cursor: pointer;
}

.map-loading.is-error .map-loading__radar {
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.18);
}
.map-loading.is-error .map-loading__radar::after { border-top-color: #f87171; animation: none; }
.map-loading.is-error .map-loading__radar span { color: #fecaca; text-shadow: 0 0 18px rgba(239, 68, 68, 0.55); }

@keyframes gp-map-radar { to { transform: rotate(360deg); } }
@keyframes gp-map-loading-progress {
    from { transform: translateX(-130%); }
    to { transform: translateX(340%); }
}

body.map-app #map {
    width: 100%;
    height: 100%;
}

#map-status {
    position: absolute;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: rgba(6, 8, 22, 0.92);
    color: var(--muted);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    border: 1px solid var(--border);
    pointer-events: none;
    white-space: nowrap;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-legend-wrap {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 999;
}

.map-tools {
    position: absolute;
    bottom: 24px;
    right: 12px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.map-tool {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(6, 8, 22, 0.94);
    color: #e5e7eb;
    font-size: 0.95rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.map-tool:active {
    transform: scale(0.95);
}

.map-tool--sos {
    width: auto;
    padding: 0 8px;
    font-size: 0.7rem;
    font-weight: 900;
    color: #fca5a5;
}

.map-tool.is-on {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.35), 0 4px 12px rgba(0,0,0,0.5);
    background: rgba(20, 184, 166, 0.15);
}

.map-tool--sos.is-on {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.35), 0 4px 12px rgba(0,0,0,0.5);
    background: rgba(220, 38, 38, 0.2);
    color: #fff;
}

/* Expandable events slider */
.map-tool-expandable {
    position: relative;
    display: flex;
    align-items: center;
}

.map-tool-slider {
    display: flex;
    gap: 6px;
    position: absolute;
    right: 42px; /* 36px width + 6px gap */
    top: 0;
    height: 36px;
    align-items: center;
    
    /* Animation transition */
    transform: scaleX(0);
    transform-origin: right;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, visibility 0s linear 0.25s;
    pointer-events: none;
    z-index: 1000;
}

.map-tool-slider.open {
    transform: scaleX(1);
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
    pointer-events: auto;
}

.map-tool-sub {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(6, 8, 22, 0.94);
    color: #e5e7eb;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: background 0.15s ease, transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-tool-sub:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.15);
}

.map-tool-sub:active {
    transform: scale(0.95);
}

/* Floating Toast Notification */
.gp-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: rgba(11, 16, 32, 0.95);
    border: 1px solid var(--border);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    pointer-events: none;
    text-align: center;
    max-width: 90%;
    backdrop-filter: blur(8px);
}
.gp-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.gp-toast--error {
    border-color: #ef4444;
    color: #f87171;
}

.map-live-stack {
    position: absolute;
    top: 62px;
    left: 12px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(280px, calc(100vw - 24px));
}

.map-live-stack[hidden] {
    display: none !important;
}

.map-live-card {
    background: rgba(6, 8, 22, 0.94);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    backdrop-filter: blur(10px);
    font-size: 0.78rem;
    color: #e5e7eb;
}

.map-live-card[hidden] {
    display: none !important;
}

.map-live-card--traffic {
    border-color: color-mix(in srgb, var(--traffic-color, #22c55e) 45%, var(--border));
}

.map-live-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.72rem;
}

.map-live-score {
    font-weight: 800;
    color: var(--traffic-color, #22c55e);
}

.map-live-wx-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-live-wx-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.map-live-wx-temp {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.1;
}

.map-live-muted {
    color: var(--muted);
    font-size: 0.7rem;
}

.map-live-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.68rem;
    color: var(--muted);
}

.map-live-factors {
    margin: 8px 0 0;
    padding-left: 16px;
    font-size: 0.65rem;
    color: var(--muted);
}

.map-live-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    margin-top: 8px;
    overflow: hidden;
}

.map-live-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

@media (max-width: 480px) {
    .map-tools {
        top: auto;
        bottom: 24px;
        right: 12px;
        flex-direction: column;
    }

    .map-live-stack {
        top: auto;
        bottom: 200px;
        left: 12px;
        right: 12px;
        max-width: none;
        max-height: calc(100% - 220px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

.map-legend {
    background: rgba(6, 8, 22, 0.94);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.62rem;
    color: var(--muted);
    width: max-content;
    max-width: calc(100vw - 24px);
    backdrop-filter: blur(10px);
}

.map-legend.collapsed .leg-body {
    display: none;
}

.map-legend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.map-legend.collapsed .map-legend-head {
    margin-bottom: 0;
}

.map-legend h4 {
    margin: 0;
    color: #e5e7eb;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
}

.legend-toggle {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    flex-shrink: 0;
}

.leg-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.leg-row:last-child {
    margin-bottom: 0;
}

.leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gp-pin-marker {
    background: transparent !important;
    border: none !important;
}

.gp-pin-marker * {
    pointer-events: auto;
    cursor: pointer;
}

#station-panel {
    position: absolute;
    z-index: 1001;
    background: rgba(6, 8, 22, 0.98);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 72vh;
    border-radius: 18px 18px 0 0;
    padding: 0 16px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateY(100%);
}

#station-panel.open {
    transform: translateY(0);
}

.panel-drag-handle {
    width: 36px;
    height: 4px;
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    margin: 10px auto 12px;
}

.sp-collapse-btn-bottom {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    z-index: 1050;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.sp-collapse-btn-bottom:hover {
    background: rgba(30, 41, 59, 0.95);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.sp-collapse-btn-bottom:active {
    transform: scale(0.95);
}

#sp-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    scroll-padding-bottom: max(28px, env(safe-area-inset-bottom));
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

#panel-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#panel-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.sp-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sp-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

#sp-close-btn {
    width: auto;
    margin: 0;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    color: #cbd5e1;
    border-radius: 10px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    min-height: 28px;
    flex-shrink: 0;
    white-space: nowrap;
}

.win-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

/* Zwarty moduł ruchu: komunikat i oba okna czasowe bez powtarzania danych. */
.traffic-summary {
    display: grid;
    grid-template-columns: minmax(105px, 1.4fr) repeat(2, minmax(62px, 0.65fr));
    align-items: stretch;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--summary-color, #22c55e) 42%, var(--border));
    border-left: 4px solid var(--summary-color, #22c55e);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 4px 12px var(--dash-shadow);
}

.traffic-summary__status {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 3px 5px;
}

.traffic-summary__status strong {
    color: var(--summary-color, #22c55e);
    font-size: calc(0.88rem * var(--sp-font-scale, 1));
    line-height: 1.16;
}

.traffic-summary__status small {
    overflow: hidden;
    color: var(--muted);
    font-size: calc(0.68rem * var(--sp-font-scale, 1));
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.traffic-summary__metric {
    min-width: 0;
    display: grid;
    place-content: center;
    gap: 2px;
    padding: 4px 3px;
    border: 1px solid color-mix(in srgb, var(--summary-color, #22c55e) 36%, var(--border));
    border-radius: 9px;
    background: rgba(2, 8, 23, 0.2);
    text-align: center;
}

.traffic-summary__metric b {
    font-size: calc(1.32rem * var(--sp-font-scale, 1));
    line-height: 1;
}

.traffic-summary__metric span {
    color: var(--muted);
    font-size: calc(0.59rem * var(--sp-font-scale, 1));
    line-height: 1.05;
    white-space: nowrap;
}

.chip-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.chip-compact-sm {
    gap: 6px;
    justify-content: center;
}

.chip-num {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.chip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.chip-title {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.25;
}

.chip-sub {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.2;
}

.wchip {
    flex: 1;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 6px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.wchip.green  { border-color: #22c55e; }
.wchip.yellow { border-color: #f59e0b; }
.wchip.red    { border-color: #ef4444; }
.wchip.purple { border-color: #a855f7; }

.wchip .wc-num {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.wc-inline {
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.1;
}

.wc-sub {
    font-size: 0.66rem;
    color: var(--muted);
    line-height: 1.1;
}

.driver-tip {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(15, 23, 42, 0.85);
    border-left: 4px solid #334155;
}

.driver-tip.green  { border-color: #22c55e; color: #86efac; }
.driver-tip.yellow { border-color: #f59e0b; color: #fde68a; }
.driver-tip.red    { border-color: #ef4444; color: #fca5a5; }
.driver-tip.purple { border-color: #a855f7; color: #d8b4fe; }

.driver-tip.sky {
    border-color: #0ea5e9;
    color: #7dd3fc;
}

.driver-tip.sky .chip-title {
    color: #bae6fd;
}

.driver-tip .chip-title {
    color: inherit;
}

.filter-buttons {
    margin: 10px 0;
    display: flex;
    gap: 6px;
    padding: 6px;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 10px;
}

.filter-btn {
    flex: 1;
    padding: 10px 6px;
    background: rgba(51, 65, 85, 0.6);
    color: #cbd5e1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 40px;
}

.filter-btn.active {
    background: #22c55e;
    color: #052e16;
}

.train-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
}

.train-tbl th {
    color: #64748b;
    font-weight: 500;
    text-align: left;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 0.7rem;
}

.train-tbl td {
    padding: 10px 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.train-tbl tr.delayed td {
    color: #fca5a5;
}

.train-tbl--flights {
    table-layout: fixed;
    width: 100%;
}

.train-tbl--flights th,
.train-tbl--flights td {
    padding: 8px 4px;
    vertical-align: top;
    text-align: left;
}

.train-tbl--flights th {
    white-space: nowrap;
}

.train-tbl--flights .col-flight {
    width: auto;
    padding-right: 8px;
    white-space: normal;
    word-break: break-word;
}

.train-tbl--flights .col-time {
    width: 2.85rem;
    white-space: nowrap;
}

.train-tbl--flights .col-mins {
    width: 3.15rem;
    white-space: nowrap;
}

.train-tbl--flights .col-status {
    width: 4.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    line-height: 1.25;
}

.train-tbl--flights .col-status .flight-status-label,
.train-tbl--flights .col-status .flight-status-time {
    display: inline;
    font-size: inherit;
}

.train-tbl--flights .col-status .flight-status-time {
    margin-left: 2px;
    font-weight: 700;
}

.train-tbl--flights .flight-route {
    display: inline-block;
    vertical-align: top;
    min-width: 0;
    max-width: calc(100% - 1.5rem);
}

.train-tbl--flights .flight-num {
    display: inline;
    font-weight: 600;
}

.train-tbl--flights .flight-origin {
    display: block;
    color: #94a3b8;
    font-size: 0.92em;
    line-height: 1.25;
    word-break: break-word;
}

.train-tbl--flights tr.delayed .col-status {
    color: inherit;
}

/* Mobilna lista lotów: status ma osobny wiersz, więc nigdy nie nachodzi na czas. */
.flight-list {
    margin-top: 3px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.flight-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "route timing"
        "route status";
    align-items: start;
    gap: 2px 8px;
    min-width: 0;
    padding: 7px 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.flight-list-route {
    grid-area: route;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.flight-list-route .tag {
    flex: 0 0 auto;
    margin-top: 1px;
    padding-right: 4px;
    padding-left: 4px;
}

.flight-list-route-copy {
    min-width: 0;
    display: block;
}

.flight-list-route-copy strong,
.flight-list-route-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flight-list-route-copy strong {
    color: var(--text);
    font-size: calc(0.76rem * var(--sp-font-scale, 1));
    line-height: 1.2;
}

.flight-list-route-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: calc(0.66rem * var(--sp-font-scale, 1));
    line-height: 1.15;
}

.flight-list-row.delayed .flight-list-route-copy strong {
    color: #ef4444;
}

.flight-list-timing {
    grid-area: timing;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}

.flight-list-timing > strong {
    color: var(--text);
    font-size: calc(0.74rem * var(--sp-font-scale, 1));
    line-height: 1.2;
}

.flight-list-countdown {
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    font-size: calc(0.64rem * var(--sp-font-scale, 1));
    font-weight: 750;
    line-height: 1.35;
}

.flight-list-countdown--now {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.flight-list-status {
    grid-area: status;
    justify-self: end;
    min-width: 0;
    max-width: min(100%, 11rem);
    overflow: hidden;
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.09);
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flight-list-status:empty {
    display: none;
}

#station-panel .flight-list-status .flight-status-label,
#station-panel .flight-list-status .flight-status-time {
    display: inline;
    font-size: calc(0.63rem * var(--sp-font-scale, 1)) !important;
    line-height: 1.25;
}

.flight-status-label {
    display: inline-block;
    color: #cbd5e1;
    font-size: 0.72rem;
}

.train-tbl--flights tr.delayed .flight-status-label {
    color: #fca5a5;
}

.flight-status-time {
    display: inline-block;
    margin-left: 5px;
    color: #fbbf24;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.train-tbl--flights tr.delayed .flight-status-time {
    color: #fde047;
}

.tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
}

.tag.arr { background: #14532d; color: #86efac; }
.tag.dep { background: #172554; color: #93c5fd; }

.mins-big { color: #38bdf8; font-weight: 700; }
.sp-loader { color: var(--muted); font-size: 0.85rem; }
.sp-ts { color: #475569; font-size: 0.68rem; margin-top: 12px; }
.err-note {
    background: #1e1b4b;
    border: 1px solid #4f46e5;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.76rem;
    color: #a5b4fc;
    margin-top: 8px;
}

.arrivals-preview {
    margin-top: 2px;
}

.arrivals-preview h4 {
    margin: 0 0 6px;
    padding: 0;
    font-size: 0.82rem;
    color: #86efac;
    font-weight: 700;
}

.arrival-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.78rem;
}

.arrival-row:last-child {
    border-bottom: none;
}

.arrival-meta {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
        "time mins"
        "status status";
    gap: 2px 0.45rem;
    align-items: start;
    justify-items: end;
}

.arrival-meta .arrival-time {
    grid-area: time;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    text-align: left;
}

.arrival-meta .arrival-mins {
    grid-area: mins;
    white-space: nowrap;
    text-align: left;
}

.arrival-meta .arrival-status {
    grid-area: status;
    min-width: 0;
    max-width: 9rem;
    display: block;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    line-height: 1.25;
}

.arrival-status-text {
    color: #94a3b8;
    font-weight: 700;
}

.arrival-status-text.delayed {
    color: #f59e0b;
}

.arrival-status-text.landed {
    color: #4ade80;
}

.arrival-train {
    flex: 1 1 auto;
    min-width: 0;
    color: #cbd5e1;
    white-space: normal;
}

.arrival-train .flight-num {
    display: inline;
    font-weight: 600;
}

.arrival-train .flight-origin {
    display: block;
    color: #94a3b8;
    font-size: 0.92em;
    line-height: 1.25;
    word-break: break-word;
}

@media (max-width: 380px) {
    .arrival-meta {
        grid-template-columns: auto auto;
    }

    .train-tbl--flights .col-time {
        width: 2.5rem;
    }

    .train-tbl--flights .col-mins {
        width: 2.75rem;
    }

    .train-tbl--flights .col-status {
        width: 3.8rem;
        max-width: 3.8rem;
        font-size: 0.62rem;
    }

    .arrival-meta .arrival-status {
        max-width: 7.5rem;
        font-size: 0.62rem;
    }
}

/* ── Dashboard: pogoda + ruch miasta ─────────────────────────────────── */
.live-city-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.live-city-card {
    background: var(--dash-card-bg);
    border: 2px solid var(--dash-card-border);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 8px 28px var(--dash-shadow);
}

.live-city-card--traffic {
    border-color: color-mix(in srgb, var(--traffic-color, #22c55e) 40%, var(--dash-card-border));
}

.live-city-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.live-city-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.live-weather-main,
.live-traffic-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.live-wx-icon,
.live-traffic-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.live-wx-temp,
.live-traffic-label {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.live-wx-label,
.live-traffic-sub {
    font-size: 0.82rem;
    margin-top: 2px;
}

.live-wx-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--muted);
}

.live-traffic-score {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--traffic-color, #22c55e);
}

.live-traffic-factors {
    margin: 10px 0 0;
    padding: 0 0 0 18px;
    font-size: 0.78rem;
    color: var(--muted);
}

.live-traffic-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    margin-top: 12px;
    overflow: hidden;
}

.live-traffic-bar > span {
    display: block;
    height: 100%;
    background: var(--traffic-color, #22c55e);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* SOS — przycisk floty */
.sos-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9000;
}

.sos-fab[hidden] {
    display: none !important;
}

.sos-fab-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #dc2626;
    color: #fff;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45);
    animation: sos-pulse 2s infinite;
}

.sos-fab.is-active .sos-fab-btn {
    background: #991b1b;
    animation: none;
}

@keyframes sos-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
}

.sos-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: min(280px, calc(100vw - 32px));
    background: var(--dash-card-bg, #111);
    border: 1px solid var(--dash-card-border, #333);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
    .live-city-row {
        grid-template-columns: 1fr;
    }
}

/* ── Dashboard: centrum dowodzenia ──────────────────────────────────── */
.cc-wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    margin-bottom: 22px;
}

.cc-map-card {
    background: var(--dash-card-bg);
    border: 2px solid var(--dash-card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px var(--dash-shadow);
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.cc-map-head {
    padding: 16px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.cc-map-head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.cc-city-btn {
    font-size: 0.78rem;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}

.cc-city-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

#cc-mini-map {
    flex: 1;
    min-height: 220px;
    cursor: pointer;
}

.cc-map-foot {
    padding: 10px 20px 16px;
    font-size: 0.78rem;
    color: var(--muted);
}

.cc-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cc-airport-panel {
    flex: 1;
    margin-bottom: 0;
    padding: 18px 20px;
    border-color: rgba(14, 165, 233, 0.25);
}

.cc-airport-panel h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.airport-hero-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.airport-iata {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.35);
    color: #7dd3fc;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.train-row-dash--airport {
    font-size: 0.82rem;
}

.cc-airport-panel .ts-note {
    margin-top: 10px;
    margin-bottom: 0;
}

.cc-alert {
    background: var(--dash-card-bg);
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px var(--dash-shadow);
}

.cc-alert .cc-num {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.cc-alert .cc-txt {
    margin-top: 0;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.25;
}

.cc-alert .cc-sub {
    margin-top: 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.2;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dash-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 767px) {
    .dash-grid--3 {
        grid-template-columns: 1fr 1fr;
    }

    .dash-grid--3 .stat-card:last-child {
        grid-column: 1 / -1;
    }
}

.stat-card {
    background: var(--dash-card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 22px rgba(2, 8, 23, 0.28);
    min-height: 92px;
    border-left: 3px solid rgba(125, 211, 252, 0.45);
}

.stat-card .sc-num {
    font-size: 1.6rem;
    font-weight: 800;
    flex-shrink: 0;
    line-height: 1;
    color: #f8fafc;
}

.stat-card .sc-label {
    color: #cbd5e1;
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.stat-card-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.dash-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.dash-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dash-quick-btn span {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
}

.dash-quick-btn--live {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.dash-quick-btn--live:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.45);
}

.dash-quick-btn--soon {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fbbf24;
}

.dash-quick-btn--off,
.dash-quick-btn--lock {
    background: rgba(100, 116, 139, 0.15);
    border-color: #475569;
    color: #94a3b8;
    cursor: default;
}

.map-legend--airports h4 {
    color: #7dd3fc;
}

.pkp-panel {
    background: var(--dash-card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 8px 32px var(--dash-shadow);
}

.pkp-panel h2 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.dashboard-page .pkp-panel .ts-note,
.dashboard-page .cc-airport-panel .ts-note {
    color: #94a3b8;
    font-size: 0.82rem;
}

.train-row-dash {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.ev-card {
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 4px 12px var(--dash-shadow);
}

.ev-card .ev-city {
    color: var(--accent);
    font-size: 0.78rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.ev-card h3 {
    margin: 0 0 6px;
    font-size: 0.92rem;
    color: var(--text);
}

.ev-card .ev-meta {
    font-size: 0.78rem;
    color: var(--muted);
}

@media (max-width: 860px) {
    .cc-wrap {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 10px;
    }

    .cc-side {
        gap: 8px;
    }

    .cc-airport-panel {
        padding: 14px 16px;
    }

    .cc-airport-panel h2 {
        font-size: 0.92rem;
    }

    .cc-alert {
        padding: 10px 12px;
    }

    .cc-alert .cc-num {
        font-size: 2rem;
    }

    .cc-alert .cc-txt {
        font-size: 0.82rem;
    }

    .cc-alert .cc-sub {
        font-size: 0.72rem;
    }

    .chip-compact {
        gap: 10px;
    }

    .chip-num {
        font-size: 1.75rem;
    }

    .wchip .wc-num {
        font-size: 1.35rem;
    }

    .stat-card {
        padding: 10px;
        gap: 8px;
    }

    .stat-card .sc-num {
        font-size: 1.4rem;
    }

    .stat-card .sc-label {
        font-size: 0.72rem;
    }

    .dash-grid {
        gap: 8px;
    }

    .cc-map-card {
        min-height: 250px;
    }

    .cc-map-head {
        padding: 12px 16px 0;
    }

    .cc-map-foot {
        padding: 6px 14px 10px;
    }

    .pkp-panel {
        padding: 16px;
        margin-bottom: 12px;
    }

    .pkp-panel h2 {
        margin-bottom: 12px;
        font-size: 1.05rem;
    }
}

@media (min-width: 768px) {
    .map-app-header nav a {
        font-size: 0.82rem;
    }

    #station-panel {
        top: 0;
        right: 0;
        left: auto;
        bottom: 0;
        width: min(380px, 92vw);
        max-height: none;
        border-radius: 0;
        border-left: 1px solid var(--border);
        border-top: none;
        padding: 20px;
        transform: translateX(100%);
    }

    #station-panel.open {
        transform: translateX(0);
    }

    .panel-drag-handle {
        display: none;
    }
}

/* --- STATION PANEL FONT SIZE CONTROLS & SCROLL PROPAGATION FIX --- */
#station-panel {
    --sp-font-scale: 1.0;
}
#station-panel .sp-header h3 { font-size: calc(1rem * var(--sp-font-scale)) !important; }
#station-panel #sp-close-btn { font-size: calc(0.72rem * var(--sp-font-scale)) !important; }
#station-panel .train-tbl { font-size: calc(0.76rem * var(--sp-font-scale)) !important; }
#station-panel .train-tbl th { font-size: calc(0.7rem * var(--sp-font-scale)) !important; }
#station-panel .chip-num { font-size: calc(2rem * var(--sp-font-scale)) !important; }
#station-panel .chip-title { font-size: calc(0.86rem * var(--sp-font-scale)) !important; }
#station-panel .chip-sub { font-size: calc(0.72rem * var(--sp-font-scale)) !important; }
#station-panel .sp-ts { font-size: calc(0.68rem * var(--sp-font-scale)) !important; }
#station-panel .arrivals-preview h4 { font-size: calc(0.82rem * var(--sp-font-scale)) !important; }
#station-panel .arrival-row { font-size: calc(0.78rem * var(--sp-font-scale)) !important; }
#station-panel .arrival-status-text { font-size: calc(0.68rem * var(--sp-font-scale)) !important; }
#station-panel .arrival-train .flight-origin { font-size: calc(0.72rem * var(--sp-font-scale)) !important; }
#station-panel .sp-loader { font-size: calc(0.85rem * var(--sp-font-scale)) !important; }
#station-panel .filter-btn { font-size: calc(0.75rem * var(--sp-font-scale)) !important; }
#station-panel .sp-font-controls button { font-size: calc(0.8rem * var(--sp-font-scale)) !important; }
#station-panel .flight-status-label { font-size: calc(0.72rem * var(--sp-font-scale)) !important; }
#station-panel .flight-status-time { font-size: calc(0.82rem * var(--sp-font-scale)) !important; }
#station-panel .tag { font-size: calc(0.62rem * var(--sp-font-scale)) !important; }

.sp-font-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}
.sp-font-controls button {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-font-controls button:hover {
    background: #22c55e;
    color: #052e16;
    border-color: #22c55e;
}

@keyframes pulse-marker {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   NOWE MENU DOLNE (KAFLOWY DRAWER & INTEGRACJA)
   ========================================================================== */



/* Główny pasek nawigacji dolnej */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 540px;
    height: calc(64px + env(safe-area-inset-bottom));
    background: rgba(28, 37, 65, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 12000;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(2, 8, 23, 0.45);
    box-sizing: border-box;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    text-decoration: none;
    border: none;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 600;
    gap: 3px;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    padding: 4px 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover {
    color: #cbd5e1;
    text-decoration: none;
}

.bottom-nav-item.active {
    color: #60a5fa;
}

.bottom-nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.2px;
    transition: transform 0.15s ease;
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.1);
    stroke-width: 2.5px;
}

.bottom-nav-item--center {
    color: #c4b5fd;
    transform: translateY(-6px);
}

.bottom-nav-item--center:hover,
.bottom-nav-item--center.active {
    color: #ffffff;
}

.bottom-nav-center-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: var(--gp-gradient-home);
    box-shadow: 0 5px 18px rgba(99, 102, 241, 0.42);
}

.bottom-nav-item--center .bottom-nav-icon {
    width: 19px;
    height: 19px;
    color: #ffffff;
}

.bottom-nav-item--center.active .bottom-nav-icon {
    transform: none;
}

/* Tło szuflady (drawer backdrop) */
.bottom-nav-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 23, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 12010;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-nav-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Szuflada (drawer) */
.bottom-nav-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 540px;
    background: #090e1d;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 24px 24px 0 0;
    z-index: 12020;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    max-height: min(82dvh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bottom-nav-drawer.is-open {
    transform: translate(-50%, 0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 2px;
    margin: 0 auto 18px;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.driver-profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(96, 165, 250, 0.25);
}

.driver-name {
    display: block;
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 700;
}

.driver-role {
    display: block;
    color: #94a3b8;
    font-size: 0.76rem;
    margin-top: 1px;
}

.drawer-close {
    font-size: 1.6rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
    line-height: 1;
}

.drawer-close:hover {
    background: rgba(148, 163, 184, 0.25);
    color: #f8fafc;
}

.drawer-plan-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.65);
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.drawer-font-size {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.45);
}

.drawer-font-size > span,
.drawer-font-size strong,
.drawer-font-size small {
    display: block;
}

.drawer-font-size strong {
    color: #e2e8f0;
    font-size: 0.78rem;
}

.drawer-font-size small {
    margin-top: 1px;
    color: #94a3b8;
    font-size: 0.62rem;
}

/* Krótka informacja o mieście niedostępnym w aktualnym pakiecie. */
.gp-plan-toast {
    position: fixed;
    left: 50%;
    bottom: calc(82px + env(safe-area-inset-bottom));
    z-index: 13050;
    max-width: min(350px, calc(100vw - 28px));
    padding: 10px 14px;
    border: 1px solid rgba(167, 139, 250, 0.48);
    border-radius: 14px;
    background: rgba(40, 27, 76, 0.97);
    box-shadow: 0 12px 34px rgba(30, 20, 60, 0.34);
    color: #f5f3ff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(0.97);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.gp-plan-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.drawer-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 18px 12px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 8px;
    text-align: center;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.drawer-grid-item:hover {
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(96, 165, 250, 0.35);
    color: #fff;
    text-decoration: none;
}

.drawer-item-icon {
    font-size: 1.5rem;
}

.drawer-grid-item.admin-item {
    border-color: rgba(239, 68, 68, 0.22);
}
.drawer-grid-item.admin-item:hover {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
}

.drawer-grid-item.logout-item {
    grid-column: span 2;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    flex-direction: row;
    justify-content: center;
    padding: 12px;
    gap: 8px;
}

.drawer-grid-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: #ef4444;
    color: #fee2e2;
}

/* Responsywne dostosowania dla małych i dużych ekranów */
@media (max-width: 540px) {
    .bottom-nav {
        border-radius: 0;
        max-width: 100%;
    }
    .bottom-nav-drawer {
        border-radius: 24px 24px 0 0;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    /* Odrobinke mniej "pustego" miejsca pod ekranem w mobile */
    .bottom-nav {
        height: calc(60px + env(safe-area-inset-bottom));
        padding-bottom: max(0px, calc(env(safe-area-inset-bottom) - 6px));
    }
}

/* ── GdziePopyt 4.3.1: zwarty nagłówek i czytelna oś ──────────────── */
.site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.site-header-top {
    min-height: 34px;
    padding: max(1px, env(safe-area-inset-top)) 6px 1px;
}

.partner-ticker {
    display: flex;
    align-items: center;
    width: 100%;
    height: 30px;
    margin-top: -10px;
    overflow: hidden;
    border-top: 1px solid rgba(56, 189, 248, 0.18);
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
    background: linear-gradient(90deg, #07101f, #0f1b32 48%, #15122f);
    color: #dbeafe;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.partner-ticker__badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    flex: 0 0 auto;
    padding: 0 10px;
    background: linear-gradient(135deg, #047857, #16a34a);
    color: #ffffff;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.09em;
    box-shadow: 5px 0 14px rgba(2, 6, 23, 0.28);
}

.partner-ticker__viewport {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}

.partner-ticker__track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: gp-partner-ticker 34s linear infinite;
    will-change: transform;
}

.partner-ticker__group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 34px;
    padding: 0 34px 0 14px;
}

.partner-ticker__group span,
.partner-ticker__group a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: inherit;
    font-size: var(--ticker-font-size, 11px);
    font-weight: 750;
    line-height: 28px;
    text-decoration: none;
    white-space: nowrap;
}

.partner-ticker__group a {
    color: #a5b4fc;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-color: rgba(129, 140, 248, 0.62);
    text-underline-offset: 3px;
}

.partner-ticker__group a::after {
    content: "↗";
    color: #818cf8;
    font-size: 0.85em;
}

.partner-ticker__group i {
    color: #38bdf8;
    font-size: 6px;
    font-style: normal;
}

.partner-ticker:hover .partner-ticker__track,
.partner-ticker:focus-within .partner-ticker__track {
    animation-play-state: paused;
}

.partner-ticker__group a:hover,
.partner-ticker__group a:focus-visible {
    color: #7dd3fc;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@keyframes gp-partner-ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.driver-ad-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 30px;
    padding: 4px 12px;
    border-bottom: 1px solid rgba(129, 140, 248, 0.28);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), rgba(124, 58, 237, 0.18));
    color: #dbeafe;
    font-size: 0.72rem;
    text-align: center;
}

.driver-ad-banner__label {
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--gp-gradient-home);
    color: #ffffff;
    font-size: 0.52rem;
    font-weight: 950;
    letter-spacing: 0.09em;
}

.driver-ad-banner a {
    color: #c4b5fd;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.theme-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    min-width: 34px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid rgba(96, 165, 250, 0.44);
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(124, 58, 237, 0.3));
    color: #e0f2fe;
    font: inherit;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(2, 8, 23, 0.2);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: #38bdf8;
    outline: none;
    transform: translateY(-1px);
}

.font-size-controls--header {
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.font-size-controls--header button {
    width: 34px;
    min-width: 34px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.28), rgba(30, 64, 175, 0.26));
    color: #dff6ff;
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(2, 8, 23, 0.18);
}

.drawer-grid-item[data-gp-theme-toggle] {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bottom-nav-item--center .bottom-nav-label {
    margin-top: -2px;
    background: var(--gp-gradient-home);
    color: #ffffff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    line-height: 1;
}

@media (max-width: 420px) {
    .site-header .tagline {
        display: none;
    }

    .site-header-top {
        gap: 4px;
    }

    .city-badge {
        max-width: 82px;
    }

    .theme-toggle,
    .font-size-controls--header button {
        width: 32px;
        min-width: 32px;
    }
}

/* Pasek partnerski wykorzystuje dotychczasowy górny odstęp dashboardu.
   Na telefonie dashboard zajmuje też odzyskane boczne marginesy. */
@media (max-width: 680px) {
    .page.dashboard-page {
        padding: 0 0 38px !important;
        border-right: 0;
        border-left: 0;
    }

    .demand-now {
        padding-right: 6px;
        padding-left: 6px;
    }

    .demand-timeline {
        margin-right: -4px;
        margin-left: -4px;
        padding-right: 2px;
        padding-left: 2px;
    }

    .demand-now__head h1 {
        font-size: calc(1.55rem - 1px);
    }

    .recommendation-card--primary .recommendation-card__icon {
        font-size: calc(1rem - 1px);
    }

    .recommendation-card--primary .recommendation-card__title h2 {
        font-size: clamp(calc(0.84rem - 1px), 4.5vw, calc(1rem - 1px));
    }

    .recommendation-card--primary .recommendation-card__score b {
        font-size: calc(1.3rem - 1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .partner-ticker__track {
        animation-play-state: paused;
        transform: none;
    }

    .demand-timeline__now-marker {
        transition: none;
    }

    .demand-timeline__now-marker.is-ticking::before {
        animation: none;
    }
}

/* Tryb wydajnościowy dla ciemnego motywu na telefonie. Wielowarstwowe blury,
   maski i puls wymuszały kosztowne ponowne malowanie całego ekranu. */
@media (max-width: 767px) {
    html[data-gp-theme="dark"] body * {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    html[data-gp-theme="dark"] .page.dashboard-page::before,
    html[data-gp-theme="dark"] .dashboard-page::before,
    html[data-gp-theme="dark"] .recommendation-card::after {
        display: none !important;
    }

    html[data-gp-theme="dark"] .partner-ticker__viewport {
        mask-image: none !important;
        -webkit-mask-image: none !important;
    }

    html[data-gp-theme="dark"] .partner-ticker__track {
        will-change: auto;
    }

    html[data-gp-theme="dark"] .demand-now,
    html[data-gp-theme="dark"] .recommendation-card,
    html[data-gp-theme="dark"] .dashboard-page .cc-map-card,
    html[data-gp-theme="dark"] .dashboard-page .cc-alert,
    html[data-gp-theme="dark"] .dashboard-page .stat-card,
    html[data-gp-theme="dark"] .dashboard-page .pkp-panel,
    html[data-gp-theme="dark"] .bottom-nav,
    html[data-gp-theme="dark"] #station-panel {
        box-shadow: 0 4px 14px rgba(2, 8, 23, 0.28) !important;
    }

    html[data-gp-theme="dark"] .recommendation-card,
    html[data-gp-theme="dark"] .bottom-nav-item,
    html[data-gp-theme="dark"] .drawer-grid-item {
        transition: none !important;
    }

    html[data-gp-theme="dark"] .recommendation-card:hover,
    html[data-gp-theme="dark"] .recommendation-card:active,
    html[data-gp-theme="dark"] .dashboard-page .cc-map-card,
    html[data-gp-theme="dark"] .dashboard-page .cc-alert,
    html[data-gp-theme="dark"] .dashboard-page .stat-card,
    html[data-gp-theme="dark"] .dashboard-page .pkp-panel,
    html[data-gp-theme="dark"] .dashboard-page .coming-soon--compact {
        transform: none !important;
    }

    html[data-gp-theme="dark"] .demand-timeline__now-marker.is-ticking::before {
        animation: none !important;
    }
}

/* Przesunięcie kontrolek mapy Leaflet ponad menu dolne */
body.map-app .map-tools {
    bottom: calc(84px + env(safe-area-inset-bottom)) !important;
}
body.map-app #map-status {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
}
#station-panel {
    z-index: 11000 !important;
}

/* Na telefonie panel punktu nie zasłania dolnej nawigacji. Szuflada „Więcej”
   ma osobną, wyższą warstwę i zawsze otwiera się ponad całą mapą. */
@media (max-width: 767px) {
    body.map-app .map-tools {
        flex-direction: row;
        gap: 2px;
    }

    body.map-app #station-panel {
        height: min(78dvh, 720px);
        max-height: calc(100dvh - 48px);
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    body.map-app #sp-body::after {
        content: "";
        display: block;
        height: 16px;
    }

    body.map-app .sp-collapse-btn-bottom {
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

body.bottom-drawer-open .map-tools,
body.bottom-drawer-open .map-live-stack,
body.bottom-drawer-open .map-legend-wrap {
    pointer-events: none;
}

/* ── Mapa wydarzeń ───────────────────────────────────────────────────── */
.map-app--events .map-stage {
    position: relative;
}

.map-app--events #station-panel.events-panel {
    display: flex;
    flex-direction: column;
    max-height: 46vh;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.map-app--events #station-panel.events-panel.open {
    transform: translateY(0);
}

body.events-map-locked.map-app--events #station-panel.events-panel {
    transform: translateY(0) !important;
}

body.events-map-locked.map-app--events #panel-backdrop {
    opacity: 0 !important;
    pointer-events: none !important;
}

body.events-map-locked.map-app--events .sp-collapse-btn-bottom {
    display: none;
}

.sp-header--events {
    grid-template-columns: minmax(0, 1fr) auto;
}

.sp-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-lock-btn {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
    border-radius: 10px;
    width: 38px;
    height: 34px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.sp-lock-btn.is-locked {
    background: rgba(20, 184, 166, 0.15);
    border-color: #14b8a6;
    color: #5eead4;
}

.events-panel-nav {
    flex-shrink: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.events-section-label {
    margin: 0 0 6px;
    padding: 0;
    font-size: 0.68rem;
    color: #64748b;
    letter-spacing: 0.02em;
}

.events-section-label strong {
    color: #5eead4;
    font-weight: 800;
    font-size: 0.74rem;
}

.events-panel-filters {
    flex-shrink: 0;
    padding: 0;
}

.events-panel-list-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-top: 6px;
}

.events-filter-strip {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 4px 4px 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
}

.events-filter-strip::-webkit-scrollbar {
    display: none;
}

.events-panel-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.events-filter-chip {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none;
    margin: 0 !important;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.65) !important;
    color: #cbd5e1;
    border-radius: 999px;
    padding: 4px 9px !important;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none;
    min-height: 0;
}

.events-filter-chip.is-active {
    background: rgba(20, 184, 166, 0.18) !important;
    border-color: #14b8a6;
    color: #5eead4;
}

.events-filter-chip:hover {
    border-color: rgba(148, 163, 184, 0.45);
    transform: none;
    box-shadow: none;
}

.ev-filter-count,
.ev-filter-sub {
    opacity: 0.75;
    font-weight: 500;
    font-size: 0.72rem;
}

.ev-filter-sub {
    font-size: 0.68rem;
}

.events-panel-card {
    width: 100%;
    max-width: none;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-left: 3px solid var(--ev-color, #64748b);
    background: rgba(15, 23, 42, 0.72);
    padding: 6px 10px 7px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.events-panel-card.is-active {
    border-color: var(--ev-color, #14b8a6);
    background: rgba(20, 184, 166, 0.08);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ev-color, #14b8a6) 35%, transparent);
}

.events-panel-card__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.events-panel-card__emoji {
    font-size: 0.95rem;
    line-height: 1;
}

.events-panel-card__title {
    font-size: 0.82rem;
    line-height: 1.15;
    color: #f1f5f9;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.events-panel-card__time {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
}

.events-panel-card__sub {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.66rem;
    color: #64748b;
    line-height: 1.1;
}

.events-panel-card__venue {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #94a3b8;
}

.events-panel-card__type {
    flex: 0 0 auto;
    color: #64748b;
}

.events-panel-card__people {
    flex: 0 0 auto;
    color: #22c55e;
}

.events-panel-empty {
    color: #94a3b8;
    font-size: 0.82rem;
    margin: 8px 0 0;
}

.gp-city-label-marker,
.gp-event-label-marker {
    background: transparent !important;
    border: none !important;
}

.gp-city-label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(6, 8, 22, 0.88);
    border: 1.5px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.gp-event-label {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    max-width: 120px;
    padding: 4px 8px 5px;
    border-radius: 8px;
    background: rgba(6, 8, 22, 0.9);
    border: 1.5px solid var(--ev-color, #64748b);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -100%);
    margin-top: -4px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gp-event-label.is-active {
    transform: translate(-50%, -100%) scale(1.06);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ev-color, #14b8a6) 45%, transparent), 0 4px 14px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.gp-event-label__time {
    font-size: 0.64rem;
    font-weight: 800;
    color: var(--ev-color, #94a3b8);
}

.gp-event-label__title {
    font-size: 0.68rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gp-event-cluster-marker {
    background: transparent !important;
    border: none !important;
}

.gp-event-cluster {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(6, 8, 22, 0.92);
    border: 2px solid rgba(94, 234, 212, 0.9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    color: #5eead4;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    transform: translate(-50%, -100%);
    margin-top: -4px;
    cursor: pointer;
    pointer-events: auto;
}

.map-app--events .map-legend--events .leg-body {
    font-size: 0.68rem;
}

@media (min-width: 768px) {
    .map-app--events #station-panel.events-panel {
        max-height: 52vh;
        left: auto;
        right: 16px;
        bottom: calc(84px + env(safe-area-inset-bottom));
        width: min(420px, calc(100vw - 32px));
        border-radius: 16px;
    }
}
