.fm-hero,
.fm-filters,
.fm-stage {
    position: relative;
}

.fm-hero {
    padding: 22px 0 18px;
}

.fm-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 22px;
    align-items: start;
}

.fm-hero-copy,
.fm-hero-side {
    display: grid;
    gap: 16px;
}

.fm-hero-title {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--hg-text);
}

.fm-hero-lead {
    margin: 0;
    max-width: 62ch;
    color: var(--hg-muted);
    font-size: 1rem;
}

.fm-hero-actions,
.fm-hero-notes,
.fm-mini-facts,
.fm-chip-row,
.fm-tag-row,
.fm-empty-actions,
.fm-item-topline,
.fm-item-meta,
.fm-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.fm-stat-card,
.fm-hero-panel,
.fm-filter-shell,
.fm-sidebar,
.fm-map-stage {
    background: var(--hg-surface);
    border: 1px solid var(--hg-line);
    border-radius: var(--hg-r-xl);
    box-shadow: var(--hg-shadow-sm);
}

.fm-stat-card {
    padding: 16px 18px;
    display: grid;
    gap: 4px;
}

.fm-stat-card span,
.fm-stat-card small,
.fm-panel-kicker,
.fm-filter-note,
.fm-list-count,
.fm-map-caption {
    color: var(--hg-muted);
}

.fm-stat-card span,
.fm-panel-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 800;
}

.fm-stat-card strong {
    font-size: clamp(1.4rem, 3vw, 2.3rem);
    line-height: 0.95;
    color: var(--hg-text);
}

.fm-hero-panel {
    padding: 20px 22px;
    display: grid;
    gap: 10px;
}

.fm-hero-panel h2,
.fm-sidebar-head h2,
.fm-map-head h2,
.fm-empty h3 {
    margin: 0;
    color: var(--hg-text);
}

.fm-hero-panel p,
.fm-empty p {
    margin: 0;
    color: var(--hg-muted);
}

.fm-filters {
    padding: 6px 0 18px;
}

.fm-filter-shell {
    padding: 18px;
    display: grid;
    gap: 16px;
}

.fm-server-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) auto auto;
    gap: 12px;
    align-items: end;
}

.fm-field {
    display: grid;
    gap: 8px;
}

.fm-field label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--hg-text);
}

.fm-field input,
.fm-field select,
.fm-search input {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--hg-line);
    background: #fff;
    box-shadow: none;
    color: var(--hg-text);
}

.fm-live-tools {
    display: grid;
    gap: 12px;
}

.fm-search {
    position: relative;
}

.fm-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hg-violet);
}

.fm-search input {
    width: 100%;
    padding: 0 16px 0 46px;
}

.fm-filter-chip {
    min-height: 38px;
    border-radius: 999px;
    border: 1px solid var(--hg-line);
    background: #fff;
    color: var(--hg-text);
    padding: 0 14px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.fm-filter-chip:hover,
.fm-filter-chip.is-active {
    transform: translateY(-1px);
    border-color: rgba(125, 77, 255, 0.24);
    box-shadow: 0 12px 22px rgba(125, 77, 255, 0.08);
}

.fm-filter-chip.is-active {
    background: rgba(125, 77, 255, 0.1);
    color: var(--hg-violet);
}

.fm-stage {
    padding: 0 0 34px;
}

.fm-shell {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    min-height: calc(100vh - 220px);
}

.fm-sidebar,
.fm-map-stage {
    overflow: hidden;
    position: relative;
}

.fm-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fm-sidebar-head,
.fm-map-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--hg-line);
    display: grid;
    gap: 8px;
}

.fm-list {
    flex: 1;
    overflow: auto;
    padding: 10px;
    display: grid;
    gap: 12px;
}

.fm-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--hg-line);
    background: #fff;
    border-radius: 22px;
    padding: 10px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.fm-item:hover,
.fm-item.is-selected {
    transform: translateY(-2px);
    border-color: rgba(125, 77, 255, 0.24);
    box-shadow: var(--hg-shadow-sm);
}

.fm-thumb-wrap {
    position: relative;
    width: 76px;
    height: 76px;
}

.fm-item-thumb,
.fm-item-fallback {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    object-fit: cover;
}

.fm-item-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hg-violet), var(--hg-pink));
    color: #fff;
}

.fm-item-fallback.is-live {
    background: linear-gradient(135deg, var(--hg-pink), var(--hg-coral));
}

.fm-item-fallback.is-today {
    background: linear-gradient(135deg, var(--hg-yellow), var(--hg-orange));
    color: var(--hg-text);
}

.fm-item-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.fm-item-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.05;
    color: var(--hg-text);
}

.fm-item-meta {
    gap: 8px 12px;
    font-size: 0.78rem;
    color: var(--hg-muted);
}

.fm-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fm-pill,
.fm-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 0.68rem;
    font-weight: 800;
    border: 1px solid var(--hg-line);
    background: #fff;
    color: var(--hg-text);
}

.fm-pill.is-live {
    background: rgba(255, 79, 163, 0.1);
    color: var(--hg-pink);
    border-color: rgba(255, 79, 163, 0.16);
}

.fm-pill.is-today {
    background: rgba(255, 183, 3, 0.14);
    color: #9a5a00;
    border-color: rgba(255, 183, 3, 0.18);
}

.fm-pill.is-exact {
    background: rgba(28, 199, 149, 0.12);
    color: #0d8f6c;
    border-color: rgba(28, 199, 149, 0.18);
}

.fm-pill.is-approx,
.fm-tag {
    background: rgba(125, 77, 255, 0.08);
    color: var(--hg-violet);
    border-color: rgba(125, 77, 255, 0.14);
}

.fm-map-stage {
    min-height: 680px;
    display: grid;
    grid-template-rows: auto 1fr;
}

.fm-map-canvas {
    width: 100%;
    height: 100%;
    min-height: 620px;
}

.fm-sidebar-toggle {
    display: none;
    position: absolute;
    left: 16px;
    top: 92px;
    z-index: 1000;
}

.fm-map-legend {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: var(--hg-shadow-sm);
    gap: 8px 10px;
}

.fm-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.fm-dot.is-live {
    background: #ff4fa3;
}

.fm-dot.is-today {
    background: #ffb703;
}

.fm-dot.is-upcoming {
    background: #7d4dff;
}

.fm-dot.is-approx {
    background: linear-gradient(135deg, #7d4dff, #b49dff);
}

.fm-empty {
    padding: 36px 18px;
    text-align: center;
    display: grid;
    gap: 10px;
}

.fm-empty[hidden] {
    display: none;
}

.fm-popup {
    min-width: 230px;
}

.fm-popup img {
    width: 100%;
    height: 126px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

.fm-popup h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--hg-text);
}

.fm-popup p {
    margin: 0 0 8px;
    font-size: 0.82rem;
    color: var(--hg-muted);
}

.fm-popup .hg-btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(125, 77, 255, 0.18);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: rgba(125, 77, 255, 0.88);
    color: #fff;
    font-weight: 800;
    font-family: inherit;
}

@media (max-width: 1080px) {
    .fm-hero-grid,
    .fm-shell,
    .fm-server-grid {
        grid-template-columns: 1fr;
    }

    .fm-field--submit .hg-btn,
    .fm-field--reset .hg-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 920px) {
    .fm-shell {
        position: relative;
    }

    .fm-sidebar {
        position: absolute;
        inset: 0 auto 0 0;
        width: min(360px, calc(100% - 36px));
        z-index: 1001;
        transform: translateX(-110%);
        transition: transform 0.24s ease;
    }

    .fm-sidebar.is-open {
        transform: translateX(0);
    }

    .fm-sidebar-toggle {
        display: inline-flex;
    }

    .fm-map-stage,
    .fm-map-canvas {
        min-height: 72vh;
    }

    .fm-map-caption {
        font-size: 0.78rem;
    }
}

@media (max-width: 640px) {
    .fm-hero {
        padding-top: 14px;
    }

    .fm-filter-shell,
    .fm-sidebar-head,
    .fm-map-head,
    .fm-hero-panel {
        padding: 16px;
    }

    .fm-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fm-item {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .fm-thumb-wrap,
    .fm-item-thumb,
    .fm-item-fallback {
        width: 68px;
        height: 68px;
    }

    .fm-map-legend {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}
