/* Only Ink ART_WALL blocks use this scroll treatment. */
art-wall {
    display: block;
    position: relative;
    width: calc(100vw - 64px);
    margin: 2em 0 2em calc(50% - 50vw + 32px);
    --wall-bg: #f4eee3;
    --wall-text: #392b17;
    --wall-line: #98713a;
}
.dark art-wall {
    --wall-bg: #11100d;
    --wall-text: #e8cc9d;
    --wall-line: #6e5732;
}
.art-wall-stage {
    box-sizing: border-box;
    position: sticky;
    top: 16px;
    height: var(--art-height, 80vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--wall-bg);
    color: var(--wall-text);
    border-block: 1px solid var(--wall-line);
    padding: 20px 0;
}
.art-wall-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px 20px;
    font: 14px/1.6 var(--adventure-font);
}
.art-wall-hint { opacity: .8; }
.art-wall-window { overflow: hidden; min-height: 0; flex: 1; display: flex; align-items: center; }
.art-wall-track {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(28px, 6vw, 90px);
    width: max-content;
    padding: 18px 36px 24px;
    will-change: transform;
}
.art-wall-track figure {
    margin: 0;
    width: clamp(240px, 50vw, 640px);
    flex: 0 0 auto;
    text-align: center;
}
.art-wall-artwork {
    width: 100%;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    cursor: zoom-in;
}
.art-wall-artwork img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: clamp(120px, calc(var(--art-height) - 240px), 520px);
    object-fit: contain;
    border-radius: 0;
    filter: drop-shadow(0 8px 8px #0004);
}
.art-wall-track figcaption { font: 14px/1.6 var(--adventure-font); margin-top: 18px; }
.art-wall-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 8px 16px; }
.art-wall-stage button:not(.art-wall-artwork), .art-wall-dialog button {
    font: 14px/1.4 var(--adventure-font);
    color: inherit;
    background: transparent;
    border: 1px solid var(--wall-line, #98713a);
    border-radius: 3px;
    padding: 10px 12px;
    min-height: 44px;
    cursor: pointer;
}
.art-wall-stage button:disabled { opacity: .35; cursor: default; }
.art-wall-stage button:focus-visible, .art-wall-dialog button:focus-visible { outline: 2px solid #e4ad51; outline-offset: 5px; }
.art-wall-stage button:not(:disabled):hover { background-color: #c5964322; }
.art-wall-count { font-size: 13px; white-space: nowrap; }
.art-wall-progress { height: 2px; background: #98713a33; margin: 8px 28px 14px; }
.art-wall-progress span { display: block; height: 100%; background: #b78a46; transform-origin: left; }
.art-wall-finish { align-self: center; }
.art-wall-dialog {
    box-sizing: border-box;
    width: min(1100px, 94vw);
    max-height: 94vh;
    padding: 20px;
    background: #11100d;
    color: #e8cc9d;
    border: 1px solid #98713a;
}
.art-wall-dialog::backdrop { background: #000d; }
.art-wall-dialog button { display: block; margin: 0 0 18px auto; }
.art-wall-dialog img { width: 100%; height: 70vh; object-fit: contain; border-radius: 0; }
.art-wall-dialog h2 { font: 16px/1.6 var(--adventure-font); color: inherit; margin-top: 16px; }
.art-wall-reduced .art-wall-stage { position: relative; height: auto; }
.art-wall-reduced .art-wall-window { overflow-x: auto; }
.art-wall-reduced .art-wall-track { transform: none; will-change: auto; }
@media(max-width:600px) {
    art-wall { width: calc(100vw - 24px); margin-left: calc(50% - 50vw + 12px); }
    .art-wall-heading { flex-direction: column; gap: 4px; padding: 0 16px 10px; font-size: 12px; }
    .art-wall-track { padding-inline: 22px; gap: 30px; }
    .art-wall-track figure { width: 74vw; }
    .art-wall-controls { gap: 10px; }
    .art-wall-stage button:not(.art-wall-artwork) { font-size: 12px; }
}

/* Pottery: three lanes moving left / right / left through one story section. */
.art-wall-multi .art-wall-rows {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    flex: 1;
    min-height: 0;
    gap: 12px;
}
.art-wall-multi .art-wall-window { height: 100%; }
.art-wall-multi .art-wall-track { gap: 26px; padding: 4px 24px; }
.art-wall-multi .art-wall-track figure { width: clamp(170px, 24vw, 280px); }
.art-wall-multi .art-wall-artwork img {
    width: 100%;
    height: max(70px, calc((var(--art-height) - 260px) / 3));
    max-height: none;
    object-fit: contain;
}
.art-wall-multi .art-wall-track figcaption {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.4;
    height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.art-wall-multi .art-wall-heading { padding-bottom: 12px; }
.art-wall-multi .art-wall-controls { margin-top: 12px; }
.art-wall-multi.art-wall-reduced .art-wall-rows { display: block; flex: none; }
.art-wall-multi.art-wall-reduced .art-wall-window { overflow: visible; display: block; }
.art-wall-multi.art-wall-reduced .art-wall-track {
    width: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 20px;
}
.art-wall-multi.art-wall-reduced .art-wall-track figure { width: auto; }
.art-wall-multi.art-wall-reduced .art-wall-artwork img { height: 180px; }
.art-wall-multi.art-wall-reduced .art-previous,
.art-wall-multi.art-wall-reduced .art-next,
.art-wall-multi.art-wall-reduced .art-wall-progress { display: none; }
@media(max-width:600px) {
    .art-wall-multi .art-wall-track { gap: 18px; padding-inline: 16px; }
    .art-wall-multi .art-wall-track figure { width: 46vw; }
    .art-wall-multi .art-wall-count { font-size: 11px; }
}
@media(max-height:600px) {
    .art-wall-multi .art-wall-heading { padding-bottom: 6px; }
    .art-wall-multi .art-wall-hint { display: none; }
    .art-wall-multi .art-wall-rows { gap: 4px; }
    .art-wall-multi .art-wall-artwork img { height: max(40px, calc((var(--art-height) - 230px) / 3)); }
    .art-wall-multi .art-wall-track figcaption { margin-top: 2px; font-size: 11px; }
}

/* Size photos from their actual lane so every caption stays visible. */
.art-wall-multi:not(.art-wall-reduced) .art-wall-track { height: 100%; box-sizing: border-box; }
.art-wall-multi:not(.art-wall-reduced) .art-wall-track figure { height: 100%; }
.art-wall-multi:not(.art-wall-reduced) .art-wall-artwork { height: calc(100% - 42px); }
.art-wall-multi:not(.art-wall-reduced) .art-wall-artwork img { height: 100%; display: block; }
