header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    margin-bottom: 0;
}
footer {
    display: none;
}
.hall {
    --head: 93px;
    --gutter: 80px;
    --hint-pad: 40px;
    --overlay-top: color-mix(in srgb, var(--main-bg) 75%, transparent);
    --overlay-low: color-mix(in srgb, var(--main-bg) 10%, transparent);
    --overlay-bottom: color-mix(in srgb, var(--main-bg) 95%, transparent);
    --overlay-side: color-mix(in srgb, var(--main-bg) 90%, transparent);
    --overlay-none: color-mix(in srgb, var(--main-bg) 0%, transparent);
    .track {
        position: relative;
        height: calc(((var(--scenes) - 1) * 140 + 100) * 1vh);
        height: calc(((var(--scenes) - 1) * 140 + 100) * 1lvh);
    }
    .stage {
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100lvh;
        overflow: hidden;
        background: var(--main-bg);
    }
    :is(.photos, .photo, .frames) {
        position: absolute;
        inset: 0;
    }
    .photo {
        visibility: hidden;
    }
    .frames {
        will-change: transform;
        img {
            position: absolute;
            inset: 0;
            height: 100%;
            opacity: 0;
        }
    }
    .shade {
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, var(--overlay-side), var(--overlay-none) 70%), linear-gradient(180deg, var(--overlay-top), var(--overlay-none) 30%, var(--overlay-low) 55%, var(--overlay-bottom));
        pointer-events: none;
    }
    .edge {
        position: absolute;
        top: 0;
        left: -5%;
        width: 110%;
        height: 2px;
        background: var(--bg-8);
        box-shadow: 0 0 24px 4px var(--bg-8);
        opacity: 0;
        pointer-events: none;
    }
    .front {
        position: absolute;
        inset: 0 0 auto;
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100svh;
        padding-top: var(--head);
    }
    .chapters {
        display: flex;
        align-items: flex-end;
        flex-shrink: 0;
        gap: 16px;
        padding: 20px var(--gutter) 0;
    }
    .chapter {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 12px;
        min-width: 0;
        background: none;
        text-align: left;
        &:focus-visible {
            outline: 2px solid var(--border-8);
            outline-offset: 4px;
        }
        &.active .number {
            color: var(--text-11);
        }
        &:is(.active, .passed) .name {
            color: var(--text-1);
        }
    }
    .label {
        display: flex;
        gap: 8px;
        min-width: 0;
    }
    :is(.number, .name, .count, .eyebrow, .hint) {
        font-family: 'Wix Madefor Text', sans-serif;
        font-size: 12px;
        font-weight: 600;
        line-height: 16px;
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }
    :is(.number, .name, .count) {
        color: var(--text-4);
        white-space: nowrap;
        transition: color 0.3s;
    }
    .name {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .segment {
        position: relative;
        display: block;
        height: 2px;
        overflow: hidden;
        background: var(--border-3);
    }
    .fill {
        position: absolute;
        inset: 0;
        background: var(--bg-8);
        transform: scaleX(0);
        transform-origin: left;
    }
    .count {
        flex-shrink: 0;
    }
    .scenes {
        position: relative;
        flex: 1;
        min-height: 0;
        margin: 0 var(--gutter);
    }
    .scene {
        --show: 0;
        --out: 0;
        position: absolute;
        inset: auto 0 0;
        visibility: hidden;
        opacity: calc(1 - var(--out));
        transform: translateY(calc(var(--out) * -48px));
    }
    .content {
        display: flex;
        flex-direction: column;
        gap: 24px;
        min-width: 0;
    }
    .eyebrow {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-11);
        opacity: var(--show);
        transform: translateY(calc((1 - var(--show)) * 16px));
        &::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--bg-8);
        }
    }
    :is(h1, h2) {
        font-family: 'Oswald', sans-serif;
        font-size: clamp(64px, 6.25vw, 120px);
        font-weight: 700;
        line-height: 1.07;
        letter-spacing: 0;
        text-transform: uppercase;
        span {
            font: inherit;
            letter-spacing: inherit;
            color: inherit;
        }
    }
    .word {
        display: inline-block;
        margin-top: -0.12em;
        padding-top: 0.12em;
        overflow: hidden;
        vertical-align: top;
        > span {
            --part: clamp(0, calc(var(--show) * (var(--words) + 1.5) - var(--i)), 1);
            display: inline-block;
            transform: translateY(calc((1 - var(--part)) * 115%));
        }
    }
    .lead {
        --part: clamp(0, calc((var(--show) - 0.55) / 0.45), 1);
        max-width: 720px;
        font-family: 'Wix Madefor Text', sans-serif;
        font-size: 24px;
        line-height: 28px;
        letter-spacing: 0;
        color: var(--text-4);
        opacity: var(--part);
        transform: translateY(calc((1 - var(--part)) * 24px));
    }
    .final {
        --part: clamp(0, calc((var(--show) - 0.4) / 0.6), 1);
        inset: 0 0 calc(-16px - var(--hint-pad));
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(320px, 640px);
        align-items: end;
        gap: 40px;
        padding-top: 20px;
        overflow-y: auto;
        scrollbar-width: none;
    }
    .place {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid var(--border-2);
        border-radius: 12px;
        background: var(--bg-4);
        opacity: var(--part);
        transform: translateY(calc((1 - var(--part)) * 48px));
    }
    .map {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        height: 200px;
        background: var(--bg-14);
        img {
            position: absolute;
            inset: 0;
            height: 100%;
        }
    }
    .pin {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        &::after {
            content: '';
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: var(--bg-8);
            box-shadow: 0 0 0 8px var(--bg-18);
        }
        small {
            padding: 6px 10px;
            border-radius: 8px;
            background: var(--main-bg);
            font-family: 'Wix Madefor Text', sans-serif;
            font-size: 12px;
            line-height: 16px;
            letter-spacing: 0;
        }
    }
    .info {
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding: 40px;
    }
    dl > div {
        display: flex;
        justify-content: space-between;
        gap: 24px;
        padding: 16px 0;
        border-top: 1px solid var(--border-5);
    }
    :is(dt, dd) {
        font-family: 'Wix Madefor Text', sans-serif;
        font-size: 16px;
        line-height: 22px;
        letter-spacing: 0;
    }
    dt {
        flex-shrink: 0;
        color: var(--text-10);
    }
    dd {
        min-width: 0;
        font-weight: 600;
        text-align: right;
        overflow-wrap: anywhere;
    }
    .route {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 60px;
        border-radius: 999px;
        background: var(--bg-8);
        font-family: 'Wix Madefor Text', sans-serif;
        font-size: 20px;
        font-weight: 500;
        line-height: 24px;
        letter-spacing: 0;
        &:focus-visible {
            outline: 2px solid var(--border-1);
            outline-offset: 2px;
        }
    }
    .hint {
        flex-shrink: 0;
        padding: var(--hint-pad) var(--gutter);
        color: var(--text-10);
        transition: opacity 0.3s;
    }
}
@media (hover: hover) {
    .hall {
        .chapter:hover .name {
            color: var(--text-1);
        }
        .route:hover {
            background: var(--bg-2);
        }
    }
}
@media screen and (max-height: 860px) {
    .hall {
        --hint-pad: 20px;
        .map {
            height: 110px;
        }
        .info {
            gap: 12px;
            padding: 20px 32px;
        }
        dl > div {
            padding: 10px 0;
        }
        .route {
            height: 48px;
            font-size: 16px;
        }
    }
}
@media screen and (max-width: 1279px) {
    .hall {
        --gutter: 40px;
        .chapters {
            gap: 8px;
        }
        .final {
            display: flex;
            flex-direction: column;
            gap: 20px;
            > * {
                flex-shrink: 0;
            }
            .content {
                margin-top: auto;
            }
        }
        .place {
            max-width: 640px;
        }
    }
}
@media screen and (max-width: 767px) {
    .hall {
        --head: 73px;
        --gutter: 20px;
        --hint-pad: 20px;
        .chapters {
            align-items: center;
            gap: 6px;
        }
        .chapter {
            gap: 0;
            padding-block: 8px;
        }
        .label {
            display: none;
        }
        .content {
            gap: 16px;
        }
        :is(h1, h2) {
            font-size: 46px;
            line-height: 52px;
        }
        .lead {
            font-size: 16px;
            line-height: 20px;
        }
        .final {
            gap: 16px;
        }
        .map {
            height: 96px;
        }
        .info {
            gap: 12px;
            padding: 12px 20px 20px;
        }
        dl > div {
            padding: 10px 0;
        }
        :is(dt, dd) {
            font-size: 14px;
            line-height: 20px;
        }
        .route {
            height: 48px;
            font-size: 16px;
        }
    }
}
@media (prefers-reduced-motion: reduce) {
    .hall .scene {
        transform: none;
    }
    .hall .word > span, .hall .lead, .hall .place, .hall .eyebrow {
        transform: none;
    }
}
