/* =====================================================================
   ART POSTERS  -  /posters/posters.css
   The dark room of the site: black paper, film grain, condensed shouting
   type, posters pasted on a wall with a strip of tape. One accent colour
   (the photo manager picks it: red, acid, orange, pink or white).
   Movement is slow and small: things settle in, nothing jumps around.
   ===================================================================== */

:root {
    --ap-bg: #0d0c0b;
    --ap-bg2: #151412;
    --ap-ink: #f2efe8;
    --ap-dim: #a39d92;
    --ap-faint: #6d685f;
    --ap-line: rgba(242, 239, 232, 0.12);
    --ap-accent: #e5322d;
    --ap-shout: "Anton", "Bebas Neue", "League Gothic", Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Bold", sans-serif;
    --ap-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --ap-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --ap-ease: cubic-bezier(.2, .75, .15, 1);
}

/* ---------------------------------------------------------------- the dark room */
html:has(body.ap-page) { background: var(--ap-bg); color-scheme: dark; overflow-x: clip; }
body.ap-page:not(#_) {
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(229, 50, 45, 0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(255, 255, 255, 0.035), transparent 60%),
        var(--ap-bg);
    background-attachment: fixed;
    color: var(--ap-ink);
    --ui-ink: #f2efe8;
    --ui-paper: rgba(255, 255, 255, 0.04);
    --ui-line: rgba(242, 239, 232, 0.16);
    --ui-visited: #d9d4ca;
}
html.ap-locked, html.ap-locked body { overflow: hidden !important; }
html:has(body.ap-page) { scrollbar-gutter: stable; }
.ap-grain {
    position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: ap-grain 1.2s steps(4) infinite;
}
.ap-no-grain .ap-grain { display: none; }
@keyframes ap-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, 3%); } 100% { transform: translate(0, 0); } }

/* the site's own header, menu and "Made by me" box, in the dark */
body.ap-page:not(#_) h1, body.ap-page:not(#_) .site-title { color: var(--ap-ink); }
body.ap-page:not(#_) .site-title:hover { color: var(--ap-accent); }
body.ap-page:not(#_) > header > h2 { color: var(--ap-dim); border-bottom-color: var(--ap-line); }
body.ap-page:not(#_) nav a:hover, body.ap-page:not(#_) nav a[aria-current="page"] { color: #0d0c0b; }
body.ap-page:not(#_) nav a[aria-current="page"] { background: var(--ap-accent); border-color: var(--ap-accent); color: #0d0c0b; }
body.ap-page:not(#_) .mywork { background: rgba(255, 255, 255, 0.035); border-color: var(--ap-line); box-shadow: none; }
body.ap-page:not(#_) .mywork-kicker { color: var(--ap-accent); }
body.ap-page:not(#_) .mywork-sub { color: var(--ap-faint); }
body.ap-page:not(#_) .mw-ico { filter: saturate(0.6) brightness(0.9); }
body.ap-page:not(#_) footer { color: var(--ap-faint); border-top-color: var(--ap-line); }

/* ---------------------------------------------------------------- the top */
main.ap-main {
    display: block; grid-template-columns: none; width: 100%; max-width: 1640px; margin: 0 auto; padding: 0 0 40px;
    box-sizing: border-box; color: var(--ap-ink);
}
main.ap-main *, main.ap-main *::before, main.ap-main *::after { box-sizing: border-box; }
main.ap-main p { margin: 0; color: inherit; font-size: inherit; }
main.ap-main h3 { margin: 0; }
[hidden] { display: none !important; }
.ap-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ap-hero {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 40px;
    padding: 34px 0 30px;
}
.ap-kicker {
    display: flex; align-items: center; gap: 10px; grid-column: 1;
    font: 600 0.72rem var(--ap-mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ap-dim);
}
.ap-rec { width: 9px; height: 9px; border-radius: 50%; background: var(--ap-accent); box-shadow: 0 0 0 0 var(--ap-accent); animation: ap-rec 2.4s ease-out infinite; }
@keyframes ap-rec { 0% { box-shadow: 0 0 0 0 rgba(229, 50, 45, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(229, 50, 45, 0); } }
main.ap-main .ap-title {
    position: relative; grid-column: 1; margin: 2px 0 0;
    font: 400 clamp(3.4rem, 10vw, 8.6rem)/0.86 var(--ap-shout); letter-spacing: 0.005em; text-transform: uppercase;
    color: var(--ap-ink);
}
/* the title arrives a little out of register, then settles: like a screen print */
.ap-title::before, .ap-title::after {
    content: attr(data-text); position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
}
.ap-title::before { color: var(--ap-accent); }
.ap-title::after { color: #3ad1ff; }
.ap-hero.is-in .ap-title::before { animation: ap-reg-a 1.4s var(--ap-ease) 0.1s both; }
.ap-hero.is-in .ap-title::after { animation: ap-reg-b 1.4s var(--ap-ease) 0.1s both; }
@keyframes ap-reg-a { 0% { opacity: 0.9; transform: translate(-7px, 2px); } 100% { opacity: 0; transform: none; } }
@keyframes ap-reg-b { 0% { opacity: 0.7; transform: translate(6px, -2px); } 100% { opacity: 0; transform: none; } }
main.ap-main .ap-intro { grid-column: 1; max-width: 40em; margin-top: 10px; font: italic 1.08rem/1.5 var(--ap-serif); color: var(--ap-dim); }
.ap-hero > * { opacity: 0; transform: translateY(10px); transition: opacity 0.8s var(--ap-ease), transform 0.8s var(--ap-ease); }
.ap-hero.is-in > * { opacity: 1; transform: none; }
.ap-hero.is-in > :nth-child(2) { transition-delay: 0.06s; }
.ap-hero.is-in > :nth-child(3) { transition-delay: 0.14s; }
.ap-hero.is-in > :nth-child(4) { transition-delay: 0.22s; }
html:not(.js) .ap-hero > * { opacity: 1; transform: none; }
.ap-stats { grid-column: 2; grid-row: 1 / span 3; display: flex; margin: 0; }
.ap-stats > div { padding: 0 18px; border-left: 1px solid var(--ap-line); }
.ap-stats > div:first-child { border-left: 0; }
.ap-stats dt { font: 600 0.64rem var(--ap-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ap-faint); }
.ap-stats dd { margin: 2px 0 0; font: 400 2.6rem/1 var(--ap-shout); font-variant-numeric: tabular-nums; color: var(--ap-ink); }

/* ---------------------------------------------------------------- the slow line of words */
.ap-ticker {
    position: relative; width: 100vw; margin: 0 calc(50% - 50vw); overflow: hidden;
    background: var(--ap-accent); color: #0d0c0b; transform: rotate(-1deg); transform-origin: center;
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
}
.ap-ticker-track { display: flex; width: max-content; animation: ap-tick 60s linear infinite; }
.ap-ticker:hover .ap-ticker-track { animation-play-state: paused; }
.ap-ticker-track > div { display: flex; align-items: center; flex: none; }
.ap-ticker span { padding: 10px 18px; font: 400 1.3rem/1 var(--ap-shout); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.ap-ticker i { font-style: normal; font-size: 0.8rem; opacity: 0.6; }
@keyframes ap-tick { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- stickers and order */
.ap-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 40px 0 8px; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chips button {
    display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 13px 6px;
    border: 1px solid var(--ap-line); border-radius: 2px; background: transparent; color: var(--ap-dim); cursor: pointer;
    font: 600 0.74rem var(--ap-mono); letter-spacing: 0.14em; text-transform: uppercase;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ap-ease);
}
.ap-chips button small { font-size: 0.68rem; opacity: 0.6; letter-spacing: 0.05em; }
.ap-chips button:hover { color: var(--ap-ink); border-color: var(--c); transform: rotate(-1.5deg); }
.ap-chips button[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #0d0c0b; transform: rotate(-1.5deg); }
.ap-chips button:active { transform: rotate(-1.5deg) scale(0.96); }
.ap-sort select {
    padding: 7px 30px 7px 12px; border: 1px solid var(--ap-line); border-radius: 2px; background: var(--ap-bg2); color: var(--ap-ink);
    font: 600 0.74rem var(--ap-mono); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}

/* ---------------------------------------------------------------- the wall */
.ap-wall { position: relative; padding: 26px 0 10px; }
.ap-wall[data-layout="wall"] { column-width: 300px; column-gap: 42px; }
.ap-wall[data-layout="grid"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 46px 40px; align-items: start; }
.ap-card {
    display: block; break-inside: avoid; margin: 0 0 48px; color: inherit; text-decoration: none; outline: none;
    opacity: 0; transform: translateY(22px) rotate(var(--t)); transition: opacity 0.9s var(--ap-ease), transform 0.9s var(--ap-ease);
    transition-delay: calc(var(--i) * 55ms);
}
.ap-wall[data-layout="grid"] .ap-card { margin: 0; }
.ap-card.is-in { opacity: 1; transform: rotate(var(--t)); }
html:not(.js) .ap-card { opacity: 1; }
.ap-paper {
    position: relative; display: block; width: 100%; overflow: visible;
    background: #1b1a17 center / cover no-repeat;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 40px -22px rgba(0, 0, 0, 0.95), 0 4px 10px -6px rgba(0, 0, 0, 0.8);
    transition: transform 0.6s var(--ap-ease), box-shadow 0.6s var(--ap-ease);
}
.ap-paper img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s ease, filter 0.6s ease; filter: saturate(0.92); }
.ap-paper img.is-loaded { opacity: 1; }
.ap-tape {
    position: absolute; top: -11px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%) rotate(calc(var(--t) * -2.2));
    background: linear-gradient(90deg, rgba(228, 220, 196, 0.42), rgba(240, 233, 210, 0.55) 40%, rgba(228, 220, 196, 0.4));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    clip-path: polygon(3% 8%, 97% 0, 100% 92%, 2% 100%, 0 55%);
    opacity: 0.9;
}
.ap-card:hover .ap-paper, .ap-card:focus-visible .ap-paper {
    transform: rotate(calc(var(--t) * -1)) translateY(-6px) scale(1.012);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 34px 60px -26px rgba(0, 0, 0, 1), 0 0 0 1px var(--c);
}
.ap-card:hover .ap-paper img { filter: saturate(1.05) contrast(1.03); }
.ap-card:focus-visible .ap-paper { outline: 2px solid var(--ap-accent); outline-offset: 6px; }
.ap-stamp {
    position: absolute; left: -8px; bottom: 16px; padding: 4px 10px 3px; transform: rotate(-4deg);
    background: var(--ap-accent); color: #0d0c0b; font: 400 0.95rem/1 var(--ap-shout); letter-spacing: 0.08em; text-transform: uppercase;
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.8);
}
.ap-stamp-new { background: var(--ap-ink); }
.ap-has-words {
    position: absolute; right: 10px; bottom: 10px; width: 26px; height: 26px; display: grid; place-items: center;
    border-radius: 50%; background: rgba(13, 12, 11, 0.72); color: var(--ap-ink); font: 700 0.85rem var(--ap-serif);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ap-cap { display: grid; gap: 4px; padding: 16px 2px 0; }
.ap-cap-title { font: 400 1.6rem/1 var(--ap-shout); letter-spacing: 0.02em; text-transform: uppercase; }
.ap-cap-tag { font: italic 0.98rem/1.35 var(--ap-serif); color: var(--ap-dim); }
.ap-cap-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 4px; font: 600 0.64rem var(--ap-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ap-faint); }
.ap-cap-meta i { display: inline-block; width: 8px; height: 8px; margin-right: -6px; vertical-align: 0; }
.ap-cap-meta em { font-style: normal; }
.ap-card:hover .ap-cap-title { color: var(--c); transition: color 0.3s ease; }

.ap-loading { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px; }
.ap-loading i { aspect-ratio: 3 / 4; background: linear-gradient(100deg, #161513 30%, #1e1c19 50%, #161513 70%) 0 0 / 300% 100%; animation: ap-shimmer 1.6s linear infinite; }
@keyframes ap-shimmer { to { background-position: -150% 0; } }
main.ap-main .ap-empty { padding: 60px 0; font: 400 2rem var(--ap-shout); text-transform: uppercase; color: var(--ap-faint); text-align: center; }
main.ap-main .ap-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--ap-line); font: 0.72rem var(--ap-mono); letter-spacing: 0.08em; color: var(--ap-faint); }
.ap-foot a { color: var(--ap-dim); }
.ap-foot a:hover { color: var(--ap-accent); }

/* ---------------------------------------------------------------- one poster, big */
.ap-viewer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.av-backdrop { position: absolute; inset: 0; background: rgba(8, 7, 6, 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.45s ease; }
.ap-viewer.is-open .av-backdrop { opacity: 1; }
.av-frame {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: center;
    width: min(1500px, 100vw); height: 100vh; height: 100dvh; padding: 56px 84px 48px; gap: 48px;
}
.ap-viewer.has-words .av-frame { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); justify-items: stretch; }
.av-figure { margin: 0; display: grid; place-items: center; height: 100%; min-height: 0; min-width: 0; }
.av-figure img {
    display: block; max-width: 100%; max-height: calc(100dvh - 110px); width: auto; height: auto;
    background: #1b1a17 center / cover no-repeat;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 1), 0 0 0 1px rgba(255, 255, 255, 0.05);
    will-change: transform;
}
.av-side {
    position: relative; align-self: stretch; overflow: auto; padding: 30px 6px 30px 0; max-height: calc(100dvh - 104px);
    scrollbar-width: thin; scrollbar-color: #3a3631 transparent;
    opacity: 0; transform: translateX(18px); transition: opacity 0.6s var(--ap-ease) 0.18s, transform 0.6s var(--ap-ease) 0.18s;
}
.ap-viewer.is-open .av-side { opacity: 1; transform: none; }
.ap-viewer.is-closing .av-side { transition-delay: 0s; transition-duration: 0.2s; }
.av-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font: 600 0.68rem var(--ap-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ap-faint); }
.av-cat { padding: 4px 9px 3px; background: var(--c); color: #0d0c0b; transform: rotate(-2deg); }
.av-title { margin: 14px 0 0 !important; font: 400 clamp(2.4rem, 4.4vw, 4.2rem)/0.9 var(--ap-shout); text-transform: uppercase; letter-spacing: 0.01em; color: var(--ap-ink); }
.av-tagline { margin-top: 10px !important; font: italic 1.2rem/1.4 var(--ap-serif); color: var(--c); }
.av-statement { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ap-line); font: 1.06rem/1.75 var(--ap-serif); color: #dcd7cd; }
.av-statement p { margin: 0 0 1.1em !important; }
.av-statement p:first-child::first-letter { float: left; margin: 0.06em 0.1em 0 0; font: 400 3.4em/0.8 var(--ap-shout); color: var(--c); }
.av-statement strong { color: var(--ap-ink); }
.av-statement a { color: var(--c); text-underline-offset: 3px; }
.av-statement blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1em; border-left: 3px solid var(--c); font: 400 1.6rem/1.1 var(--ap-shout); text-transform: uppercase; color: var(--ap-ink); }
.av-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.av-links a { display: inline-block; padding: 6px 11px; border: 1px solid var(--ap-line); color: var(--ap-ink); text-decoration: none; font: 600 0.72rem var(--ap-mono); letter-spacing: 0.08em; transition: border-color 0.2s ease, color 0.2s ease; }
.av-links a:hover { border-color: var(--c); color: var(--c); }

.av-specs { margin-top: 30px; padding: 18px 18px 16px; border: 1px solid var(--ap-line); background: rgba(255, 255, 255, 0.02); position: relative; }
.av-specs::before { content: ""; position: absolute; top: -1px; left: -1px; width: 38px; height: 3px; background: var(--c); }
.av-specs-title { margin-bottom: 14px !important; font: 600 0.66rem var(--ap-mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ap-faint); }
.av-palette { display: flex; height: 38px; margin-bottom: 16px; gap: 3px; }
.av-palette button {
    position: relative; flex: 1 1 0; min-width: 18px; padding: 0; border: 0; cursor: pointer; background: var(--sw);
    transform-origin: bottom; animation: ap-swatch 0.6s var(--ap-ease) both; animation-delay: var(--d);
    transition: flex-grow 0.3s var(--ap-ease);
}
.av-palette button span { position: absolute; left: 0; top: calc(100% + 4px); font: 0.6rem var(--ap-mono); color: var(--ap-faint); opacity: 0; transition: opacity 0.2s ease; white-space: nowrap; }
.av-palette button:hover span, .av-palette button.is-copied span { opacity: 1; }
.av-palette button.is-copied span::after { content: " copied"; color: var(--ap-ink); }
@keyframes ap-swatch { from { transform: scaleY(0); } to { transform: none; } }
.av-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 8px 0 0; }
.av-grid div { min-width: 0; }
.av-grid dt { font: 600 0.6rem var(--ap-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ap-faint); }
.av-grid dd { margin: 3px 0 0; font: 0.84rem/1.35 var(--ap-mono); color: var(--ap-ink); overflow-wrap: anywhere; }
.av-meters { display: grid; gap: 8px; margin-top: 16px; }
.av-meter { display: grid; grid-template-columns: 70px 1fr 32px; align-items: center; gap: 10px; font: 0.68rem var(--ap-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ap-faint); }
.av-meter b { position: relative; height: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.av-meter b i { position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--c); transform-origin: left; animation: ap-meter 0.9s var(--ap-ease) both; animation-delay: var(--d); }
.av-meter em { font-style: normal; color: var(--ap-ink); text-align: right; }
@keyframes ap-meter { from { transform: scaleX(0); } to { transform: none; } }
.av-tags { margin-top: 18px !important; font: 0.74rem var(--ap-mono); color: var(--ap-faint); }
.av-tags span { margin-right: 8px; }
.av-actions { display: flex; gap: 8px; margin-top: 20px; }
.av-btn {
    padding: 9px 14px; border: 1px solid var(--ap-ink); background: var(--ap-ink); color: #0d0c0b; cursor: pointer; text-decoration: none;
    font: 600 0.72rem var(--ap-mono); letter-spacing: 0.14em; text-transform: uppercase; transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease;
}
.av-btn:hover { background: var(--c); border-color: var(--c); }
.av-btn:active { transform: translateY(1px) scale(0.98); }
.av-btn + .av-btn { background: transparent; color: var(--ap-ink); }

.av-nav, .av-close {
    position: absolute; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
    border: 1px solid var(--ap-line); border-radius: 50%; background: rgba(13, 12, 11, 0.6); color: var(--ap-ink); cursor: pointer;
    opacity: 0; transition: opacity 0.4s ease 0.15s, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.ap-viewer.is-open .av-nav, .ap-viewer.is-open .av-close { opacity: 1; }
.av-nav svg, .av-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.av-nav:hover, .av-close:hover { background: var(--ap-accent); border-color: var(--ap-accent); color: #0d0c0b; }
.av-nav:active, .av-close:active { transform: scale(0.94); }
.av-prev { left: 18px; top: 50%; margin-top: -24px; }
.av-next { right: 18px; top: 50%; margin-top: -24px; }
.av-close { top: 16px; right: 18px; }
.av-count { position: absolute; left: 22px; top: 26px; z-index: 2; font: 600 0.7rem var(--ap-mono); letter-spacing: 0.2em; color: var(--ap-faint); opacity: 0; transition: opacity 0.4s ease; }
.ap-viewer.is-open .av-count { opacity: 1; }

/* ---------------------------------------------------------------- phones and small windows */
@media (max-width: 980px) {
    .ap-viewer.has-words .av-frame, .ap-viewer:not(.has-words) .av-frame { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; min-height: 100dvh; padding: 70px 18px 40px; gap: 26px; align-content: start; }
    .ap-viewer { overflow: auto; place-items: start center; }
    .av-figure img, .ap-viewer:not(.has-words) .av-figure img { max-height: 72dvh; }
    .av-side, .ap-viewer:not(.has-words) .av-side { max-height: none; overflow: visible; padding: 0; display: block; transform: translateY(14px); }
    .ap-viewer:not(.has-words) .av-specs { margin-top: 24px; }
    .av-nav { top: auto; bottom: 16px; margin: 0; position: fixed; }
    .av-close { position: fixed; }
}
@media (max-width: 700px) {
    .ap-hero { grid-template-columns: 1fr; padding-top: 18px; }
    .ap-stats { grid-column: 1; grid-row: auto; margin-top: 16px; }
    .ap-stats > div:first-child { padding-left: 0; }
    .ap-wall[data-layout="wall"] { column-width: auto; column-count: 2; column-gap: 18px; }
    .ap-wall[data-layout="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
    .ap-card { margin-bottom: 34px; }
    .ap-cap-title { font-size: 1.15rem; }
    .ap-cap-tag { font-size: 0.86rem; }
    .ap-tape { width: 62px; height: 18px; top: -8px; }
    .ap-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding: 4px 2px; }
    .ap-chips::-webkit-scrollbar { display: none; }
    .ap-chips button { flex: none; }
    .ap-ticker span { font-size: 1.05rem; padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .ap-grain, .ap-rec, .ap-ticker-track, .ap-loading i, .av-palette button, .av-meter b i { animation: none !important; }
    .ap-card, .ap-hero > *, .av-side, .ap-paper { transition: none !important; opacity: 1; }
    .ap-title::before, .ap-title::after { display: none; }
}

/* the site's own paragraph style, undone inside the viewer */
.ap-viewer p:not(#_) { color: inherit; font-size: inherit; line-height: inherit; margin: 0; }
.ap-viewer .av-statement p:not(#_) { margin: 0 0 1.1em; }
.ap-viewer .av-statement { color: #dcd7cd; }
.av-side { min-width: 0; }
@media (min-width: 981px) { .ap-viewer.has-words .av-frame { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); } }
.ap-viewer, .ap-viewer *, .ap-viewer *::before, .ap-viewer *::after { box-sizing: border-box; }
.ap-viewer .av-tagline:not(#_) { color: var(--c); }
.ap-viewer .av-meta:not(#_), .ap-viewer .av-count:not(#_), .ap-viewer .av-tags:not(#_), .ap-viewer .av-specs-title:not(#_) { color: var(--ap-faint); }
.ap-viewer .av-tagline:not(#_) { margin-top: 10px; }
.ap-viewer .av-specs-title:not(#_) { margin-bottom: 14px; }
.ap-viewer .av-tags:not(#_) { margin-top: 18px; }
@media (max-width: 980px) {
    .av-nav { width: 40px; height: 40px; bottom: 14px; background: rgba(13, 12, 11, 0.82); z-index: 5; }
    .av-prev { left: 12px; } .av-next { right: 12px; }
    .av-frame { padding-bottom: 80px !important; }
}
/* keep the tape inside the card, so a column never ends with a stray strip of it */
.ap-card { padding-top: 14px; }
@media (max-width: 980px) { .av-figure { height: auto; } }

/* a poster without a statement: the same two columns, the details beside it,
   centred next to the picture */
@media (min-width: 981px) {
    .ap-viewer:not(.has-words) .av-frame { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); justify-items: stretch; }
    .ap-viewer:not(.has-words) .av-side { align-self: center; max-height: calc(100dvh - 104px); }
    .ap-viewer:not(.has-words) .av-specs { margin-top: 26px; }
}

/* the viewer keeps its scrolling to itself */
.ap-viewer, .av-side { overscroll-behavior: contain; }

/* ---------------------------------------------------------------- phones: the open poster
   On phones the viewer scrolls (picture, then the words). The dark layer behind it
   stays put while you scroll, so the page never shows through, and it softly blurs
   the wall behind instead of hiding it. */
.av-frame { position: relative; z-index: 1; }
@media (max-width: 980px) {
    .av-backdrop {
        position: fixed; inset: 0;
        background: rgba(8, 7, 6, 0.66);
        -webkit-backdrop-filter: blur(22px) saturate(0.8); backdrop-filter: blur(22px) saturate(0.8);
    }
    .av-count { position: fixed; top: 22px; left: 14px; padding: 7px 11px; border-radius: 999px; background: rgba(13, 12, 11, 0.9); z-index: 5; }
}
/* the little "back to top" heart hides while a poster is open, so it never covers the arrows */
html.ap-locked .ls-up, html.ap-locked .ls-line { opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 980px) { .av-close { z-index: 5; } }
