:root {
    color-scheme: light;
    --map-ink: #25051f;
    --map-muted: #5f5360;
    --map-line: #e5d9e2;
    --map-surface: #ffffff;
    --map-stage: #5d5c63;
    --map-live: #fb150c;
    --map-upcoming: #b662ff;
    --map-accent: #f72c73;
    --map-green: #00a9c8;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 320px;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--map-ink);
    background: var(--map-stage);
}

button,
a {
    font: inherit;
}

.venue-map-skip {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 14px;
    color: #fff;
    background: var(--map-ink);
    transform: translateY(-160%);
}

.venue-map-skip:focus {
    transform: none;
}

.venue-map-shell {
    display: grid;
    grid-template-rows: 82px minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
}

.venue-map-header {
    display: grid;
    grid-template-columns: 44px minmax(260px, 1fr) auto auto;
    gap: 18px;
    align-items: center;
    min-width: 0;
    padding: 12px 22px;
    color: #071d49;
    background: #fff;
    border-bottom: 1px solid #e3e7ee;
    box-shadow: 0 4px 16px rgba(7, 29, 73, .08);
}

.venue-map-back,
.venue-map-icon-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: inherit;
    background: transparent;
    border: 1px solid rgba(7, 29, 73, .2);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.venue-map-back:hover,
.venue-map-back:focus-visible,
.venue-map-icon-button:hover,
.venue-map-icon-button:focus-visible {
    color: #fff;
    background: #071d49;
    outline: none;
}

.venue-map-back i,
.venue-map-icon-button i {
    font-size: 22px;
}

.venue-map-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.venue-map-brand img {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    object-fit: contain;
    background: #fff;
}

.venue-map-brand div {
    display: grid;
    min-width: 0;
}

.venue-map-brand span {
    color: #071d49;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.venue-map-brand strong {
    overflow: hidden;
    font-size: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.venue-map-event-meta {
    display: grid;
    gap: 4px;
    max-width: 330px;
    color: #384766;
    font-size: 13px;
}

.venue-map-event-meta span {
    display: flex;
    gap: 7px;
    align-items: center;
}

.venue-map-clock {
    min-width: 62px;
    color: #071d49;
    font-size: 18px;
    font-weight: 800;
    text-align: right;
}

.venue-map-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
    min-height: 0;
}

.venue-map-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--map-stage);
    border-right: 1px solid rgba(92, 83, 70, .16);
}

.venue-map-canvas,
.venue-map-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.venue-map-canvas canvas {
    touch-action: none;
}

.venue-map-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    gap: 12px;
    place-content: center;
    color: #f7efe7;
    background: var(--map-stage);
    font-weight: 700;
    text-align: center;
}

.venue-map-loading span {
    width: 32px;
    height: 32px;
    margin: auto;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: var(--map-accent);
    border-radius: 50%;
    animation: venue-map-spin .8s linear infinite;
}

.venue-map-loading[hidden] {
    display: none;
}

@keyframes venue-map-spin {
    to { transform: rotate(360deg); }
}

.venue-map-toolbar {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    max-width: calc(100% - 36px);
}

.venue-map-levels,
.venue-map-days {
    display: flex;
    padding: 4px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--map-line);
    border-radius: 7px;
    box-shadow: 0 12px 30px rgba(16, 24, 32, .13);
}

.venue-map-days[hidden] {
    display: none;
}

.venue-map-days button {
    display: grid;
    min-width: 82px;
    min-height: 36px;
    padding: 5px 10px;
    color: var(--map-muted);
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    line-height: 1.1;
    text-align: left;
}

.venue-map-days button strong {
    font-size: 12px;
}

.venue-map-days button span {
    font-size: 10px;
    text-transform: capitalize;
}

.venue-map-days button[aria-selected="true"] {
    color: #fff;
    background: linear-gradient(135deg, #fb150c, #f72c73, #b662ff);
    box-shadow: 0 4px 12px rgba(247, 44, 115, .28);
}

.venue-map-levels button,
.venue-map-segments button {
    min-height: 36px;
    padding: 7px 13px;
    color: var(--map-muted);
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

.venue-map-levels button[aria-pressed="true"],
.venue-map-segments button[aria-selected="true"] {
    color: #fff;
    background: var(--map-ink);
    box-shadow: 0 4px 12px rgba(16, 24, 32, .18);
}

.venue-map-toolbar .venue-map-icon-button {
    color: var(--map-ink);
    background: rgba(255, 255, 255, .94);
    border-color: var(--map-line);
    box-shadow: 0 8px 24px rgba(16, 24, 32, .12);
}

.venue-map-toolbar .venue-map-icon-button:hover,
.venue-map-toolbar .venue-map-icon-button:focus-visible {
    color: #fff;
    background: var(--map-accent);
}

.venue-map-legend {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
    display: flex;
    gap: 15px;
    padding: 10px 13px;
    color: var(--map-muted);
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--map-line);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(16, 24, 32, .1);
}

.venue-map-legend span {
    display: flex;
    gap: 6px;
    align-items: center;
}

.venue-map-legend i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.venue-map-legend .is-live { background: var(--map-live); }
.venue-map-legend .is-upcoming { background: var(--map-upcoming); }
.venue-map-legend .is-space { background: #c9d1d8; }

.venue-map-exhibitors {
    position: absolute;
    bottom: 16px;
    left: 50%;
    z-index: 4;
    display: flex;
    gap: 16px;
    align-items: center;
    width: max-content;
    max-width: calc(100% - 36px);
    padding: 10px 16px;
    overflow-x: auto;
    color: #2d2350;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(22, 16, 20, .28);
    transform: translateX(-50%);
    scrollbar-width: thin;
    backdrop-filter: blur(12px);
}

.venue-map-exhibitors[hidden] {
    display: none;
}

.venue-map-exhibitor {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
}

.venue-map-exhibitor i {
    display: inline-grid;
    width: 27px;
    height: 27px;
    place-items: center;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .86);
    border-radius: 50%;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(16, 24, 32, .2);
}

.venue-map-exhibitor strong {
    font-size: 12px;
    font-weight: 750;
}

.venue-map-selection {
    position: absolute;
    bottom: 82px;
    left: 18px;
    z-index: 4;
    width: min(340px, calc(100% - 36px));
    padding: 14px 48px 14px 14px;
    background: rgba(255, 255, 255, .96);
    border-left: 4px solid var(--map-accent);
    box-shadow: 0 12px 30px rgba(16, 24, 32, .16);
}

.venue-map-selection[hidden] {
    display: none;
}

.venue-map-selection span {
    display: block;
    color: var(--map-accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.venue-map-selection strong {
    display: block;
    margin-top: 3px;
    font-size: 20px;
}

.venue-map-selection p {
    margin: 4px 0 0;
    color: var(--map-muted);
    font-size: 13px;
}

.venue-map-selection-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    color: var(--map-ink);
    background: #fff;
    border: 1px solid var(--map-line);
    border-radius: 50%;
    cursor: pointer;
}

.venue-map-selection-close:hover,
.venue-map-selection-close:focus-visible {
    color: #fff;
    background: var(--map-accent);
    border-color: var(--map-accent);
    outline: none;
}

.venue-map-selection-close i {
    font-size: 20px;
}

.venue-map-panel {
    display: flex;
    min-height: 0;
    padding: 20px 18px 14px;
    overflow: hidden;
    flex-direction: column;
    background: #fbfcfd;
    border-left: 1px solid var(--map-line);
}

.venue-map-panel-heading {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.venue-map-eyebrow {
    color: var(--map-accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.venue-map-panel h1 {
    margin: 4px 0 0;
    font-size: 25px;
    line-height: 1.08;
}

.venue-map-live-indicator {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    color: var(--map-muted);
    background: #f2f5f7;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.venue-map-live-indicator i {
    width: 8px;
    height: 8px;
    background: var(--map-green);
    border-radius: 50%;
}

.venue-map-live-indicator.is-live {
    color: #a51f31;
    background: #fff0f2;
}

.venue-map-live-indicator.is-live i {
    background: var(--map-live);
    box-shadow: 0 0 0 4px rgba(230, 75, 93, .15);
}

.venue-map-segments {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 18px 0 12px;
    padding: 4px;
    background: #eef2f4;
    border-radius: 7px;
}

.venue-map-session-list {
    display: grid;
    gap: 9px;
    min-height: 0;
    padding-right: 3px;
    overflow: auto;
}

.venue-map-session {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 24px;
    gap: 10px;
    align-items: start;
    width: 100%;
    padding: 12px 10px;
    color: inherit;
    text-align: left;
    background: #fff;
    border: 1px solid var(--map-line);
    border-left: 4px solid var(--map-upcoming);
    border-radius: 7px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 24, 32, .035);
}

.venue-map-session:hover,
.venue-map-session:focus-visible {
    border-color: var(--map-accent);
    outline: none;
    box-shadow: 0 8px 22px rgba(16, 24, 32, .09);
}

.venue-map-session.is-live {
    border-left-color: var(--map-live);
}

.venue-map-session.is-selected {
    color: #071d49;
    background: #fff0f6;
    border-color: var(--map-accent);
    box-shadow: 0 8px 22px rgba(247, 44, 115, .16);
}

.venue-map-session-time {
    color: var(--map-muted);
    font-size: 12px;
    font-weight: 800;
}

.venue-map-session-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.venue-map-session-copy strong {
    font-size: 14px;
    line-height: 1.25;
}

.venue-map-session-copy span {
    color: var(--map-muted);
    font-size: 12px;
}

.venue-map-session-room {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--map-accent) !important;
    font-weight: 700;
}

.venue-map-session > i {
    margin-top: 2px;
    color: var(--map-muted);
    font-size: 19px;
}

.venue-map-empty,
.venue-map-fallback {
    display: grid;
    gap: 7px;
    padding: 24px 18px;
    place-items: center;
    color: var(--map-muted);
    text-align: center;
}

.venue-map-empty[hidden],
.venue-map-fallback[hidden] {
    display: none;
}

.venue-map-empty i,
.venue-map-fallback i {
    color: var(--map-accent);
    font-size: 34px;
}

.venue-map-empty p,
.venue-map-fallback p {
    margin: 0;
    font-size: 13px;
}

.venue-map-fallback {
    position: absolute;
    inset: 0;
    z-index: 5;
    align-content: center;
    color: #f7efe7;
    background: var(--map-stage);
}

.venue-map-panel-footer {
    display: flex;
    gap: 7px;
    align-items: center;
    margin-top: 12px;
    padding-top: 11px;
    color: var(--map-muted);
    border-top: 1px solid var(--map-line);
    font-size: 12px;
}

@media (max-width: 900px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow: auto;
    }

    .venue-map-shell {
        grid-template-rows: auto auto;
        height: auto;
        min-height: 100dvh;
    }

    .venue-map-header {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 10px;
        min-height: 72px;
        padding: 10px 12px;
    }

    .venue-map-brand img {
        width: 38px;
        height: 38px;
    }

    .venue-map-brand span,
    .venue-map-event-meta {
        display: none;
    }

    .venue-map-brand strong {
        font-size: 15px;
    }

    .venue-map-clock {
        min-width: 48px;
        font-size: 15px;
    }

    .venue-map-main {
        grid-template-columns: 1fr;
    }

    .venue-map-stage {
        height: 56dvh;
        min-height: 420px;
    }

    .venue-map-panel {
        min-height: 48dvh;
        max-height: none;
        padding: 18px 14px 16px;
        overflow: visible;
        border-top: 1px solid var(--map-line);
        border-left: 0;
    }

    .venue-map-session-list {
        max-height: none;
        overflow: visible;
    }

    .venue-map-selection {
        bottom: 78px;
        left: 12px;
        width: min(300px, calc(100% - 24px));
    }

    .venue-map-legend {
        display: none;
    }

    .venue-map-exhibitors {
        bottom: 10px;
        max-width: calc(100% - 20px);
        gap: 13px;
        padding: 8px 10px;
    }
}

@media (max-width: 520px) {
    .venue-map-stage {
        height: 52dvh;
        min-height: 390px;
    }

    .venue-map-toolbar {
        top: 10px;
        left: 10px;
        gap: 6px;
        max-width: calc(100% - 20px);
    }

    .venue-map-days {
        order: -1;
        max-width: 100%;
        overflow-x: auto;
    }

    .venue-map-levels button {
        min-height: 34px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .venue-map-toolbar .venue-map-icon-button {
        width: 38px;
        height: 38px;
    }

    .venue-map-selection {
        padding: 11px;
    }

    .venue-map-exhibitor strong {
        font-size: 11px;
    }

    .venue-map-selection strong {
        font-size: 17px;
    }

    .venue-map-panel h1 {
        font-size: 22px;
    }

    .venue-map-session {
        grid-template-columns: 52px minmax(0, 1fr) 20px;
    }
}

.venue-map-embedded .venue-map-skip,
.venue-map-embedded .venue-map-header {
    display: none;
}

.venue-map-embedded .venue-map-shell {
    grid-template-rows: minmax(0, 1fr);
}

.venue-map-embedded body.is-preview {
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.venue-map-embedded body.is-preview .venue-map-shell,
.venue-map-embedded body.is-preview .venue-map-main,
.venue-map-embedded body.is-preview .venue-map-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.venue-map-embedded body.is-preview .venue-map-main {
    display: block;
}

.venue-map-embedded body.is-preview .venue-map-panel,
.venue-map-embedded body.is-preview .venue-map-toolbar,
.venue-map-embedded body.is-preview .venue-map-selection,
.venue-map-embedded body.is-preview .venue-map-legend {
    display: none !important;
}

.venue-map-embedded body.is-preview .venue-map-exhibitors {
    bottom: 8px;
    max-width: calc(100% - 16px);
    gap: 10px;
    padding: 7px 9px;
}

.venue-map-embedded body.is-preview .venue-map-exhibitor i {
    width: 22px;
    height: 22px;
    font-size: 10px;
}

.venue-map-embedded body.is-preview .venue-map-exhibitor strong {
    font-size: 10px;
}

@media (max-width: 900px) {
    .venue-map-embedded body.is-modal .venue-map-shell {
        grid-template-rows: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
