#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* The exhibits, down the left under the badge. */
#list {
    left: max(14px, env(safe-area-inset-left));
    top: calc(max(14px, env(safe-area-inset-top)) + 58px);
    transform: none;
    display: flex;
    flex-direction: column;
    padding: 10px;
    z-index: 2;
}

#list button, #clips button {
    text-align: left;
    padding: 9px 10px;
    white-space: nowrap;
    clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}

#list button:hover, #clips button:hover { color: var(--punch); }
#list button.on, #clips button.on { color: #000; background: var(--punch); }

/* The picture the pair in view was made from, top-right. */
#source {
    left: auto;
    right: max(14px, env(safe-area-inset-right));
    top: max(14px, env(safe-area-inset-top));
    transform: none;
    margin: 0;
    padding: 10px;
    z-index: 2;
}

#source img { display: block; height: 150px; width: auto; }
#source[hidden] { display: none; }
#source img { cursor: pointer; }

/* That picture at full size, with a download. */
#pictures {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(10, 10, 14, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
#pictures[hidden] { display: none; }
#pictures .window { width: auto; max-width: 100%; }
#pictures .inner { padding: 26px; }
#pictures .shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
#pictures figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
#pictures figure img { display: block; height: min(300px, 38dvh); width: auto; }
#pictures a.icon { color: #e6e6ea; }
#pictures a.icon:hover { color: var(--punch); }
#pictures a.icon:active { color: #000; }

/* The clips, above the bar. */
#clips {
    bottom: calc(var(--gap) + 66px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    padding: 8px 10px;
    max-width: min(900px, calc(100vw - 32px));
    max-height: 30vh;
    overflow-y: auto;
    z-index: 2;
}

#clips[hidden] { display: none; }

/* Each model's numbers on the floor in front of it, or the pair's name when looking at them all. */
#labels { position: fixed; inset: 0; pointer-events: none; }

.label {
    position: absolute;
    transform: translate(-50%, 0);
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

.label b { display: block; font: 700 17px/1.3 "Chakra Petch", sans-serif; color: var(--punch); }
.label span { display: block; color: #d0d0d6; }
@media (max-width: 700px) {
    #source img { height: 90px; }
    #list { padding: 6px; }
    #list button { padding: 7px 8px; }
    .label { font-size: 11px; }
    .label b { font-size: 14px; }
}

/* The words the right-hand model was made from, under the picture. */
#source figcaption { max-width: 220px; margin-top: 8px; font-size: 11px; line-height: 1.4; color: #c8c8ce; }
#source figcaption:empty { display: none; }
@media (max-width: 700px) { #source figcaption { max-width: 140px; font-size: 10px; } }
