.genevieve-seat-map {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #d9e0e6;
    border-radius: 8px;
    background: #f5f7f9;
}

.genevieve-seat-map-shell {
    min-width: 0;
}

.genevieve-map-viewport {
    max-width: 100%;
    padding: 2px 2px 8px;
    overflow: auto;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
}

.genevieve-spatial-map {
    position: relative;
    display: block;
    min-width: 720px;
    padding: 0;
    overflow: visible;
    background-color: #f7f9fa;
    background-image: linear-gradient(rgba(15, 49, 87, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 49, 87, .035) 1px, transparent 1px);
    background-size: calc(100% / var(--flex-grid-cols)) calc(100% / var(--flex-grid-rows));
}

.genevieve-spatial-map.mode-buyer,
.genevieve-spatial-map.mode-waiting,
.genevieve-spatial-map.mode-wayfinding {
    width: 100%;
    min-width: 0;
}

.genevieve-map-element {
    position: absolute;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    color: #263742;
    border: 1px solid #aab8c2;
    border-radius: 6px;
    background: #eef2f4;
}

.genevieve-map-element-label {
    display: block;
    max-width: 100%;
    padding: 3px 5px;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
}

.genevieve-map-element.kind-open_area {
    z-index: 1;
    color: #fff;
    border-color: #25343d;
    background: #25343d;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.genevieve-map-element.kind-path {
    z-index: 1;
    color: #52606a;
    border-color: #8b979f;
    border-style: dashed;
    background: repeating-linear-gradient(135deg, #f6f8f9, #f6f8f9 8px, #e9edef 8px, #e9edef 16px);
}

.genevieve-map-element.kind-zone {
    z-index: 3;
    color: #174c5d;
    border-color: #7aaec0;
    background: #e1f1f5;
}

.genevieve-map-element.kind-zone .genevieve-map-element-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.genevieve-map-element.kind-unit_group {
    z-index: 2;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    padding: 3px;
    border-color: #b9c7d0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 7px rgba(23, 33, 43, .1);
}

.genevieve-map-element.kind-unit_group > .genevieve-map-element-label {
    align-self: center;
    color: #33444f;
    font-weight: 800;
}

.genevieve-section-seats {
    display: grid;
    grid-template-columns: repeat(var(--flex-unit-columns), minmax(0, 1fr));
    align-content: center;
    align-items: center;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 0;
    padding: 2px;
}

.genevieve-section-seats .genevieve-seat {
    width: 100%;
    max-width: 28px;
}

.mode-buyer .genevieve-section-seats,
.mode-waiting .genevieve-section-seats,
.mode-wayfinding .genevieve-section-seats {
    box-sizing: border-box;
    width: 100%;
    gap: clamp(1px, .35vw, 4px);
    padding: clamp(1px, .35vw, 4px);
}

.mode-buyer .genevieve-section-seats .genevieve-seat,
.mode-waiting .genevieve-section-seats .genevieve-seat,
.mode-wayfinding .genevieve-section-seats .genevieve-seat {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: 40px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(23, 33, 43, .12);
}

.genevieve-mobile-map-controls {
    display: none;
}

.genevieve-mobile-map-controls strong {
    display: block;
    color: #17212b;
}

.genevieve-mobile-map-controls small {
    display: block;
    color: #44515c;
    line-height: 1.45;
}

.genevieve-mobile-map-controls > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genevieve-mobile-map-controls button {
    min-height: 44px;
    padding: 8px 12px;
    color: #173b56;
    border: 1px solid #9eacb7;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.genevieve-mobile-map-controls button[aria-pressed="true"] {
    color: #fff;
    border-color: #0f3157;
    background: #0f3157;
}

.genevieve-mobile-map-controls button:focus-visible {
    outline: 3px solid #f0b429;
    outline-offset: 2px;
}

.genevieve-stage {
    display: grid;
    place-items: center;
    min-width: 0;
    height: 36px;
    color: #fff;
    border-radius: 6px;
    background: #25343d;
    font-size: 12px;
    font-weight: 800;
}

.genevieve-seat-row {
    display: grid;
    grid-template-columns: 26px repeat(var(--genevieve-seat-columns, 12), minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.genevieve-row-label {
    color: #5f6b76;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.genevieve-seat {
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    aspect-ratio: 1 / 1;
    color: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #dfe5ea;
    font-size: 0;
    line-height: 0;
}

button.genevieve-seat {
    appearance: none;
    cursor: pointer;
}

button.genevieve-seat:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px rgba(15, 49, 87, .18);
}

button.genevieve-seat:disabled {
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

button.genevieve-seat:focus-visible {
    outline: 3px solid #f0b429;
    outline-offset: 2px;
}

button.genevieve-seat[aria-busy="true"] {
    opacity: .55;
    cursor: wait;
}

.genevieve-seat.vip {
    border-color: #8ebfce;
    background: #dff0f6;
}

.genevieve-seat.ga {
    border-color: #c8cfd6;
    background: #e7eaee;
}

.genevieve-seat.hold {
    border-color: #d0aa39;
    background: #f9e7a8;
}

.genevieve-seat.selected {
    border-color: #0f3157;
    background: #0f3157;
    box-shadow: inset 0 0 0 2px #fff;
}

.genevieve-seat.sold {
    position: relative;
    opacity: 1;
    border-color: #4e5963;
    background: #7d8790;
}

.genevieve-seat.sold::after {
    content: "×";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: clamp(10px, 1.4vw, 18px);
    font-weight: 900;
    line-height: 1;
}

.genevieve-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    color: #5f6b76;
    font-size: 12px;
}

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

.genevieve-legend i {
    display: inline-block;
    width: 12px;
    min-width: 12px;
    height: 12px;
    border-radius: 3px;
}

.mode-wayfinding .genevieve-seat {
    pointer-events: none;
}

@media (max-width: 860px) {
    .genevieve-mobile-map-controls {
        display: grid;
        gap: 8px;
        margin: 0 0 10px;
    }

    .genevieve-seat-map-shell.mode-buyer.is-mobile-overview .genevieve-spatial-map {
        pointer-events: none;
    }

    .mode-buyer.is-section-focused .genevieve-spatial-map {
        display: grid;
        place-items: center;
        min-height: 280px;
        aspect-ratio: auto !important;
    }

    .mode-buyer.is-section-focused .genevieve-map-element {
        display: none;
    }

    .mode-buyer.is-section-focused .genevieve-map-element.kind-unit_group.is-active {
        position: relative;
        left: auto !important;
        top: auto !important;
        display: grid;
        width: min(100%, 420px) !important;
        height: auto !important;
        min-height: 260px;
    }

    .mode-buyer.is-section-focused .genevieve-section-seats {
        grid-template-columns: repeat(var(--flex-unit-columns), 40px);
        justify-content: start;
        gap: 4px;
        max-width: 100%;
        padding: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-gutter: stable;
    }

    .mode-buyer.is-section-focused .genevieve-section-seats .genevieve-seat {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .genevieve-seat-map {
        padding: 10px;
    }

    .genevieve-seat-row {
        grid-template-columns: 22px repeat(var(--genevieve-seat-columns, 12), minmax(0, 1fr));
        gap: 2px;
    }
}
