/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   GdzieCwiczyc.pl ????????? Modern CSS with Glassmorphism
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --landing-blue: #2563EB;
    --accent: #10B981;
    --accent-light: #34D399;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #F0F2F5;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text: #1F2937;
    --text-muted: #6B7280;
    --card-soft: #F6F7FA;
    --card-line: #E2E4EC;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --navbar-height: 48px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* ????????? Navbar ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(17, 24, 39, 0.9) !important;
    z-index: 1050;
    padding: 0.4rem 0.75rem;
    height: var(--navbar-height);
}

.navbar-brand {
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.navbar-brand .brand-tld {
    color: var(--accent-light);
}

.navbar-actions {
    flex-shrink: 0;
    flex-wrap: nowrap !important;
}

/* ????????? Search Bar + Controls ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.search-bar-container {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    z-index: 1040;
    padding: 0.25rem 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.search-input-group {
    display: flex;
    gap: 0.45rem;
    align-items: flex-end;
}

.search-input-group .form-control {
    border-radius: 50px;
    border: 2px solid transparent;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input-group .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Shared button style in search bar */
.btn-search-bar {
    border-radius: 50px;
    padding: 0.5rem 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    line-height: 1;
    min-height: 42px;
    height: 42px;
    box-sizing: border-box;
}

/* Hover is deliberately SUBTLER than the open/active state ??? otherwise the
   cursor resting on a just-closed button looks like it is still active. */
.btn-search-bar:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn-search-bar.active,
.btn-search-bar:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.96);
    color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

/* ????????? Search groups (Filtry / Sortowanie) ??????????????????????????????????????????????????????????????????????????????????????????????????? */
.search-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.search-group-label {
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.64em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    padding: 0 0.65rem;
    text-align: center;
    white-space: nowrap;
}

.search-input-group > .search-address {
    height: 42px;
    min-height: 42px;
}

.search-input-group > .search-address .form-control {
    height: 100%;
}

/* Filters tabs ??? moved from the panel into the search bar */
.search-filters-tabs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    height: 42px;
    min-width: 0;
}

.filters-tab-wrap {
    position: relative;
    display: inline-flex;
}

.filters-action-toast {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    max-width: min(340px, calc(100vw - 2rem));
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.35;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 3000;
}

.filters-action-toast::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 22px;
    border: 7px solid transparent;
    border-bottom-color: #111827;
}

.filters-action-toast.active {
    opacity: 1;
    transform: translateY(0);
}

.filters-tab--notify {
    animation: filtersTabPulse 1.3s ease 2;
}

@keyframes filtersTabPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.35); }
}

.filters-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 42px;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.filters-tab:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.45);
}

.filters-tab.active,
.filters-tab.active:hover {
    background: #fff;
    border-color: #fff;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.filters-tab:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.96);
    color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
    outline: none;
}

.filters-tab.active:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--text);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.filters-tab-icon {
    font-size: 1rem;
    line-height: 1;
}

.filters-tab-caret {
    font-size: 0.65rem;
    line-height: 1;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.filters-tab.active .filters-tab-caret {
    transform: rotate(180deg);
}

/* Sort dropdown in search bar ??? joined with the direction arrow */
.sort-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.btn-sort-top {
    min-width: 0;
    max-width: 9rem;
    padding: 0.5rem 0.65rem;
    border-radius: 50px 0 0 50px;
    border-right: 0;
}

#sortToggleLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sort-caret {
    font-size: 0.7rem;
    line-height: 1;
    opacity: 0.8;
    margin-left: 0.15rem;
}

.sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    /* Same glass tokens as .filters-panel so the dropdown reads as part of
       the same UI family instead of a floating white card. */
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 0.4rem;
    z-index: 1040;
    display: none;
}

.sort-dropdown.active {
    display: block;
}

.sort-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease;
}

.sort-option:hover {
    background: rgba(79, 70, 229, 0.08);
}

.sort-option.active {
    background: rgba(79, 70, 229, 0.14);
    color: #4f46e5;
    font-weight: 600;
}

/* Sort direction button ??? right half of the joined sort pill */
.btn-sort-dir {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    padding: 0.35rem 0.45rem;
    border-radius: 0 50px 50px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    margin-left: 0;
    line-height: 1;
    justify-content: center;
}

.sort-dir-icon {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    transition: transform 0.2s ease;
}

.btn-sort-dir.sort-desc .sort-dir-icon {
    transform: rotate(180deg);
}

.btn-sort-dir.active {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.96);
    border-left-color: rgba(255, 255, 255, 0.22);
    color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.btn-sort-dir.sort-desc {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    border-left-color: rgba(255, 255, 255, 0.22);
    color: white;
    box-shadow: none;
}

/* Visual separator between filters and sort ??? spans the headers too */
.search-bar-divider {
    width: 1px;
    height: auto;
    background: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    align-self: stretch;
}

/* Preview sample has no address field ??? centre the whole control group. */
.search-input-group--no-address {
    justify-content: center;
}

@media (max-width: 768px) {
    .search-input-group {
        flex-wrap: wrap;
        justify-content: center;
        column-gap: 0.4rem;
    }
    .search-input-group > .search-address {
        flex: 1 1 100%;
    }
    .search-sort-group {
        flex: 0 0 auto;
    }
}

/* Shrink gradually once the full-size controls stop fitting (???500 px). */
@media (max-width: 500px) {
    .search-group-label {
        font-size: 0.6rem;
        letter-spacing: 0.48em;
        padding: 0 0.55rem;
    }
    .filters-tab {
        font-size: clamp(0.72rem, 0.45rem + 1.1vw, 0.85rem);
        padding: 0.5rem 0.3rem;
        gap: 0.2rem;
    }
    .filters-tab-icon {
        font-size: 0.85rem;
    }
    .btn-sort-top {
        font-size: clamp(0.72rem, 0.45rem + 1.1vw, 0.85rem);
        padding: 0.5rem clamp(0.45rem, 0.35rem + 0.3vw, 0.65rem);
    }
    .btn-sort-dir {
        --sort-dir-size: clamp(34px, 28px + 1.5vw, 40px);
        flex: 0 0 var(--sort-dir-size);
        width: var(--sort-dir-size);
        min-width: var(--sort-dir-size);
        padding: 0.35rem clamp(0.25rem, 0.15rem + 0.2vw, 0.45rem);
    }
    .sort-dir-icon {
        width: clamp(1rem, 0.8rem + 0.5vw, 1.15rem);
        height: clamp(1rem, 0.8rem + 0.5vw, 1.15rem);
    }
}

/* Icons only disappear when even the reduced controls no longer fit. */
@media (max-width: 425px) {
    .filters-tab {
        font-size: 0.7rem;
        padding: 0.45rem 0.18rem;
        gap: 0.1rem;
    }
    .filters-tab-icon {
        font-size: 0.8rem;
    }
    .btn-sort-top {
        font-size: 0.68rem;
        padding: 0.5rem 0.35rem;
    }
}

@media (max-width: 365px) {
    .filters-tab-caret {
        display: none;
    }
}

@media (max-width: 340px) {
    .search-group-label {
        font-size: 0.56rem;
        letter-spacing: 0.4em;
        padding: 0 0.45rem;
    }
    .search-bar-divider {
        display: none;
    }
    .sort-caret {
        display: none;
    }
    .btn-sort-top {
        font-size: 0.64rem;
        padding: 0.4rem 0.25rem;
    }
    .btn-sort-dir {
        --sort-dir-size: 30px;
    }
}

/* Last-resort step only on very narrow phones, so the controls stay together. */
@media (max-width: 330px) {
    .filters-tab {
        font-size: 0.68rem;
        padding: 0.4rem 0.15rem;
        gap: 0.05rem;
    }
    .filters-tab-icon {
        font-size: 0.75rem;
    }
    .btn-sort-top {
        font-size: 0.68rem;
        padding: 0.4rem 0.35rem;
    }
}

/* Suggestions dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1060;
    display: none;
    margin-top: 4px;
}

.suggestions-dropdown.active {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    font-size: 0.9rem;
}

.suggestion-item:hover,
.suggestion-item.suggestion-active {
    background: #EEF2FF;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* ????????? Main Content ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.main-content {
    margin-top: var(--search-bar-bottom, 140px);
    /* Match the unified 0.5rem spacing grid before the footer (was 60px). */
    padding-bottom: 0.5rem;
}

/* ????????? Map ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.map-container {
    position: sticky;
    top: var(--search-bar-bottom, 140px);
    /* Fill the viewport down to its bottom edge (no reserve) and never
       collapse below a usable size if the bar measurement misfires. */
    height: calc(100vh - var(--search-bar-bottom, 140px));
    min-height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 1;
}

/* Maximized map: full viewport below the fixed navbar (not below the search
   bar), above the search-bar layer and below the navbar/menu layer. */
.map-container.map-overlay-active {
    position: fixed;
    top: var(--navbar-height, 48px);
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    z-index: 1045;
    border-radius: 0;
    box-shadow: none;
}

body.map-maximized {
    overflow: hidden;
}

.map-container .leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

/* Custom numbered pin markers ????????? SVG teardrop */
.gym-marker {
    transition: transform 0.2s;
    line-height: 1;
}

.gym-marker svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.gym-marker:hover {
    transform: scale(1.2);
    z-index: 999 !important;
}

/* Fix #27b: Highlighted marker ????????? smooth CSS class transition */
.gym-marker-highlighted svg .pin-bg {
    fill: #f59e0b;
}

.gym-marker-highlighted svg {
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.search-marker {
    background: transparent !important;
    border: 0 !important;
    width: 30px;
    height: 30px;
}

.search-marker-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--accent-light);
    color: var(--accent-light);
}

.search-marker-badge svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.gc-svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.address-field-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    pointer-events: none;
    z-index: 2;
}

.address-field-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.topic-field-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    pointer-events: none;
    z-index: 2;
}

.topic-field-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
}

.search-address .form-control,
.search-topic .form-control {
    padding-left: 2.65rem;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ????????? Stats Bar ????????? Fix #6: z-index above search bar ????????????????????????????????????????????????????????????????????? */
.stats-bar {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 0.8rem 1rem;
    /* Match the unified 0.5rem spacing grid (was 1rem). */
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238,242,255,0.82));
    border: 1px solid rgba(79, 70, 229, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.06);
    z-index: 10;
}

/* "i" marker row ??? the circle is vertically centered on the first paragraph,
   so it stays aligned when that paragraph wraps to multiple lines. */
.stats-line-row {
    display: flex;
    align-items: center;
    /* closer to the summary text (was 0.5rem) */
    gap: 0.375rem;
}

.stats-line-row .stats-summary-line {
    flex: 1;
    min-width: 0;
}

.stats-info {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    font-style: normal;
    line-height: 1;
    /* optical vertical centering of the lowercase "i" (dot sits high) */
    padding-top: 1px;
}

.stats-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.stats-summary-line {
    color: var(--primary-dark);
    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stats-summary-line.secondary {
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .stats-bar {
        padding: 0.7rem 0.8rem;
    }

    .stats-summary-line {
        font-size: 0.82rem;
    }
}

/* ????????? Results Grid ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    /* Half the previous spacing (1rem) ??? denser card layout (2026-09-18). */
    gap: 0.5rem;
}

/* Unified half-grid spacing (2026-09-18): card gap, map???cards distance and
   page side margin all use the same 0.5rem gutter. --bs-gutter-x is split
   in half per column (padding), so map???cards space = full 0.5rem, page
   edge margin = 0.25rem ??? enough air for rounded corners/shadows without
   wasting space on mobile. */
.map-results-row,
.main-content .container-fluid {
    --bs-gutter-x: 0.5rem;
}

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

/* ????????? Result Card ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 0.6rem 0.67rem;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.05);
    border: 1px solid var(--card-line);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.result-card:hover::before {
    opacity: 1;
}

/* Top section: calendar date/time box + main content */
.card-main {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.card-datebox {
    flex: 0 0 auto;
    width: 84px;
    border: 1px solid var(--card-line);
    border-radius: 12px;
    background: var(--card-soft);
    padding: 5px 6px 6px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    display: flex;
    flex-direction: column;
}

.card-datebox-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.05;
}

.card-dow {
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--text);
}

.card-dm {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.05;
}

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

.card-month {
    font-size: 0.56rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.card-time-big {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary-light);
    text-align: center;
    line-height: 1.15;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.card-dur-min {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    padding-top: 2px;
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-top {
    float: right;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.4rem;
    margin-bottom: 0.1rem;
}

.card-labels {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.5rem;
    margin-top: 0.2rem;
    clear: both;
}

.card-pill {
    border: 1px solid var(--card-line);
    border-radius: 999px;
    padding: 0.12rem 0.6rem;
    font-size: 0.72rem;
    color: var(--text);
    background: var(--card-soft);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
}

.card-category {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
}

.card-intensity {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.7rem;
    line-height: 1;
    white-space: nowrap;
}

/* Intensity squares rendered as rounded bars (colors preserved from data). */
.card-intensity-bars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.card-bar {
    display: inline-block;
    width: 6px;
    height: 16px;
    border-radius: 3px;
}

.card-expand {
    margin-left: 0;
    flex: 0 0 auto;
    color: var(--text-muted);
    display: inline-flex;
}

.card-class-name {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    overflow-wrap: break-word;
}

.card-trainer {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.card-trainer-icon {
    flex: 0 0 auto;
}

/* Location section: gray band, full-bleed to the card edges */
.card-location {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    background: var(--card-soft);
    border-top: 1px solid var(--card-line);
    margin: 0 -0.67rem -0.6rem;
    padding: 0.35rem 0.67rem;
    border-radius: 0 0 14px 14px;
}

.card-location-pin {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.card-rank-pin {
    flex: 0 0 auto;
    line-height: 0;
}

.card-location-text {
    flex: 1;
    min-width: 0;
}

.card-distance {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    line-height: 1.1;
}

.card-distance-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
}

.card-distance-unit {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
}

.card-club {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    overflow-wrap: break-word;
}

.card-address {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow-wrap: break-word;
}

/* Club page link (right side of the location row): new-tab icon over "www" */
.card-site-link {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    color: var(--color-accent-cta);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

.card-site-link:hover {
    color: var(--color-accent-cta-dark);
}

/* ????????? Card Action Menu ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.card-action-menu {
    position: fixed;
    z-index: 1100;
    background: #e4e7f2;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(79, 70, 229, 0.25);
    min-width: 180px;
    max-width: min(280px, calc(100vw - 16px));
    overflow: hidden;
    animation: slideDown 0.15s ease-out;
}

.card-action-close {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.card-action-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-action-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-action-menu-item:hover {
    background: rgba(79, 70, 229, 0.08);
}

.card-action-menu-item:first-child {
    padding-top: 0.7rem;
}

.card-action-menu-item:last-child {
    padding-bottom: 0.7rem;
}

.card-action-ext {
    margin-left: auto;
    flex: 0 0 auto;
    color: var(--primary);
    opacity: 0.85;
}

.card-action-divider {
    height: 1px;
    background: rgba(79, 70, 229, 0.12);
    margin: 0.3rem 0.75rem;
}

.card-action-header {
    padding: 0.35rem 1rem 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    opacity: 0.7;
}

/* ????? Map actions (maximize / close / restore) ???????????????????????????? */
.map-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1001;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
}

.map-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.65rem;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.map-action-btn:hover,
.map-action-btn:focus-visible {
    background: #F3F4F6;
}

.map-action-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.map-action-btn[hidden] {
    display: none !important;
}

.map-action-restore {
    order: -1;
    white-space: normal;
    padding: 0 0.5rem;
}

.map-action-restore span {
    display: block;
    width: 4rem;
    line-height: 1.1;
    text-align: center;
}

.map-action-restore svg {
    flex: 0 0 auto;
}

.map-overlay-close {
    display: none;
    font-size: 1.15rem;
}

.map-overlay-close.map-overlay-visible {
    display: inline-flex;
}

.map-overlay-active .map-action-max {
    display: none;
}

/* ????????? Map Popup Actions ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.popup-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-action-btn {
    display: block;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--primary);
    background: #EEF2FF;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    text-align: left;
    width: 100%;
}

.popup-action-btn:hover {
    background: #E0E7FF;
}

/* ????????? Filters Panel (dropdown from search bar) ???????????????????????????????????????????????????????????????????????????????????? */
.filters-panel {
    --clear-slot: 1.9rem;
    position: fixed;
    top: var(--search-bar-bottom, 140px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1035;
    width: min(420px, calc(100vw - 20px));
    /* 100vh on mobile includes the area behind browser/system UI (Brave bottom
       bar, Android nav buttons) ??? the panel bottom would be hidden. dvh shrinks
       to the actually visible viewport; the 100vh line is a fallback only. */
    max-height: calc(100vh - var(--search-bar-bottom, 140px) - 20px);
    max-height: calc(100dvh - var(--search-bar-bottom, 140px) - 20px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 0 0 var(--radius) var(--radius);
    border: 1px solid var(--glass-border);
    border-top: none;
    box-shadow: var(--shadow);
    transition: opacity 0.2s, transform 0.2s;
    overflow: hidden;
}

.filters-panel.collapsed {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-10px);
    max-height: 0;
}

.filters-body {
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem 0.5rem;
    min-height: 0;
    max-height: inherit;
    position: relative;
}

/* Clear filters inline button attached to the "Wszystkie" tab */
.filter-clear-inline {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    z-index: 2;
}

.filter-clear-inline:hover {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.filters-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.filter-panel-footer {
    display: flex;
    gap: 0.5rem;
    flex: 0 0 auto;
    padding-top: 0.5rem;
    /* Reserve space for device UI (Android nav: square/circle/triangle) so the
       buttons are never covered; no-op where there is no safe area. */
    padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
    margin-right: 0.25rem;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.filter-panel-footer .btn {
    flex: 1 1 0;
    min-height: 38px;
}

.filters-scroll::-webkit-scrollbar {
    width: 4px;
}

.filters-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* ????????? Filter Sections ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-section {
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.25rem 0.35rem;
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.06);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.06);
}

.filter-section:last-of-type {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* "Inne" ??? horizontal line separating it from the filter sections above */
.filter-section-other {
    margin-top: 1.6rem;
    position: relative;
}
.filter-section-other::before {
    content: "";
    position: absolute;
    top: -0.8rem;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(124, 74, 45, 0.45);
    border-radius: 1px;
}

.filter-section-title {
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.35rem;
    padding: 0 0.15rem;
}

/* Detailed-filter section colors ??? same palette as the Popularne tab:
   CO purple ?? KIEDY blue ?? GDZIE green ?? ZA ILE yellow ??
   DLA KOGO red ?? INNE brown. */
.filter-section[data-section] {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-section[data-section="what"] {
    border-color: rgba(124, 58, 237, 0.24);
    background: rgba(124, 58, 237, 0.07);
}
.filter-section[data-section="what"] .filter-section-title { color: #7c3aed; }

.filter-section[data-section="when"] {
    border-color: rgba(37, 99, 235, 0.24);
    background: rgba(59, 130, 246, 0.08);
}
.filter-section[data-section="when"] .filter-section-title { color: #1d4ed8; }

.filter-section[data-section="where"] {
    border-color: rgba(5, 150, 105, 0.26);
    background: rgba(16, 185, 129, 0.07);
}
.filter-section[data-section="where"] .filter-section-title { color: #047857; }

.filter-section[data-section="price"] {
    border-color: rgba(234, 179, 8, 0.34);
    background: rgba(250, 204, 21, 0.1);
}
.filter-section[data-section="price"] .filter-section-title { color: #a16207; }

.filter-section[data-section="whom"] {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(239, 68, 68, 0.07);
}
.filter-section[data-section="whom"] .filter-section-title { color: #b91c1c; }

.filter-section[data-section="other"] {
    border-color: rgba(124, 74, 45, 0.28);
    background: rgba(146, 64, 14, 0.07);
}
.filter-section[data-section="other"] .filter-section-title { color: #7c4a2d; }

/* ????????? Filter Item (icon + control row) ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0 var(--clear-slot, 0.25rem) 0 0.25rem;
    position: relative;
}

.filter-item-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

/* ????????? Intensity Signal-Strength Pills ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.intensity-inline {
    display: flex;
    flex: 1;
    min-width: 0;
}

.intensity-pills {
    display: flex;
    gap: 4px;
    width: 100%;
}

.intensity-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 2px 3px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    flex: 1;
    min-width: 0;
}

.intensity-pill:hover:not(.intensity-disabled) {
    filter: brightness(0.95);
}

.intensity-pill.intensity-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.intensity-pill.intensity-selected {
    border-color: currentColor;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Selected state: stronger tint (analog to gender pills ??? selected/unselected clearly distinct) */
.intensity-pill.intensity-selected[data-level="1"] { background: rgba(76, 175, 80, 0.30); }
.intensity-pill.intensity-selected[data-level="2"] { background: rgba(249, 200, 5, 0.32); }
.intensity-pill.intensity-selected[data-level="3"] { background: rgba(245, 124, 0, 0.30); }
.intensity-pill.intensity-selected[data-level="4"] { background: rgba(198, 40, 40, 0.28); }
.intensity-pill.intensity-selected[data-level="0"] { background: rgba(79, 70, 229, 0.30); }

/* Signal bars icon */
.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.signal-bar {
    width: 6px;
    border-radius: 1px;
    background: #bbb;
    transition: background 0.2s;
}

.signal-bar.bar-1 { height: 3px; }
.signal-bar.bar-2 { height: 7px; }
.signal-bar.bar-3 { height: 10px; }
.signal-bar.bar-4 { height: 14px; }

/* Active bars are black */
.signal-bars.bars-1 .signal-bar.bar-1 { background: #333; }
.signal-bars.bars-2 .signal-bar.bar-1,
.signal-bars.bars-2 .signal-bar.bar-2 { background: #333; }
.signal-bars.bars-3 .signal-bar.bar-1,
.signal-bars.bars-3 .signal-bar.bar-2,
.signal-bars.bars-3 .signal-bar.bar-3 { background: #333; }
.signal-bars.bars-4 .signal-bar.bar-1,
.signal-bars.bars-4 .signal-bar.bar-2,
.signal-bars.bars-4 .signal-bar.bar-3,
.signal-bars.bars-4 .signal-bar.bar-4 { background: #333; }

/* Unknown intensity ????????? question mark over bars */
.signal-bars.bars-0 {
    position: relative;
}
.signal-bars.bars-0 .signal-bar { background: #ccc; }
.signal-bars.bars-0 .signal-question {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 700;
    color: inherit;
    line-height: 1;
}

/* Intensity pill label */
.intensity-pill-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.intensity-pill.intensity-selected .intensity-pill-label {
    color: currentColor;
    font-weight: 600;
}

/* Intensity color variants ????????? subtle background tint */
.intensity-pill[data-level="1"] { color: #4caf50; background: rgba(76, 175, 80, 0.12); }
.intensity-pill[data-level="2"] { color: #f9c805; background: rgba(249, 200, 5, 0.15); }
.intensity-pill[data-level="3"] { color: #f57c00; background: rgba(245, 124, 0, 0.15); }
.intensity-pill[data-level="4"] { color: #c62828; background: rgba(198, 40, 40, 0.14); }
.intensity-pill[data-level="0"] { color: var(--primary); background: rgba(79, 70, 229, 0.12); }

/* ????????? Gender Silhouette Pills ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.gender-inline {
    display: flex;
    flex: 1;
    min-width: 0;
}

.gender-pills {
    display: flex;
    gap: 4px;
    width: 100%;
}

.gender-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 4px 3px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    flex: 1;
    min-width: 0;
}

.gender-pill:hover:not(.gender-disabled) {
    background: rgba(255, 255, 255, 0.6);
}

.gender-pill.gender-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.gender-pill.gender-selected {
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.gender-silhouettes {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 24px;
    position: relative;
}

.gender-silhouettes .gender-svg {
    display: inline-flex;
    align-items: flex-end;
}

.gender-silhouettes .gender-svg svg {
    height: 24px;
    width: auto;
}

.gender-silhouettes .silhouette-active {
    opacity: 1;
    filter: none;
}

.gender-silhouettes .silhouette-inactive {
    opacity: 0.4;
    filter: grayscale(1);
}

.gender-question-overlay {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    pointer-events: none;
}

.gender-pill-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.gender-pill.gender-selected .gender-pill-label {
    color: currentColor;
    font-weight: 600;
}

/* Gender color variants */
.gender-pill[data-gender="K"] { color: #e91e8c; }
.gender-pill[data-gender="M"] { color: #2196F3; }
.gender-pill[data-gender="dowolna"] { color: #7c4dff; }
.gender-pill[data-gender="?"] { color: #999; }

/* ????????? Segmented Control ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.segmented-control {
    display: flex;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.segment-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.segment-btn:last-child {
    border-right: none;
}

.segment-btn:hover {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

.segment-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-right-color: rgba(255, 255, 255, 0.3);
}

.segment-btn.active:hover {
    background: var(--primary-dark);
}

.segment-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.segment-btn.disabled:hover {
    background: transparent;
    color: var(--text-muted);
}

/* Custom date segment */
.segment-btn-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-right: 0.4rem;
}

.segment-custom-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.segment-custom-clear {
    font-size: 0.65rem;
    opacity: 0.7;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity 0.2s;
}

.segment-custom-clear:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.segment-btn.active .segment-custom-clear:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ????????? Date Calendar Popup ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
/* Inline within filter panel ????????? avoids clipping from filters-panel overflow:hidden
   and containing-block issues caused by transform/backdrop-filter on ancestors */
.date-calendar-popup {
    position: relative;
    z-index: 1060;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin: 0.5rem auto 0;
}

/* Ensure the filter-item with date is positioned relatively for popup positioning ref */
.filter-item[data-filter="dates"] {
    position: relative;
    flex-wrap: wrap;
}

/* ????????? Time Filter Inline ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.time-filter-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.time-filter-inline .time-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.time-filter-inline .form-select {
    flex: 1;
    min-width: 0;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.6);
}

.time-filter-inline .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ????????? Distance Slider Inline ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.distance-slider-inline {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    flex: 1;
    min-width: 0;
}

.distance-slider-inline .form-range {
    flex: 1;
    min-width: 60px;
}

.distance-slider-inline .distance-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 3.4rem;
    text-align: right;
}

/* Kilometre ruler under the distance slider */
.distance-filter-item { flex-wrap: nowrap; padding-right: var(--clear-slot, 1.9rem); }
.distance-body { flex: 1 1 auto; min-width: 0; }
.distance-track { flex: 1 1 auto; min-width: 0; position: relative; }
.distance-ticks {
    position: relative;
    height: 17px;
    margin-top: -13px;
    margin-bottom: 12px;
}
.distance-tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.distance-tick-mark { width: 1px; height: 7px; background: var(--text-muted); opacity: 0.7; }
.distance-tick-label { font-size: 0.66rem; line-height: 1; color: var(--text-muted); margin-top: 1.5px; }
/* Darker + thinner slider line */
.distance-slider-inline .form-range::-webkit-slider-runnable-track { background: #b8c0cc; height: 3px; }
.distance-slider-inline .form-range::-moz-range-track { background: #b8c0cc; height: 3px; }
.distance-slider-inline .form-range::-webkit-slider-thumb { margin-top: -7px; }

/* ????????? Filter Groups ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-group {
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    font-size: 0.85rem;
}

.filter-header:hover {
    background: rgba(255, 255, 255, 0.8);
}

.filter-label {
    font-weight: 600;
    color: var(--text);
}

.filter-summary {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.filter-content {
    padding: 0.5rem var(--clear-slot, 0.75rem) 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* ????????? Checkbox list ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.checkbox-list {
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* ????????? Select-all row (above checkbox list) ?????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-select-all-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.filter-select-all-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ????????? Filter search input (Fix #10) ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-search {
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.filter-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ????????? Filter option category label (Fix #28) ????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-category-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
    opacity: 0.7;
}

/* ????????? Filter search bold highlight (Fix #29) ????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-option-text strong,
.filter-category-label strong {
    color: var(--primary);
    font-weight: 700;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 2px;
    padding: 0 1px;
}

/* ????????? Date Calendar ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.date-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    font-size: 0.8rem;
}

.day-header {
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.3rem;
    font-size: 0.7rem;
}

.day-cell {
    padding: 0.4rem;
    border-radius: 4px;
    cursor: default;
    transition: var(--transition);
}

.day-cell.available {
    cursor: pointer;
    background: #EEF2FF;
    color: var(--primary);
    font-weight: 500;
}

.day-cell.available:hover {
    background: #C7D2FE;
}

.day-cell.selected {
    background: var(--primary) !important;
    color: white !important;
    font-weight: 700;
}

.day-cell.disabled {
    color: #D1D5DB;
    background: transparent;
}

/* ????????? Range Slider ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.range-slider {
    padding: 0.5rem 0;
}

.range-slider .form-range {
    width: 100%;
}

/* ????????? Pill buttons ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pill-btn {
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}

.pill-btn:hover {
    background: #EEF2FF;
    border-color: var(--primary-light);
}

.pill-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pill-btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

/* ????????? Age filter ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.age-clear-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.age-clear-btn:hover {
    color: #333;
}

/* Legacy panel tab styles removed ??? tabs now live in the search bar. */
.btn-clear-x { font-size: 0.75rem; margin-right: 0.3rem; }

.filters-tab-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: 0.4rem;
}

/* ????????? Quick filters grid ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.quick-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.15rem 0.25rem 0.5rem;
}

.quick-section {
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.06);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.06);
    padding: 0.4rem 0.35rem 0.45rem;
}
.quick-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.quick-section-header {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    padding: 0 0.15rem;
}
.quick-tile-flag { width: 1.35rem; height: auto; border-radius: 2px; }

.quick-panel-footer {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0.25rem 0;
    border-top: 1px solid var(--glass-border);
}
.quick-panel-footer .btn { flex: 1 1 auto; min-height: 40px; white-space: nowrap; }
.filter-panel-footer { display: flex; gap: 0.5rem; }
.filter-panel-footer .btn { flex: 1 1 auto; white-space: nowrap; }

.quick-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-height: 66px;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: #4F46E5;
    color: #fff;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.quick-tile-head { position: relative; display: flex; align-items: center; gap: 0.4rem; }
.quick-intro {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 0 0 0.15rem;
}
.quick-intro-link {
    border: none;
    background: none;
    padding: 0;
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    display: inline;
    text-align: left;
}
.quick-section-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 0.35rem 0 0;
}
.quick-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.42) 100%);
    pointer-events: none;
}
.quick-tile:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.quick-tile.active { outline: 3px solid #111827; outline-offset: -3px; }
.quick-tile.is-disabled { opacity: 0.4; cursor: default; filter: grayscale(0.6); pointer-events: none; }

.quick-tile-icon { position: relative; font-size: 1.2rem; line-height: 1; margin-bottom: 0; }
.quick-tile-title { position: relative; font-weight: 700; font-size: 0.95rem; line-height: 1.15; }
.quick-tile-sub { position: relative; font-size: 0.7rem; opacity: 0.85; line-height: 1.2; }

/* Per-section color themes ??? the section header, its tint and its tiles share
   one hue, so each section reads as a distinct, cohesive group.
   Palette: CO purple ?? KIEDY blue ?? GDZIE green ?? ZA ILE yellow ??
   DLA KOGO red ?? INNE brown. */
.quick-section[data-section="co"] {
    border-color: rgba(124, 58, 237, 0.24);
    background: rgba(124, 58, 237, 0.07);
}
.quick-section[data-section="co"] .quick-section-header { color: #7c3aed; }
.quick-section[data-section="co"] .quick-tile { background: linear-gradient(135deg, #7c3aed, #5b21b6); }

.quick-section[data-section="kiedy"] {
    border-color: rgba(37, 99, 235, 0.25);
    background: rgba(59, 130, 246, 0.09);
}
.quick-section[data-section="kiedy"] .quick-section-header { color: #1d4ed8; }
.quick-section[data-section="kiedy"] .quick-tile { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

.quick-section[data-section="gdzie"] {
    border-color: rgba(5, 150, 105, 0.28);
    background: rgba(16, 185, 129, 0.08);
}
.quick-section[data-section="gdzie"] .quick-section-header { color: #047857; }
.quick-section[data-section="gdzie"] .quick-tile { background: linear-gradient(135deg, #059669, #047857); }

.quick-section[data-section="za_ile"] {
    border-color: rgba(234, 179, 8, 0.35);
    background: rgba(250, 204, 21, 0.12);
}
.quick-section[data-section="za_ile"] .quick-section-header { color: #a16207; }
.quick-section[data-section="za_ile"] .quick-tile {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #422006;
}
.quick-section[data-section="za_ile"] .quick-tile::before {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12));
}

.quick-section[data-section="dla_kogo"] {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(239, 68, 68, 0.08);
}
.quick-section[data-section="dla_kogo"] .quick-section-header { color: #b91c1c; }
.quick-section[data-section="dla_kogo"] .quick-tile { background: linear-gradient(135deg, #dc2626, #b91c1c); }

.quick-section[data-section="inne"] {
    border-color: rgba(124, 74, 45, 0.3);
    background: rgba(146, 64, 14, 0.08);
}
.quick-section[data-section="inne"] .quick-section-header { color: #7c4a2d; }
.quick-section[data-section="inne"] .quick-tile { background: linear-gradient(135deg, #8b5a2b, #5c3a1e); }

/* Quick replace confirm + applied bar */
.quick-replace-confirm,
.quick-applied-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0.25rem 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.8rem;
}
.quick-replace-confirm { background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.4); }
.quick-applied-bar { background: rgba(79,70,229,0.1); border: 1px solid rgba(79,70,229,0.35); }
.quick-replace-actions,
.quick-applied-actions { display: flex; gap: 0.4rem; }

/* ????????? Filter full-panel mode (pkt 2) ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
/* Maximized view covers the whole panel body (under the Filtry/sort bar). */

.filter-group--panel-cap.is-panel-open > .filter-content,
.filter-content.filter-panel-open {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex !important;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.filter-panel-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}
.filter-panel-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    margin-right: 0.25rem;
}
.filter-panel-close {
    border: none;
    background: rgba(0,0,0,0.06);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.filter-panel-close:hover { background: rgba(0,0,0,0.12); color: #111; }
.filter-panel-head .filter-missing-row { margin-left: auto; }
.filter-panel-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}
.filter-panel-actions .btn { min-height: 34px; }
.filter-panel-open .filter-search-wrap { flex: 0 0 auto; margin: 0.4rem 0; }
.filter-panel-open .checkbox-list { flex: 1 1 auto; max-height: none; min-height: 0; }
.filter-panel-open .filter-actions { display: none; }
/* Multi lists use the shared head for Anuluj/OK; hide the legacy bottom row */
.filter-group[data-type="multi"] .filter-actions { display: none; }
.filter-content .filter-actions { display: none; }
/* The X closes the maximized view only */
.filter-content:not(.filter-panel-open) .filter-panel-close { display: none; }

/* ????????? Filter header caret (pkt 3/3a) ??? pinned to the name line ??????????????????????????????????????? */
.filter-header { position: relative; }
.filter-group > .filter-header::after {
    content: "";
    position: absolute;
    right: 0.55rem;
    top: 1.05rem;
    width: 9px;
    height: 9px;
    border-right: 2.5px solid var(--text-muted);
    border-bottom: 2.5px solid var(--text-muted);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.2s;
}
.filter-group > .filter-header.is-open::after { transform: translateY(-50%) rotate(225deg); }
.filter-group--panel-cap > .filter-header::after {
    content: "";
    width: 16px;
    height: 16px;
    border: none;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21 L21 3'/%3E%3Cpath d='M3 21 L9.5 21 M3 21 L3 14.5'/%3E%3Cpath d='M21 3 L14.5 3 M21 3 L21 9.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.filter-group--panel-cap > .filter-header.is-open::after { transform: translateY(-50%); }
.filter-group-inline > .filter-header::after { content: none; display: none; }
/* Keep the summary clear of the pinned caret */
.filter-header .filter-summary {
    order: 3;
    flex: 1 1 100%;
    margin-top: 0.1rem;
    padding-right: 1.4rem;
    text-align: left;
}
.filter-header .filter-clear-one { order: 1; margin-left: 0.2rem; }

/* ????????? Inline filter groups (Wysi??ek) ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-group-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    padding: 0.3rem 0.4rem;
    overflow: visible;
}
.filter-group-inline > .filter-header {
    cursor: default;
    flex: 0 0 auto;
    width: auto;
    padding: 0.2rem 0.3rem;
    background: transparent;
    justify-content: flex-start;
}
.filter-group-inline > .filter-header .filter-summary { display: none; }
.filter-group-inline > .filter-header:hover { background: transparent; }
.filter-group-inline > .filter-header::after { content: none; display: none; }
.filter-content-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    flex: 1 1 auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
}
.filter-content-inline .filter-missing-row { margin: 0; }

/* Intensity labels should be dark, not muted */
.intensity-pill .intensity-pill-label,
.intensity-pill { color: #111827; }

/* Age row: input + unit on the left, missing toggle on the right */
.age-filter-item { padding: 0.15rem 0.1rem; }
.age-inline { flex: 1 1 100%; }
.age-row { display: flex; align-items: center; gap: 0.5rem; }
.age-row .filter-missing-row { margin: 0 0 0 auto; }
/* Align the age row's left edge with the other filter controls (pills/cards):
   default inline insets are 0.4rem + 0.3rem, a .filter-item uses 0.25rem. */
.filter-group-inline[data-filter="age"] { padding-left: 0.25rem; }
.filter-group-inline[data-filter="age"] > .filter-header { padding-left: 0; }
/* Halve the number-input ??? "lat" gap (column-gap is 0.6rem) to free room
   for the "Poka?? nieokre??lone" toggle. */
.filter-group-inline[data-filter="age"] .age-unit { margin-left: -0.3rem; }
/* Intensity: pills inline with the label, missing toggle pushed right */
.filter-group-inline > .filter-missing-row { margin: 0 0 0 auto; }

/* ????????? Side-by-side filter pair (Sie?? | Klub, Inne) ??????????????????????????????????????????????????????????????????????????? */
.filter-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    position: relative;
}
.filter-pair .filter-header { flex-wrap: wrap; }
.filter-pair .filter-group:not(.is-open) > .filter-header { background: rgba(255,255,255,0.55); }
.filter-pair .filter-header::after { order: 2; }
.filter-pair .filter-summary {
    order: 3;
    flex: 0 0 100%;
    max-width: none;
    text-align: left;
    margin-top: 0.1rem;
}
/* Headers stay side by side; only the open filter's CONTENT moves to a full
   row below and pushes the content beneath it. */
.filter-group.is-open > .filter-header { background: #E0E7FF; border-radius: var(--radius-sm); }
.filter-pair > .filter-content.filter-pair-content {
    grid-column: 1 / -1;
    margin: 0 0 0.5rem;
}

/* ????????? Unified missing-data checkbox row ???????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-missing-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.filter-missing-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}
.filter-missing-row.is-disabled { opacity: 0.4; cursor: default; }
.filter-missing-row.is-disabled input { cursor: default; }
.filter-missing-row-inline { margin: 0 0 0 auto; }
.filter-missing-row-end { justify-content: flex-end; }
.filter-list-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.25rem;
}
.filter-list-head .filter-select-all-row { border-bottom: none; margin-bottom: 0; }
.filter-list-head .filter-missing-row { margin: 0 0 0 auto; }

/* ????????? Filter search clear button (pkt 2a) ?????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-search-wrap { position: relative; margin-bottom: 0.5rem; }
.filter-search-wrap .filter-search { margin-bottom: 0; padding-right: 1.9rem; }
.filter-search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0,0,0,0.08);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    line-height: 1;
    font-size: 0.7rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.filter-search-wrap.has-value .filter-search-clear { display: inline-flex; }

/* Search autocomplete dropdown */
.filter-search-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 50;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-height: 220px;
    overflow-y: auto;
    padding: 0.25rem;
}
.filter-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text);
}
.filter-suggest-item:hover { background: #EEF2FF; }
.filter-suggest-item.is-active { background: #E0E7FF; }
.filter-suggest-item.is-absent { color: var(--text-muted); }
.filter-suggest-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b45309;
    background: rgba(245,158,11,0.15);
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    white-space: nowrap;
}
.filter-suggest-note { margin-top: 0.35rem; font-size: 0.75rem; color: #b45309; }
.filter-search-wrap { z-index: 5; }

/* Autocomplete grouped sections + descriptions */
.filter-suggest-group {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.3rem 0.5rem 0.15rem;
}
.filter-suggest-desc { font-size: 0.68rem; color: var(--text-muted); }
.filter-suggest-main { display: flex; align-items: baseline; gap: 0.25rem; min-width: 0; }
.filter-suggest-item.is-absent { opacity: 0.55; cursor: not-allowed; }
.filter-suggest-item.is-absent:hover { background: transparent; }

/* Remove focus rings inside the filters panel */
.filters-panel *:focus,
.filters-panel *:focus-visible,
.filter-header:focus,
.filter-header:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Per-filter clear (appears on the header when the filter is active) */
.filter-clear-one {
    margin-left: 0.35rem;
    border: none;
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    order: 1;
}
.filter-header.has-active-filter .filter-clear-one { display: inline-flex; }
.filter-item.has-active-filter > .filter-clear-one { display: inline-flex; }
.filter-group-inline.has-active-filter > .filter-clear-one { display: inline-flex; }
.filter-clear-one:hover { background: #dc3545; color: #fff; }
/* Clear ??? always sits immediately right of the filter name */
.filter-header .filter-label { order: 0; }
.filter-header .filter-clear-one { order: 1; }
.filter-header .filter-summary { order: 2; }
.filter-group > .filter-header::after { order: 3; }
/* Clear ???: for lists it sits immediately right of the name; for items and
   inline groups it sits centred in the reserved right slot. */
.filter-header .filter-clear-one { order: 1; }
.filter-item > .filter-clear-one,
.filter-group-inline > .filter-clear-one {
    position: absolute;
    right: calc(var(--clear-slot, 1.9rem) / 2);
    transform: translate(50%, -50%);
}
.filter-item > .filter-clear-one { top: 50%; }
.filter-group-inline > .filter-clear-one { top: 1.6rem; }
.filter-group-inline[data-filter="age"] > .filter-clear-one { top: 50%; }
.filter-group-inline { position: relative; padding-right: var(--clear-slot, 1.9rem); }
.filter-group-inline[data-filter="age"] { flex-wrap: nowrap; }
.filter-group-inline[data-filter="age"] .filter-content-inline { flex-wrap: nowrap; }
.filter-group-inline[data-filter="age"] .filter-missing-row { margin-left: auto; }
/* Gender: pills + "braki danych" in one row, right aligned */
.gender-filter-item { flex-direction: row; align-items: center; }
.gender-inline { flex: 1 1 auto; min-width: 0; }
/* Age input: centre the number */
#ageInput { text-align: center; }
/* Hide native number spinner so it does not overlap the centred digit */
#ageInput::-webkit-outer-spin-button,
#ageInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#ageInput {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Global tooltip (hover/focus or long-press on touch) */
.gc-tooltip {
    position: absolute;
    z-index: 2200;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    background: #111827;
    color: #fff;
    font-size: 0.78rem;
    line-height: 1.35;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
}
.gc-tooltip-text { flex: 1 1 auto; }
.gc-tooltip-close {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.65rem;
    line-height: 1;
    cursor: pointer;
}

/* "No filters yet" coachmark ??? persistent, dismissible, points at the
   (fixed) Filtry button in the search bar. */
.gc-tooltip--coach {
    position: fixed;
    z-index: 2300;
    max-width: 340px;
}
.gc-tooltip--coach .gc-tooltip-text { white-space: pre-line; }
.gc-tooltip--coach::before {
    content: "";
    position: absolute;
    top: -6px;
    left: var(--coach-arrow, 20px);
    width: 12px;
    height: 12px;
    background: #111827;
    transform: rotate(45deg);
}

/* Info (i) buttons ??? all devices, in the reserved right slot */
.filter-info-btn {
    display: inline-flex;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 0.63rem;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    /* optical vertical centering of the lowercase "i" (dot sits high) */
    padding-top: 1px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    /* closer to the filter name (was 0.3rem) */
    margin-left: 0.16rem;
}
.has-active-filter .filter-info-btn { display: none; }
.filter-item > .filter-info-btn,
.filter-group-inline > .filter-info-btn {
    position: absolute;
    right: calc(var(--clear-slot, 1.9rem) / 2);
    transform: translate(50%, -50%);
    margin-left: 0;
}
.filter-item > .filter-info-btn { top: 50%; }
.filter-group-inline > .filter-info-btn { top: 1.6rem; }
.filter-group-inline[data-filter="age"] > .filter-info-btn { top: 50%; }

/* Card / free sub-filters: own clear + info in the reserved slot */
.filter-subhead { position: relative; padding-right: var(--clear-slot, 1.9rem); }
.filter-subhead .filter-clear-one,
.filter-subhead .filter-info-btn {
    position: absolute;
    right: calc(var(--clear-slot, 1.9rem) / -2);
    top: 50%;
    transform: translate(50%, -50%);
    margin-left: 0;
}
.filter-subhead.has-active-filter .filter-clear-one { display: inline-flex; }
.filter-subhead .filter-info-btn { display: inline-flex; }
.filter-subhead.has-active-filter .filter-info-btn { display: none; }

/* Loading feedback */
.filters-loading {
    color: var(--primary);
}

#filtersLoading {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 5;
    margin: 0;
}
body.is-loading::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2100;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: gcprogress 1s linear infinite;
    pointer-events: none;
}
@keyframes gcprogress {
    from { background-position: -40% 0; }
    to { background-position: 140% 0; }
}

/* ????????? Filter highlight flash (quick-filter education) ?????????????????????????????????????????????????????????????????? */
.filter-highlight { animation: filterHighlight 1.8s ease-in-out 10; }
@keyframes filterHighlight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0); }
    50% { box-shadow: 0 0 0 6px rgba(79,70,229,0.65); }
}

/* Education bubble pointing at the filter set by a quick filter */
.filter-edu-bubble {
    position: absolute;
    z-index: 60;
    max-width: 250px;
    background: #111827;
    color: #fff;
    font-size: 0.78rem;
    line-height: 1.3;
    padding: 0.55rem 1.6rem 0.55rem 0.65rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    animation: eduBubbleIn 0.18s ease-out;
}
.filter-edu-bubble::before {
    content: "";
    position: absolute;
    top: -6px;
    left: var(--edu-arrow, 18px);
    width: 12px;
    height: 12px;
    background: #111827;
    transform: rotate(45deg);
}
.filter-edu-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
}
.filter-edu-bubble.is-above { transform: translateY(-100%); }
.filter-edu-bubble.is-above::before {
    top: auto;
    bottom: -6px;
}

@keyframes eduBubbleIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* "Wyczy???? filtry" ??? red OUTLINE by default; only blinks on click */
.filter-panel-footer .btn:focus,
.filter-panel-footer .btn:focus-visible,
.filter-panel-footer .btn:active {
    outline: none;
    box-shadow: none;
}
/* No focus ring on filter selects / headers */
.filters-panel .form-select:focus,
.filters-panel .form-control:focus,
.filter-header:focus,
.filter-header:focus-visible {
    outline: none;
    box-shadow: none;
}
.filter-panel-footer #clearAllFilters,
.quick-panel-footer .js-clear-filters {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}
@media (hover: hover) {
    .filter-panel-footer #clearAllFilters:hover,
    .quick-panel-footer .js-clear-filters:hover { background: #dc3545; color: #fff; }
}
.filter-panel-footer #clearAllFilters.is-flash,
.quick-panel-footer .js-clear-filters.is-flash {
    background: #dc3545 !important;
    color: #fff !important;
}

/* Close filters ??? brand green from the ".pl" in the navbar */
.quick-panel-footer .js-close-filters,
.filter-panel-footer .js-close-filters {
    background: var(--accent-light);
    border: 1px solid var(--accent-light);
    color: #043b2a;
    font-weight: 700;
}
@media (hover: hover) {
    .quick-panel-footer .js-close-filters:hover,
    .filter-panel-footer .js-close-filters:hover {
        background: var(--accent);
        border-color: var(--accent);
        color: #03251b;
    }
}
.quick-panel-footer .js-close-filters:focus-visible,
.filter-panel-footer .js-close-filters:focus-visible {
    outline: 3px solid rgba(52, 211, 153, 0.55) !important;
    outline-offset: 2px;
}

/* ????????? Collapsible "Inne" section (pkt 8) ????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.filter-section-title { display: flex; align-items: center; gap: 0.25rem; }
.filter-section[data-section-wrap] .filter-section-title { cursor: pointer; }
.filter-section-title .filter-section-summary {
    display: none;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
    margin-left: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.filter-section-title .filter-section-caret {
    margin-left: auto;
    width: 9px;
    height: 9px;
    border-right: 2.5px solid var(--primary);
    border-bottom: 2.5px solid var(--primary);
    transform: rotate(45deg);
    transition: transform 0.2s;
    flex: 0 0 auto;
    margin-right: 5px;
    margin-bottom: 3px;
    font-size: 0;
    color: transparent;
}
.filter-section.is-collapsed .filter-section-summary { display: inline; }
.filter-section.is-collapsed .filter-section-body { display: none; }
.filter-section.is-collapsed .filter-section-caret { transform: rotate(45deg); }
.filter-section:not(.is-collapsed) .filter-section-caret { transform: rotate(225deg); }

/* Duration range row */
.duration-filter-inline { flex-wrap: wrap; }

/* ????????? Footer ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.footer {
    background: rgba(17, 24, 39, 0.9);
    color: white;
    padding: 1rem;
    font-size: 0.85rem;
}

.footer a {
    color: white;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary-light);
}

/* ????????? Responsive ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
/* Below lg (992px) the map stacks above the results and takes the full width
   ??? same behavior as mobile (otherwise a half-width map leaves a dead zone
   next to it while cards scroll under it). */
@media (max-width: 1001.98px) {
    .filters-panel {
        width: calc(100% - 10px);
        top: var(--search-bar-bottom, 140px);
    }

    .filters-scroll {
        max-height: none;
    }

    .main-content {
        margin-top: var(--search-bar-bottom, 140px);
    }

    .map-container {
        /* Explicit height instead of aspect-ratio: with aspect-ratio + max-height
           the browser transfers the height cap onto the WIDTH, shrinking the map
           into a square with a dead zone next to it. Width must always fill. */
        height: var(--mobile-map-height, 50vh);
        min-height: 140px;
        position: sticky;
        top: var(--search-bar-bottom, 140px);
        z-index: 10;
    }

    .stats-bar {
        flex-direction: column;
        gap: 0.5rem;
        /* Same 0.5rem air between the map and the stats bar on mobile
           (the map has no bottom margin of its own). */
        margin-top: 0.5rem;
    }
}

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   Legal pages (markdown-rendered)
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

.legal-content {
    max-width: 860px;
    margin: 0 auto;
    /* Legal pages have no search bar ????????? offset only the fixed navbar (48px). */
    padding: calc(48px + 28px) 1rem 48px;
    min-height: calc(100vh - 220px);
}

.legal-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 2.25rem;
}

.legal-body {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text);
}

.legal-body h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 1.2rem; }
.legal-body h2 { font-size: 1.35rem; font-weight: 700; margin: 1.8rem 0 0.8rem; color: var(--primary-dark); }
.legal-body h3 { font-size: 1.12rem; font-weight: 600; margin: 1.4rem 0 0.6rem; }
.legal-body p  { margin: 0 0 1rem; }
.legal-body ul, .legal-body ol { margin: 0 0 1rem 1.4rem; }
.legal-body li { margin-bottom: 0.35rem; }
.legal-body a  { color: var(--primary); text-decoration: underline; }
.legal-body a:hover { color: var(--primary-dark); }
.legal-body blockquote {
    border-left: 4px solid var(--accent);
    background: rgba(16, 185, 129, 0.08);
    margin: 1rem 0;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.legal-body code {
    background: rgba(17, 24, 39, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}
.legal-body pre {
    background: rgba(17, 24, 39, 0.92);
    color: #e5e7eb;
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}
.legal-body pre code { background: none; padding: 0; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.legal-body th, .legal-body td { border: 1px solid rgba(17,24,39,0.15); padding: 0.5rem 0.75rem; text-align: left; }
.legal-body th { background: rgba(79,70,229,0.08); }

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   Cookie consent banner
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: rgba(17, 24, 39, 0.96);
    backdrop-filter: blur(20px);
    color: #fff;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
    border-top: 3px solid var(--primary);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show state (JS toggles .is-visible). Base rule must NOT set `display`, so the
   `hidden` attribute keeps it off for no-JS / before init. */
.cookie-consent-banner.is-visible {
    display: block;
    transform: translateY(0);
}

.ccb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ccb-graphic { flex-shrink: 0; line-height: 0; }
.ccb-graphic svg { display: block; }

.ccb-text { flex: 1 1 auto; min-width: 0; }
.ccb-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.15rem; }
.ccb-desc { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.78); }
.ccb-desc a { color: var(--primary-light); text-decoration: underline; }

/* Legal links row ??? below the action buttons so the description stays short */
.ccb-legal {
    flex: 1 1 100%;
    font-size: 0.78rem;
    margin-top: 0.15rem;
    color: rgba(255,255,255,0.65);
}
.ccb-legal a { color: var(--primary-light); text-decoration: underline; }

.ccb-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cookie-consent-banner .btn {
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-ccb-accept {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
.btn-ccb-accept:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: #fff;
}

.btn-ccb-necessary {
    background: transparent;
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.9);
}
.btn-ccb-necessary:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-ccb-settings {
    background: transparent;
    border: none;
    color: var(--primary-light);
    text-decoration: underline;
    padding: 0.5rem 0.4rem;
}
.btn-ccb-settings:hover { color: #fff; }

/* Cookie settings modal */
#cookieSettingsModal .modal-content { border-radius: var(--radius); border: none; }
#cookieSettingsModal .modal-header {
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    border-radius: var(--radius) var(--radius) 0 0;
}
#cookieSettingsModal .modal-title { font-weight: 700; }

.cc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(17,24,39,0.08);
}
.cc-row:last-child { border-bottom: none; }
.cc-row-info { display: flex; flex-direction: column; gap: 0.15rem; }
.cc-row-info small { color: var(--text-muted); line-height: 1.4; }
.cc-row-info code { background: rgba(17,24,39,0.08); padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.85em; }
.cc-switch .form-check-input { width: 2.5em; height: 1.4em; cursor: pointer; }
.cc-switch .form-check-input:disabled { opacity: 0.7; }

/* Footer legal link divider */
.footer-divider {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.25);
}

/* ????????? Consent banner responsive ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
@media (max-width: 768px) {
    .ccb-inner {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.5rem 0.75rem;
        padding: 0.75rem 0.85rem;
    }
    /* Girl graphic stays visible on mobile: small, left of the title/text */
    .ccb-graphic { display: block; flex: 0 0 auto; }
    .ccb-graphic img { height: 64px; }
    .ccb-text { flex: 1 1 0; min-width: 0; }
    .ccb-title { font-size: 1rem; }
    .ccb-actions {
        flex: 1 1 100%;
        justify-content: stretch;
    }
    .ccb-actions .btn { flex: 1 1 0; padding: 0.5rem 0.4rem; font-size: 0.8rem; }
    .ccb-legal { flex: 1 1 100%; text-align: center; }
}

/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   Auth / account pages (login, signup, /konto/, feedback)
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

.auth-page,
.account-page {
    max-width: 520px;
    margin: 0 auto;
    /* No search bar ????????? offset only the fixed navbar (48px), like legal pages */
    padding: calc(48px + 28px) 1rem 48px;
}

.account-page { max-width: 640px; }

.auth-card,
.account-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 2.25rem;
}

.auth-title,
.account-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.auth-form label,
.account-form label,
.account-field label,
.feedback-field label,
.feedback-aspect label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.account-form select,
.account-field input,
.feedback-field input,
.feedback-field textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.95rem;
    transition: var(--transition);
}

.auth-form input:focus,
.account-form select:focus,
.account-field input:focus,
.feedback-field input:focus,
.feedback-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.auth-form .btn-primary,
.account-card .btn-primary {
    background: var(--primary);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
}

.auth-form .btn-primary:hover,
.account-card .btn-primary:hover {
    background: var(--primary-dark);
}

.auth-form .form-check {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.auth-form .form-check-label {
    font-weight: 400;
    font-size: 0.9rem;
}

.auth-links {
    margin-top: 0.9rem;
    text-align: center;
}

.auth-links a {
    color: var(--primary);
    font-size: 0.88rem;
    text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

.auth-alt {
    margin-top: 0.6rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-alt a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* /konto/ ????????? rows and sections */
.account-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(17, 24, 39, 0.1);
    font-size: 0.95rem;
}

.account-label { color: var(--text-muted); }
.account-value { font-weight: 600; word-break: break-all; }
.account-form { margin-top: 1.25rem; }
.account-field { margin-bottom: 0.9rem; }
.account-field small { display: block; margin-top: 0.25rem; }

.account-feedback {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.account-danger {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

/* Mniej rzucaj??ca si?? w oczy sekcja usuni??cia konta (rozwijana) */
.account-danger-summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    list-style: none;
}
.account-danger-summary::-webkit-details-marker { display: none; }
.account-danger-summary::before { content: "??? "; }
.account-danger[open] .account-danger-summary::before { content: "??? "; }
.account-danger p { font-size: 0.85rem; margin: 0.6rem 0; }

/* Dymek ???i" (tooltip przez title) */
.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05em;
    height: 1.05em;
    border-radius: 50%;
    background: var(--text-muted);
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    font-style: normal;
    cursor: help;
    vertical-align: middle;
}

/* Zak??adki feedbacku (??wicz??cy / Organizator) */
.feedback-tabs {
    display: flex;
    gap: 0.4rem;
    margin: 1rem 0 1.25rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}
.feedback-tab {
    background: none;
    border: none;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.feedback-tab:hover { color: var(--text); }
.feedback-tab.active { color: var(--color-accent-cta); border-bottom-color: var(--color-accent-cta); }

.account-danger .btn-danger {
    background: var(--danger);
    border: none;
    font-weight: 600;
    color: #fff;
}

/* Feedback ????????? sliders and textareas */
.feedback-aspect { margin-bottom: 1.25rem; max-width: 420px; }
.feedback-aspect input[type="range"] { width: 100%; accent-color: var(--primary); }
.feedback-field { margin-bottom: 1rem; }

.range-ticks {
    position: relative;
    height: 1.15rem;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}
/* Tick centers aligned to thumb centers (thumb 16px, usable track = 100% - 16px) */
.range-ticks span {
    position: absolute;
    left: calc(8px + (100% - 16px) * var(--v) / 5);
    transform: translateX(-50%);
    white-space: nowrap;
    cursor: pointer;
}
.range-ticks span:hover { color: var(--primary); font-weight: 600; }
.range-value { font-weight: 700; color: var(--primary); font-size: 0.85rem; }

/* Global messages ????????? floating toast above everything, never pushes content */
.messages-container {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    max-width: min(720px, calc(100% - 2rem));
    z-index: 1060; /* above navbar (1050) and search bar */
    pointer-events: none;
}
.messages-container .alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 0.4rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    pointer-events: auto;
}
.messages-container .btn-close { flex-shrink: 0; padding: 0.25rem; font-size: 0.75rem; }

/* Cookie banner graphic (raster image) */
.ccb-graphic img { display: block; height: 90px; width: auto; }

/* Navbar account pills */
.nav-social { display: inline-flex; align-items: center; }
.btn-account {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.18rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.6;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    text-decoration: none;
    transition: var(--transition);
}
.btn-account:hover, .btn-account:focus { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* ????????? Navbar dropdown lists (Konto + language switcher) ??????????????????????????????????????????????????????????????????
   Both lists share the same markup (.dropdown-menu) ??? style them once so they
   always match, using the glass tokens as the sort dropdown (2026-09-18). */
.navbar .dropdown-menu {
    --bs-dropdown-border-color: var(--glass-border);
    --bs-dropdown-border-radius: 14px;
    --bs-dropdown-link-active-bg: var(--primary);
    --bs-dropdown-link-hover-bg: rgba(79, 70, 229, 0.08);
    --bs-dropdown-link-hover-color: #1e1b4b;
    background: rgba(255, 255, 255, 0.90);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.navbar .dropdown-item {
    border-radius: 10px;
    margin: 0.25rem 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.navbar .dropdown-divider {
    margin: 0.25rem 0.4rem;
    opacity: 0.15;
}

/* Orange login CTA in the navbar for anonymous visitors (V2.2) */
.btn-account-cta {
    background: var(--color-accent-cta);
    border-color: var(--color-accent-cta);
}
.btn-account-cta:hover, .btn-account-cta:focus {
    background: var(--color-accent-cta-dark);
    border-color: var(--color-accent-cta-dark);
    color: #fff;
}

/* Sample popup (preview circle edge) ??? compact.
   Leaflet sets the content node width to the maxWidth option (in px, fixed),
   so maxWidth here = desired text width + side insets (margin 16 + padding 6). */
.preview-popup {
    min-width: 150px;
    max-width: 178px;
}
/* Tight side margins so short words ("te??") don't wrap onto their own line.
   NOTE: Leaflet applies the popup className to the outer .leaflet-popup
   container, NOT to .leaflet-popup-content-wrapper. */
.leaflet-popup.sample-popup .leaflet-popup-content {
    margin: 7px 8px;
    padding-right: 6px; /* keep the first line clear of the close button */
    line-height: 1.35;
}
.sample-popup .leaflet-popup-close-button {
    top: 2px;
    right: 2px;
    width: 16px;
    height: 14px;
    padding: 2px 2px 0 0;
    font: 14px/12px Tahoma, Verdana, sans-serif;
}
.sample-popup .leaflet-popup-content-wrapper {
    border-radius: 10px;
}
.preview-popup-text {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    line-height: 1.35;
}
/* Keep the short trailing sentence ("...te??") on a single line */
.preview-popup-nowrap { white-space: nowrap; }

/* Orange CTA pill inside Leaflet popups ????????? consistent with .btn-cta */
.leaflet-popup-content .popup-cta {
    display: inline-block;
    background: var(--color-accent-cta);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    border: 2px solid var(--color-accent-cta);
    margin-top: 0.45rem;
    text-decoration: none;
    transition: var(--transition);
}
.leaflet-popup-content .popup-cta:hover, .leaflet-popup-content .popup-cta:focus {
    background: var(--color-accent-cta-dark);
    border-color: var(--color-accent-cta-dark);
    color: #fff;
    text-decoration: none;
}

/* ????????? Anonymous preview landing (V2.2) ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
:root {
    --color-accent-cta: #F7630C;
    --color-accent-cta-dark: #D9550A;
}

/* Anonymous preview landing (V2.2) ????????? separate static page below the navbar */
.preview-landing {
    position: relative;
    padding: calc(var(--search-bar-bottom, 150px) + 1.5rem) 1rem 3rem;
    text-align: center;
    min-height: 60vh;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.06) 0%, rgba(240, 242, 245, 0) 100%);
    overflow: hidden;
}


/* Watermark on the sample map ????????? layer inside a custom Leaflet pane (z 350):
   above the tile pane (200), below the circle overlay (400) and pins (600).
   The wrapper is positioned by JS in layer-point coordinates (L.DomUtil);
   a radial CSS mask hides it inside the sample circle. */
.map-watermark-wrap {
    position: absolute;
    overflow: hidden;
}

.map-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-24deg);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.6;
    color: rgba(31, 41, 55, 0.22);
    /* tiled 2-line phrases separated by 2 empty lines (built in JS) */
    white-space: pre;
    text-align: center;
    user-select: none;
}

.preview-landing .container {
    position: relative;
    z-index: 1;
}

.preview-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "head"
        "lead"
        "media"
        "cta"
        "note";
    gap: 0.35rem;
    max-width: 1100px;
    margin: 0 auto;
}

.preview-hero-head { grid-area: head; }
.preview-hero-lead { grid-area: lead; }
.preview-hero-media { grid-area: media; }
.preview-hero-cta { grid-area: cta; }
.preview-expl { grid-area: note; }

.preview-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #FFF3E8;
    border: 1px solid #FFD9B8;
    color: #B4530A;
    font-size: 0.82rem;
    font-weight: 700;
}

.preview-hero-title {
    font-size: clamp(3rem, calc(4.5vw + 1.5rem), 5.1rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 0.85rem;
}

.preview-hero-title-accent {
    color: var(--color-accent-cta);
}

.preview-hero-subtitle {
    font-size: clamp(1.05rem, calc(1vw + 0.6rem), 1.4rem);
    font-weight: 700;
    color: var(--text);
    max-width: none;
    text-align: left;
    margin: 0 0 0.25rem;
}

.preview-hero-lead {
    max-width: 680px;
    margin: 0 0 1.15rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

.preview-hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.3rem;
}

.preview-hero-cta-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--color-accent-cta);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    border: 2px solid var(--color-accent-cta);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(247, 99, 12, 0.3);
}
.btn-cta:hover, .btn-cta:focus {
    background: var(--color-accent-cta-dark);
    border-color: var(--color-accent-cta-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(247, 99, 12, 0.4);
}

@keyframes ctaGlowRipple {
    0% {
        box-shadow: 0 0 0 0 rgba(247, 99, 12, 0.55);
    }
    100% {
        box-shadow: 0 0 0 22px rgba(247, 99, 12, 0);
    }
}

.btn-cta.cta-glow {
    position: relative;
    padding: 0.8rem 2.15rem;
    font-size: 1.33rem;
    box-shadow: 0 0 22px 6px rgba(247, 99, 12, 0.4), 0 10px 30px rgba(247, 99, 12, 0.3);
}

.btn-cta.cta-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(247, 99, 12, 0.55);
    pointer-events: none;
    animation: ctaGlowRipple 1.8s ease-out infinite;
}

#heroStartCta {
    padding: 0.6rem 1.61rem;
}

@media (prefers-reduced-motion: reduce) {
    .btn-cta.cta-glow::after {
        animation: none;
        opacity: 0;
    }
}

.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--color-accent-cta);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    border: 2px solid var(--color-accent-cta);
    text-decoration: none;
    transition: var(--transition);
}
.btn-cta-outline:hover, .btn-cta-outline:focus {
    background: rgba(247, 99, 12, 0.08);
    color: var(--color-accent-cta-dark);
    transform: translateY(-1px);
}

/* Explanation above the city chips on the landing */
.preview-expl {
    max-width: 640px;
    margin: 0 auto 1.1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.preview-expl-line {
    display: block;
}

.preview-expl-or {
    font-weight: 700;
}

.preview-expl-location {
    color: var(--accent-light);
    font-weight: 700;
}

.preview-expl-house {
    width: 0.95em;
    height: 0.95em;
    margin: 0 0.15rem;
    vertical-align: -0.12em;
}

.preview-carousel {
    position: relative;
    width: 100%;
    max-width: 820px;
    margin: 0 auto 1.25rem;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #E5E7EB;
    box-shadow: var(--shadow);
}

.preview-carousel-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.preview-carousel-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.preview-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-carousel-caption {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.96);
    color: #fff;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.preview-carousel-caption span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-carousel-caption::before {
    content: '';
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #fff;
}

@media (max-width: 576px) {
    .preview-carousel { border-radius: 14px; }
    .preview-carousel-caption {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        padding: 0.35rem 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preview-carousel-slide { transition: none; }
}

@media (min-width: 992px) {
    .preview-hero-layout {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        grid-template-areas:
            "head media"
            "lead media"
            "cta media"
            "note media";
        column-gap: 2.5rem;
        row-gap: 0.35rem;
        align-items: start;
        text-align: left;
    }

    .preview-hero-media {
        align-self: center;
        padding: 0.75rem;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(255, 255, 255, 0.85);
        box-shadow: var(--shadow);
    }

    .preview-hero-media .preview-carousel {
        max-width: none;
        margin-bottom: 0;
        box-shadow: none;
    }

    .preview-hero-title {
        word-spacing: -0.1em;
    }

    .preview-hero-subtitle {
        margin-left: 0;
        margin-right: 0;
    }

    .preview-hero-lead {
        max-width: 560px;
        margin-left: 0;
        margin-right: 0;
    }

    .preview-hero-cta {
        justify-content: center;
        flex-wrap: nowrap;
        margin-bottom: 0.6rem;
    }

    .preview-expl {
        max-width: 540px;
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }

    .preview-expl-or {
        text-align: center;
    }
}

/* ─── Landing sections below the hero ─────────────────────────────────── */
.preview-section-narrow {
    max-width: 900px;
}

.preview-intro-section {
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.preview-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #FFF3E8;
    border: 1px solid #FFD9B8;
    color: #B4530A;
    font-size: 0.82rem;
    font-weight: 700;
}

.preview-intro-title {
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.12;
    margin-bottom: 0.9rem;
}

.preview-intro-title-accent {
    color: var(--landing-blue);
}

.preview-intro-lead {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.preview-intro-lead--second {
    margin-top: 0.85rem;
}

.preview-intro-lead-accent {
    color: var(--landing-blue);
    font-weight: 700;
}

.preview-how-section {
    padding: 3rem 0;
    text-align: center;
    background: #EFF4FC;
    border-top: 1px solid #DCE6F7;
    border-bottom: 1px solid #DCE6F7;
}

.preview-how-label {
    margin-bottom: 0.4rem;
    color: var(--landing-blue);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.preview-how-title {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 2rem;
}

.preview-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1080px;
    margin: 0 auto;
}

.preview-step-card {
    padding: 1.5rem 1.25rem;
    border: 1px solid #E3EAF5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    text-align: center;
}

.preview-step-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
    font-size: 1.8rem;
}

.preview-step-icon--location { background: #FCE7F3; }
.preview-step-icon--prefs { background: #EDE9FE; }
.preview-step-icon--go { background: #FFEDD5; }

.preview-step-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.preview-step-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.preview-disciplines-section {
    padding: 3rem 0;
    text-align: center;
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

.preview-disciplines-label {
    margin-bottom: 0.4rem;
    color: var(--landing-blue);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.preview-disciplines-title {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
}

.preview-disciplines-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.preview-disciplines-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid #FFD9B8;
    border-radius: 999px;
    background: #FFF3E8;
    color: #B4530A;
    font-size: 0.85rem;
    font-weight: 600;
}

.preview-disciplines-stat strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.preview-disciplines-card {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.75rem;
    border: 1px solid #E3EAF5;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.preview-disciplines-viewport {
    display: grid;
    transition: height 0.4s ease;
}

.preview-discipline-slide {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease;
}

.preview-discipline-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.preview-discipline-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-content: start;
    gap: 1.25rem 1.5rem;
    width: 100%;
    text-align: left;
}

.preview-discipline-group-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.preview-discipline-group-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.preview-discipline-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #EAF2FF;
    color: #3730A3;
    font-size: 0.7rem;
    font-weight: 800;
}

.preview-discipline-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.preview-discipline-chip {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border: 1px solid #E1E8F4;
    border-radius: 999px;
    background: #F3F6FC;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.preview-discipline-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
}

.preview-discipline-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #CBD5E1;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.preview-discipline-dot.is-active {
    width: 24px;
    border-radius: 999px;
    background: var(--color-accent-cta);
}

.preview-map-section {
    padding: 2rem 0 2.5rem;
    text-align: center;
}

.preview-map-title {
    margin-bottom: 1.25rem;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.preview-map-card {
    width: min(100%, 440px);
    margin: 0 auto;
    padding: 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.preview-map-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.preview-map-caption {
    margin: 1rem auto 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 600;
}

.preview-testimonials-section {
    padding: 3rem 0;
    text-align: center;
}

.preview-testimonials-title {
    margin-bottom: 1.75rem;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.preview-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1080px;
    margin: 0 auto;
}

.preview-testimonial-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    text-align: left;
}

.preview-testimonial-quote {
    margin: 0;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.6;
}

.preview-testimonial-quote::before {
    content: '“';
    margin-right: 0.12rem;
    color: var(--color-accent-cta);
    font-weight: 800;
}

.preview-testimonial-person {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: auto;
}

.preview-testimonial-name {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
}

.preview-final-section {
    padding: 1.5rem 0 3.5rem;
}

.preview-final-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    border: 1px solid #FFD9B8;
    border-radius: 24px;
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    text-align: center;
}

.preview-final-title {
    margin-bottom: 0.5rem;
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.preview-final-text {
    max-width: 620px;
    margin: 0 auto 1.25rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .preview-steps-grid,
    .preview-testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .preview-discipline-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .preview-intro-section {
        padding: 1.75rem 0 1.5rem;
    }

    .preview-how-section,
    .preview-disciplines-section,
    .preview-testimonials-section {
        padding: 2.25rem 0;
    }

    .preview-disciplines-card {
        padding: 1rem;
    }

    .preview-discipline-chip {
        padding: 0.3rem 0.6rem;
        font-size: 0.78rem;
    }

    .preview-final-section {
        padding: 1rem 0 2.5rem;
    }

    .preview-final-card {
        padding: 1.75rem 1rem;
    }

    .preview-step-card,
    .preview-testimonial-card {
        padding: 1.25rem 1rem;
    }
}

.preview-hero-cities {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.city-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1.5px solid rgba(79, 70, 229, 0.35);
    background: #fff;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}
.city-chip:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.06);
    transform: translateY(-1px);
}
.city-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.preview-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    /* center BOTH wrapped lines (each flex item's inline content) */
    text-align: center;
    margin: 0 auto 0.6rem;
    max-width: 760px;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    /* solid, readable over the map */
    background: #fff;
    border: 1px solid rgba(247, 99, 12, 0.55);
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.3;
    animation: previewNoticeGlow 2.4s ease-in-out infinite;
}

@keyframes previewNoticeGlow {
    0%, 100% {
        box-shadow:
            0 0 0 3px rgba(247, 99, 12, 0.08),
            0 0 18px rgba(247, 99, 12, 0.18),
            0 4px 14px rgba(0, 0, 0, 0.12);
    }
    50% {
        box-shadow:
            0 0 0 6px rgba(247, 99, 12, 0.2),
            0 0 42px rgba(247, 99, 12, 0.5),
            0 4px 18px rgba(0, 0, 0, 0.16);
    }
}
/* Sample-page variant: full-width notice pinned to the bottom of the cards
   column ??? stays visible above the cards while scrolling */
.preview-notice-page {
    max-width: none;
    margin: 0.5rem 0 0.4rem;
    position: sticky;
    bottom: 0.5rem;
    z-index: 5;
}
/* CTA link in the preview notice: only "Zaloguj si??" is orange+bold,
   the rest of the sentence is plain black */
.preview-notice a {
    color: var(--text);
    font-weight: 400;
    text-decoration: none;
    /* wrap on mobile ??? the long CTA must never push past the viewport */
    white-space: normal;
    overflow-wrap: break-word;
}
.preview-notice a strong {
    color: var(--color-accent-cta);
    font-weight: 700;
}
.preview-notice a:hover { text-decoration: underline; }

/* Sample gate: a large overlay covering the results area (below the search bar)
   so the visitor must consciously dismiss it before the sample becomes usable.
   Fixed so it is visible immediately, without scrolling. */
.preview-gate {
    position: fixed;
    top: var(--search-bar-bottom, 110px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    /* light tint so the results stay readable underneath */
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(1px);
}
.preview-gate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    max-width: 620px;
    width: 100%;
    padding: 2rem 1.75rem;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 2px solid rgba(247, 99, 12, 0.75);
    box-shadow:
        0 0 0 5px rgba(247, 99, 12, 0.1),
        0 0 32px rgba(247, 99, 12, 0.3),
        0 12px 40px rgba(0, 0, 0, 0.22);
    color: var(--text);
}
.preview-gate-icon { font-size: 2.75rem; line-height: 1; }
.preview-gate-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
}
.preview-gate-cta {
    margin-top: 0.25rem;
    color: var(--text);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.45;
    text-decoration: none;
    overflow-wrap: break-word;
}
.preview-gate-cta strong { color: var(--color-accent-cta); font-weight: 700; }
.preview-gate-cta:hover { text-decoration: underline; }
.preview-gate-close {
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    background: #f2f2f2;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}
.preview-gate-close:hover { background: #e6e6e6; }
@media (max-width: 576px) {
    .preview-gate-card { padding: 1.5rem 1.1rem; }
    .preview-gate-title { font-size: 1.3rem; }
}

/* Feedback ????????? "Oce?????" under an unset slider */
.range-error { color: var(--danger); font-weight: 700; font-size: 0.85rem; margin-top: 0.15rem; }

/* Unset slider ????????? hollow thumb + dimmed, distinct from a rated one */
.feedback-aspect input[type="range"].is-unset { opacity: 0.55; }
.feedback-aspect input[type="range"].is-unset::-webkit-slider-thumb { background-color: #fff; border: 2px solid var(--primary); }
.feedback-aspect input[type="range"].is-unset::-moz-range-thumb { background-color: #fff; border: 2px solid var(--primary); }

/* Mobile ????????? hide social icons so the account pill + language fit */
@media (max-width: 576px) {
    .navbar-actions .nav-social { display: none !important; }
    .navbar-brand { font-size: 0.95rem; }
}

/* ????????? Form errors (Django .errorlist) ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
    color: #b00020;
    font-size: 0.9rem;
    font-weight: 600;
}
.errorlist li { margin: 0; }

/* Inline radio (shared: signup goal, manager widgets) */
.radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 16px;
    font-weight: 400;
}

/* ????????? Multi-search: two fields, mobile collapse, preview picker ??????????????????????????? */
.search-input-group--multi {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 0.45rem;
}

.search-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.search-field--address {
    flex: 1 1 400px;
    min-width: 0;
}

.search-input-group--anon-landing {
    justify-content: center;
}

.search-input-group--anon-landing .search-field--address {
    flex: 0 1 640px;
    width: 100%;
    max-width: 640px;
}

.search-field--topic {
    flex: 1 1 300px;
    min-width: 0;
}

.search-filters-group {
    flex: 0 0 auto;
}

.search-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    flex: 0 0 auto;
    min-width: 0;
}

.search-sort-group {
    flex: 0 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    padding-left: 0.5rem;
}

.search-bar-divider {
    display: none;
}

.search-layout--one-row {
    flex-wrap: nowrap;
}

.search-layout--controls-row .search-controls,
.search-layout--stacked .search-controls {
    flex: 0 0 100%;
}

.search-layout--controls-row .search-field--address {
    flex: 1.5 1 0;
}

.search-layout--controls-row .search-field--topic {
    flex: 1 1 0;
}

.search-layout--controls-row .search-controls .search-filters-group,
.search-layout--stacked .search-controls .search-filters-group {
    flex: 1.6 1 0;
}

.search-layout--controls-row .search-controls .search-sort-group,
.search-layout--stacked .search-controls .search-sort-group {
    flex: 1 1 0;
}

.search-layout--stacked .search-field--address,
.search-layout--stacked .search-field--topic {
    flex: 0 0 100%;
}

.search-layout--controls-row .search-filters-tabs > .filters-tab,
.search-layout--stacked .search-filters-tabs > .filters-tab {
    flex: 1 1 auto;
}

.search-layout--controls-row .filters-tab-wrap,
.search-layout--stacked .filters-tab-wrap {
    flex: 1 1 auto;
}

.search-layout--controls-row .filters-tab-wrap .filters-tab,
.search-layout--stacked .filters-tab-wrap .filters-tab {
    width: 100%;
}

.search-layout--controls-row .search-sort-group .sort-dropdown-wrap,
.search-layout--stacked .search-sort-group .sort-dropdown-wrap {
    flex: 1 1 auto;
    width: 100%;
}

.search-layout--controls-row .search-sort-group .btn-sort-top,
.search-layout--stacked .search-sort-group .btn-sort-top {
    flex: 1 1 auto;
    max-width: none;
}

.search-field-label {
    font-size: 0.64rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.1;
    letter-spacing: 0.06em;
    padding-left: 0.65rem;
}

.address-label-row {
    display: none;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    cursor: pointer;
}

.search-layout--stacked .address-label-row {
    display: flex;
}

.address-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    line-height: 1;
    padding: 0 0.1rem;
    cursor: pointer;
}

.search-layout--stacked .address-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.address-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

.address-collapsed-house {
    width: 0.9rem;
    height: 0.9rem;
    color: var(--accent-light);
    fill: currentColor;
    background: #fff;
    border: 1.5px solid var(--accent-light);
    border-radius: 50%;
    box-sizing: content-box;
    padding: 1px;
    flex: 0 0 auto;
    display: none;
}

.address-collapsed-value {
    display: none;
    flex: 0 1 auto;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}

.address-change-link {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    cursor: pointer;
}

.address-change-link:hover,
.address-change-link:focus-visible {
    color: #fff;
    text-decoration-thickness: 2px;
}

.search-field--address.is-collapsed .search-address {
    display: none;
}

.search-field--address.is-collapsed .address-collapsed-house,
.search-field--address.is-collapsed .address-collapsed-value {
    display: block;
}

.search-field .search-address,
.search-field .search-topic {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

.search-field .form-control {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 42px;
}

#addressInput[readonly] {
    background: #fff;
    cursor: pointer;
}

.search-location-display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    height: 100%;
    text-align: left;
    line-height: 1.15;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    overflow: hidden;
}

.search-location-name {
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-location-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-location-caret {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-bar-mobile-head {
    display: none;
}

.search-bar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    white-space: nowrap;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.search-bar-toggle-caret {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.search-bar-container:not(.is-collapsed) .search-bar-toggle-caret {
    transform: rotate(180deg);
}

.search-bar-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin-left: 0;
    min-width: 0;
    max-width: 100%;
    padding: 0.45rem 0.6rem;
    background: rgba(15, 23, 42, 0.38);
    border-radius: 10px;
    color: #fff;
    overflow: hidden;
}

.search-bar-summary-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-light);
}

.search-bar-summary-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.7rem;
    width: 100%;
    min-width: 0;
}

.search-bar-summary-content {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
}

.search-bar-summary-change {
    display: inline-block;
    margin-left: 0.35rem;
    vertical-align: baseline;
    white-space: nowrap;
}

.search-bar-summary-text {
    display: inline;
    white-space: normal;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
}

.search-bar-summary-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem 0.7rem;
    flex: 0 0 auto;
}

.search-bar-summary-actions:empty {
    display: none;
}

.summary-action-link {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    cursor: pointer;
}

.summary-action-link:hover,
.summary-action-link:focus-visible {
    color: var(--primary-light);
}

.summary-house {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex: 0 0 auto;
}

.preview-location-picker {
    position: relative;
    display: inline-block;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.preview-location-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: var(--text-dark);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 600;
    text-align: left;
    transition: var(--transition);
}

.preview-location-trigger:hover,
.preview-location-trigger:focus {
    border-color: var(--color-accent-cta);
    background: rgba(247, 99, 12, 0.04);
    color: var(--color-accent-cta-dark);
}

.preview-location-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    padding: 1rem;
    z-index: 1070;
    text-align: left;
}

.preview-location-dropdown.active {
    display: block;
}

.preview-location-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
    line-height: 1.35;
}

.preview-location-sample {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.85rem 0 0.7rem;
    line-height: 1.35;
}

.preview-city-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.preview-city-option {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--accent-light);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    color: #047857;
    text-decoration: none;
    font-size: 0.85rem;
    background: rgba(52, 211, 153, 0.1);
}

.preview-city-option:hover,
.preview-city-option:focus {
    border-color: var(--accent);
    color: #065f46;
    background: #ecfdf5;
}

.preview-location-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.85rem;
}

.suggestions-group-header {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: #f9fafb;
}

.topic-suggestion {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    cursor: pointer;
}

.topic-suggestion.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.suggestion-type-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    flex: 0 0 auto;
}

.suggestion-label {
    font-weight: 600;
}

.suggestion-desc {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.suggestion-tag {
    margin-left: auto;
    font-size: 0.68rem;
    color: #b45309;
    background: #fffbeb;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    white-space: normal;
    text-align: right;
}

.suggestion-disciplines {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    margin-top: 0.2rem;
}

.suggestion-discipline {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.08rem 0.42rem;
    font-size: 0.7rem;
    color: #3730a3;
    background: #eef2ff;
    white-space: nowrap;
}

.suggestion-discipline.is-missing {
    color: #9ca3af;
    background: #f3f4f6;
}

.name-contains-box {
    margin-bottom: 0.55rem;
}

.name-contains-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.name-contains-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}

.name-contains-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.78rem;
}

.name-contains-remove {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.gc-toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%) translateY(20px);
    background: rgba(17, 24, 39, 0.94);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: calc(100vw - 2rem);
}

.gc-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 991.98px) {
    .search-bar-mobile-head {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.35rem 0;
        cursor: pointer;
    }

    .search-bar-container.is-collapsed .search-bar-body {
        display: none;
    }

    .search-bar-toggle {
        flex: 1 1 auto;
        justify-content: flex-start;
        padding-left: 0;
        gap: 0.3rem;
        color: var(--accent-light);
    }

    .search-bar-toggle-icon {
        margin: 0;
        line-height: 1;
    }

    .search-bar-summary {
        flex: 1 0 100%;
    }
}
