/* Temporary gallery study: the paintings form the space. */
.gallery-intro{display:flex;align-items:baseline;justify-content:space-between;gap:24px;padding:40px var(--gutter) 0}
.gallery-intro h1{font:clamp(44px,5vw,76px)/1 var(--display);letter-spacing:-.025em}
.original-view{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-size:14px}.original-view svg{width:18px;height:18px}
.depth-gallery{position:relative;margin-top:16px;outline-offset:-4px;touch-action:pan-y pinch-zoom}
.depth-track{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:24px var(--gutter)}
.depth-art{display:block}.depth-art img{width:100%;height:auto}.depth-work{min-width:0}
.gallery-ready .depth-gallery{height:clamp(360px,62svh,700px);overflow:hidden;isolation:isolate}
/* Let rear planes receive clicks instead of the transparent track plane. */
.gallery-ready .depth-track{position:relative;width:100%;height:100%;display:block;padding:0;perspective:1100px;transform-style:preserve-3d;pointer-events:none}
.gallery-ready .depth-work{position:absolute;top:50%;left:50%;height:76%;width:auto;aspect-ratio:5/7;margin:0;transform:translate(-50%,-50%) translate3d(var(--x),var(--y),var(--z)) rotateY(var(--angle));transform-style:preserve-3d;transition:transform 600ms var(--ease);z-index:var(--layer)}
.gallery-ready .depth-art{height:100%;width:100%;display:flex;justify-content:center;align-items:center;cursor:pointer;outline-offset:8px}
.gallery-ready .depth-art img{height:100%;width:100%;object-fit:contain;filter:url(#art-grain) drop-shadow(0 16px 18px rgba(57,23,20,.13));user-select:none}
.gallery-ready .depth-work.is-current .depth-art{cursor:pointer}
.gallery-ready .depth-work figcaption{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;white-space:nowrap}
.gallery-controls{padding:4px var(--gutter) 0;display:flex;justify-content:space-between;align-items:center;gap:28px;max-width:1100px;margin:auto}.gallery-controls[hidden]{display:none}
.gallery-current{min-width:0}.gallery-count{font-size:13px;font-variant-numeric:tabular-nums;color:var(--muted);margin-bottom:8px}.gallery-title{font:clamp(26px,3vw,40px)/1.1 var(--display);text-wrap:balance}
.gallery-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}.gallery-actions button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;min-width:52px;background:none;border:0;padding:12px}.gallery-actions .gallery-open{background:var(--ink);color:var(--paper);padding-inline:22px;font-size:14px}.gallery-previous svg{transform:rotate(180deg)}.gallery-actions button:hover{background:var(--ink);color:var(--paper)}
.gallery-hint{font-size:13px;color:var(--muted);padding:24px var(--gutter) 32px;text-align:center;line-height:1.5}.gallery-ready .gallery-hint{margin-top:8px}
@media(max-width:767px){
 .gallery-intro{display:block;padding-top:24px}.gallery-intro h1{font-size:46px}.original-view{font-size:13px;margin-top:8px;gap:8px}
 .gallery-ready .depth-gallery{height:clamp(300px,49svh,500px);margin-top:0}
 .gallery-ready .depth-track{perspective:900px}
 .gallery-ready .depth-work{height:82%;max-width:65vw}
 .gallery-controls{display:flex;flex-direction:column;align-items:stretch;gap:24px;padding-top:8px}
 .gallery-current{text-align:center}.gallery-count{margin-bottom:8px}.gallery-title{font-size:30px}
 .gallery-actions{justify-content:center;gap:8px}.gallery-actions .gallery-open{flex:1;max-width:200px;padding-inline:16px;white-space:nowrap}
 .gallery-hint{max-width:320px;margin:auto;font-size:13px;padding-top:20px}
 .depth-track{grid-template-columns:1fr 1fr}
}
@media(max-width:767px) and (max-height:500px){.gallery-intro{padding-top:12px;display:flex}.gallery-intro h1{font-size:36px}.original-view{margin:0}.gallery-ready .depth-gallery{height:280px}.gallery-controls{flex-direction:row}.gallery-current{text-align:left}.gallery-title{font-size:24px}}
@media(prefers-reduced-motion:reduce){.gallery-ready .depth-work{transition:none}}

.depth-art img{filter:url(#art-grain)}

.depth-art{position:relative;pointer-events:auto}.depth-art .view-mark{display:none}
@media(min-width:768px){
 .gallery-ready .depth-art .view-mark{display:flex}
 .gallery-ready .depth-art:hover .view-mark,.gallery-ready .depth-art:focus-visible .view-mark{opacity:1;transform:none}
}

@media(min-width:768px){
 .gallery-ready .depth-work:not(.is-current) .view-mark{width:44px;height:44px;padding:0;border-radius:50%}
 .gallery-ready .depth-work:not(.is-current) .view-label{display:none}
 .gallery-ready .depth-work.is-left:not(.is-current) .view-mark{left:12px;right:auto}
 .gallery-ready .depth-work:not(.is-current) .depth-art:focus-visible{outline:2px solid var(--ink)}
}

/* Same collection, two visitor-controlled views. */
.gallery-options{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.view-switch{display:flex;align-items:center;gap:4px;padding:4px;background:#e5e0d9;border-radius:999px}.view-switch[hidden]{display:none}
.view-switch button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:0;border-radius:999px;background:transparent;color:var(--ink);font-size:14px;white-space:nowrap}
.view-switch button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}.view-switch svg{width:18px;height:18px}
.gallery-ready.is-grid .depth-gallery{height:auto;overflow:visible;isolation:auto;margin-top:24px;touch-action:auto}
.gallery-ready.is-grid .depth-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:48px 32px;position:static;height:auto;max-width:1480px;margin-inline:auto;padding:0 var(--gutter) 56px;perspective:none;transform-style:flat;pointer-events:auto;align-items:start}
.gallery-ready.is-grid .depth-work{position:static;width:100%;height:auto;max-width:340px;justify-self:center;aspect-ratio:auto;transform:none;transform-style:flat;transition:none;z-index:auto}
.gallery-ready.is-grid .depth-art{display:block;height:auto;aspect-ratio:5/7;outline-offset:6px}
.gallery-ready.is-grid .depth-art img{width:100%;height:100%;object-fit:contain;filter:url(#art-grain)}
.gallery-ready.is-grid .depth-work figcaption{position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal;display:block;font-size:22px;padding-top:12px}
.gallery-ready.is-grid .depth-art .view-mark{display:flex;left:auto;right:12px}
.gallery-ready.is-grid .gallery-hint{display:none}
@media(min-width:768px){
 .gallery-ready.is-grid .depth-work:not(.is-current) .view-mark{width:auto;height:48px;padding:0 16px;border-radius:999px}
 .gallery-ready.is-grid .depth-work .view-label{display:block}
}
@media(max-width:1100px) and (min-width:768px){.gallery-intro{align-items:flex-start}.gallery-options{justify-content:flex-end;gap:8px 16px}}
@media(max-width:767px){
 .gallery-options{margin-top:20px;gap:12px;justify-content:space-between}.gallery-options .original-view{margin:0}
 .view-switch button{padding:10px 12px;font-size:13px}
 .gallery-ready.is-grid .depth-track{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 14px;padding-bottom:40px}
 .gallery-ready.is-grid .depth-work figcaption{font-size:20px;line-height:1.2;padding-top:10px}
 .gallery-ready.is-grid .view-mark{width:36px;height:36px;right:8px;bottom:8px}
}

@media(min-width:1200px){.gallery-ready.is-grid .depth-track{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* The carousel introduces the homepage; the complete collection follows. */
.all-works-link{display:inline-flex;align-items:center;gap:12px;min-height:48px;font-size:16px}.all-works-link svg{width:20px;height:20px}
.home-page .work-section{padding-top:80px}.home-page .home-gallery .gallery-hint{padding-bottom:0}
@media(max-width:767px){.home-page .gallery-intro{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:center}.home-page .gallery-intro h1{font-size:40px}.all-works-link{font-size:14px}.home-page .work-section{padding-top:56px}}

.home-page .gallery-intro{align-items:center}.home-page.is-grid .curated-pair,.home-page.is-grid .curated-further,.home-page.is-grid .curated-work>h2,.home-page.is-grid .collection-link{display:none}.home-page.is-grid .curated-work{padding-top:0}.home-page.is-grid .painting-note{margin-top:32px;margin-bottom:24px}
@media(max-width:767px){.home-page .gallery-intro .view-switch{margin-top:8px}.home-page.is-grid .painting-note{margin-top:24px}}

.gallery-ready .depth-art img[data-medium="analogue"]{filter:drop-shadow(0 16px 18px rgba(57,23,20,.13))}.gallery-ready.is-grid .depth-art img[data-medium="analogue"]{filter:none}

/* Medium and presentation are independent choices. */
.gallery-filters{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px var(--gutter) 0}.gallery-filters[hidden]{display:none}.medium-filter{display:flex;flex-wrap:wrap;gap:8px}.medium-filter button{border:0;border-radius:999px;min-height:44px;padding:10px 20px;background:#e5e0d9;font-size:15px;transition:background 180ms var(--ease),color 180ms var(--ease)}.medium-filter button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}.medium-filter button:hover{background:#d7cfc6}.medium-filter button[aria-pressed="true"]:hover{background:var(--dark)}.filter-result{font-size:14px;color:var(--muted);white-space:nowrap}.depth-work[hidden],.depth-gallery[hidden]{display:none!important}.gallery-empty{padding:96px var(--gutter);font:36px/1.2 var(--display)}.gallery-empty[hidden]{display:none}
.home-page[data-medium-filter]:not([data-medium-filter="all"]) .curated-pair,.home-page[data-medium-filter]:not([data-medium-filter="all"]) .curated-further,.home-page[data-medium-filter]:not([data-medium-filter="all"]) .curated-work>h2,.home-page[data-medium-filter]:not([data-medium-filter="all"]) .collection-link{display:none}.home-page[data-medium-filter]:not([data-medium-filter="all"]) .curated-work{padding-top:24px}.home-page[data-medium-filter]:not([data-medium-filter="all"]) .painting-note{margin-top:32px}
@media(max-width:767px){.gallery-filters{align-items:flex-start;gap:12px;padding-top:20px;flex-wrap:wrap}.medium-filter{gap:8px}.medium-filter button{padding:10px 15px;font-size:14px}.filter-result{width:100%;font-size:13px}.gallery-filters+.depth-gallery{margin-top:8px}}

:root[data-theme="dark"] .view-switch,:root[data-theme="dark"] .medium-filter button{background:#3a2922}:root[data-theme="dark"] .medium-filter button:hover{background:#4a352c}:root[data-theme="dark"] .view-switch button[aria-pressed="true"],:root[data-theme="dark"] .medium-filter button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}

/* The title row frames the active painting, with arrows just beyond its width. */
.gallery-controls{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;grid-template-rows:auto auto auto;align-items:center;justify-content:stretch;gap:8px 24px;width:min(calc(var(--front-card-width,420px) + 152px),calc(100% - 2 * var(--gutter)));max-width:none;padding:8px 0 0;margin-inline:auto}
.gallery-controls>.gallery-count{grid-column:2;grid-row:1;text-align:center;margin:0}.gallery-current{grid-column:2;grid-row:2;text-align:center;min-width:0}.gallery-actions{grid-column:2;grid-row:3;justify-content:center}
.gallery-controls>.gallery-previous,.gallery-controls>.gallery-next{display:flex;align-items:center;justify-content:center;grid-row:2;width:52px;height:52px;min-width:52px;padding:14px;background:transparent;color:var(--ink);border:0;border-radius:50%;transition:background 180ms var(--ease)}.gallery-controls>.gallery-previous{grid-column:1}.gallery-controls>.gallery-next{grid-column:3}.gallery-controls>.gallery-previous svg{transform:rotate(180deg)}.gallery-controls>button:hover{background:rgba(112,92,86,.12)}
.gallery-actions .gallery-open{background:transparent;color:var(--ink);padding:8px 12px;min-height:44px;font-size:15px;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px;max-width:none;flex:none}.gallery-actions .gallery-open:hover{background:transparent;color:var(--ink);text-decoration-thickness:2px}.gallery-open svg{width:18px;height:18px}
.gallery-ready:not(.is-grid) .depth-work.is-current .view-mark{background:var(--paper);color:var(--ink)}
.gallery-intro,.gallery-filters,.depth-gallery,.gallery-hint{max-width:var(--content-max);margin-inline:auto}.gallery-ready.is-grid .depth-track{max-width:var(--content-max)}
@media(max-width:767px){.gallery-controls{grid-template-columns:48px minmax(0,1fr) 48px;column-gap:8px;width:calc(100% - 24px)}.gallery-controls>.gallery-previous,.gallery-controls>.gallery-next{width:48px;height:48px;min-width:48px;padding:13px}.gallery-title{font-size:28px}.gallery-hint{padding-top:12px}}

/* Caption and opening action share one row inside the arrow pair. */
.gallery-controls{grid-template-columns:52px minmax(0,1fr) auto 52px;grid-template-rows:auto auto;column-gap:12px}
.gallery-controls>.gallery-count{grid-column:2;text-align:left}.gallery-current{grid-column:2;grid-row:2;text-align:left}.gallery-title{font-size:32px;text-wrap:pretty}.gallery-actions{grid-column:3;grid-row:2;justify-content:flex-end}.gallery-controls>.gallery-next{grid-column:4}.gallery-actions .gallery-open{white-space:nowrap;padding-inline:0}
@media(max-width:767px){.gallery-controls{grid-template-columns:44px minmax(0,1fr) auto 44px;column-gap:4px;width:calc(100% - 16px)}.gallery-controls>.gallery-previous,.gallery-controls>.gallery-next{width:44px;height:48px;min-width:44px;padding:12px}.gallery-title{font-size:24px;line-height:1.15}.gallery-actions .gallery-open{font-size:13px;gap:6px;padding:8px 0}.gallery-open svg{width:16px;height:16px}}

/* Orientation is an image rotation, never an enlargement or a source swap. */
.gallery-ready .depth-work{transition:transform 720ms cubic-bezier(.22,1,.36,1)}
.depth-work [data-work="34"] img,.depth-work [data-work="59"] img{transform:rotate(0deg);transition:transform 720ms cubic-bezier(.22,1,.36,1)}
.gallery-ready:not(.is-grid) .depth-work.is-landscape img{transform:rotate(90deg) scale(calc(var(--turn-scale,1)*var(--format-scale,1)))}
@media(prefers-reduced-motion:reduce){.gallery-ready .depth-work,.depth-work [data-work="34"] img{transition:none}}

.gallery-ready .depth-gallery.changing-layout .depth-work,.gallery-ready .depth-gallery.changing-layout .depth-work img{transition:none}
/* Navigation follows the content frame; the opening link follows the painting. */
.gallery-controls{position:relative;width:100%;max-width:var(--content-max);padding:4px var(--gutter) 0;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:52px auto auto;gap:8px 24px}
.gallery-controls>.gallery-previous{grid-column:1;grid-row:1;justify-self:start;margin-left:-14px}
.gallery-controls>.gallery-next{grid-column:2;grid-row:1;justify-self:end;margin-right:-14px}
.gallery-controls>.gallery-count{grid-column:1;grid-row:2;text-align:left}
.gallery-current{grid-column:1;grid-row:3;max-width:max(200px,calc(50% - var(--front-card-width,420px)/2 - 24px))}
.gallery-actions{position:absolute;right:max(var(--gutter),calc((100% - var(--front-card-width,420px))/2));bottom:0;min-height:44px;align-items:center}
@media(max-width:767px){.gallery-controls{width:100%;padding-inline:var(--gutter);grid-template-rows:48px auto auto;gap:8px 16px}.gallery-controls>.gallery-previous{margin-left:-12px}.gallery-controls>.gallery-next{margin-right:-12px}.gallery-current{max-width:calc(100% - 124px)}.gallery-actions{right:var(--gutter);bottom:0}.gallery-title{font-size:24px}}
.gallery-actions{grid-area:auto}

/* The full-depth gallery returns; glass is reserved for its controls. */
:root{--gallery-glass:rgba(240,238,234,.74);--gallery-glass-hover:rgba(240,238,234,.9);--gallery-glass-edge:rgba(57,23,20,.16)}
:root[data-theme="dark"]{--gallery-glass:rgba(33,20,16,.76);--gallery-glass-hover:rgba(58,41,34,.92);--gallery-glass-edge:rgba(240,238,234,.24)}
.gallery-ready .gallery-controls>.gallery-previous,.gallery-ready .gallery-controls>.gallery-next,.gallery-ready .gallery-actions .gallery-open,.gallery-ready:not(.is-grid) .depth-work.is-current .view-mark{
 background:var(--paper);color:var(--ink);border:1px solid var(--gallery-glass-edge);border-radius:999px;
}
.gallery-ready .gallery-actions .gallery-open{padding:10px 16px;text-decoration:none;font-size:14px;gap:8px}
.gallery-ready .gallery-controls>.gallery-previous:hover,.gallery-ready .gallery-controls>.gallery-next:hover,.gallery-ready .gallery-actions .gallery-open:hover{background:var(--gallery-glass-hover)}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
 .gallery-ready .gallery-controls>.gallery-previous,.gallery-ready .gallery-controls>.gallery-next,.gallery-ready .gallery-actions .gallery-open,.gallery-ready:not(.is-grid) .depth-work.is-current .view-mark{background:var(--gallery-glass);-webkit-backdrop-filter:blur(14px) saturate(1.12);backdrop-filter:blur(14px) saturate(1.12)}
 .gallery-ready .gallery-controls>.gallery-previous:hover,.gallery-ready .gallery-controls>.gallery-next:hover,.gallery-ready .gallery-actions .gallery-open:hover{background:var(--gallery-glass-hover)}
}
@media(max-width:767px){.gallery-ready .gallery-actions .gallery-open{font-size:13px;padding:10px 12px;gap:6px}.gallery-current{max-width:calc(100% - 154px)}}
@media(prefers-reduced-transparency:reduce){.gallery-ready .gallery-controls>.gallery-previous,.gallery-ready .gallery-controls>.gallery-next,.gallery-ready .gallery-actions .gallery-open,.gallery-ready:not(.is-grid) .depth-work.is-current .view-mark{background:var(--paper);-webkit-backdrop-filter:none;backdrop-filter:none}}

.gallery-initializing .depth-work{transition:none!important}

/* Fade an opaque painting towards the page colour using a separate veil. */
:root{--veil-rgb:240,238,234}
:root[data-theme="dark"]{--veil-rgb:33,20,16}
.artwork-veil{display:none}
.gallery-ready:not(.is-grid) .artwork-veil{display:block;position:absolute;inset:var(--veil-y,0px) var(--veil-x,0px);pointer-events:none;background:rgb(var(--veil-rgb));opacity:var(--veil-strength,0);transition:opacity 720ms cubic-bezier(.22,1,.36,1)}
.gallery-ready:not(.is-grid) .is-current .artwork-veil{opacity:0}
@media(prefers-reduced-motion:reduce){.artwork-veil{transition:none!important}}



/* Keep the active photograph clean, without the legacy grain or image filters. */
.gallery-ready:not(.is-grid) .depth-work.is-current .depth-art img{filter:none}

/* Compact mobile gallery tools, with artwork close beneath the filters. */
@media(max-width:767px){
 .gallery-intro,.home-page .gallery-intro{padding-top:16px;gap:12px;align-items:flex-start}
 .gallery-intro h1,.home-page .gallery-intro h1{font-size:36px;line-height:1.05}
 .gallery-options{margin-top:12px;gap:8px}
 .gallery-study .gallery-options .original-view{display:none}
 .view-switch{padding:3px;gap:2px}
 .view-switch button{min-height:44px;padding:8px 12px;font-size:13px;gap:6px}
 .view-switch svg{width:16px;height:16px}
 .home-page .gallery-intro .view-switch{margin-top:0}
 .gallery-filters{gap:6px;padding-top:12px}
 .medium-filter{width:100%;flex-wrap:nowrap;gap:6px}
 .medium-filter button{flex:1;min-width:44px;min-height:44px;padding:9px 7px;font-size:13px;white-space:nowrap}
 .filter-result{width:100%;text-align:right;font-size:12px;line-height:1.3}
 .gallery-ready .gallery-filters+.depth-gallery{margin-top:0}
 .gallery-ready.is-grid .depth-gallery{margin-top:12px}
}

/* Hover motion alone signals selection in the carousel; the opening CTA stays below. */
.gallery-ready:not(.is-grid) .depth-art .view-mark{display:none}
@media(min-width:768px) and (hover:hover) and (pointer:fine){
 .gallery-ready:not(.is-grid) .depth-art{transform:translateY(0) scale(1);transition:transform 360ms cubic-bezier(.22,1,.36,1);transform-origin:center}
 .gallery-ready:not(.is-grid) .depth-work:not(.is-current):hover .depth-art,.gallery-ready:not(.is-grid) .depth-work:not(.is-current) .depth-art:focus-visible{transform:translateY(-16px)}
 .gallery-ready:not(.is-grid) .depth-work.is-current:hover .depth-art,.gallery-ready:not(.is-grid) .depth-work.is-current .depth-art:focus-visible{transform:translateY(-4px) scale(1.025)}
}
@media(prefers-reduced-motion:reduce){.gallery-ready:not(.is-grid) .depth-art{transform:none!important;transition:none!important}}

.gallery-ready:not(.is-grid) .depth-work.is-current .depth-art:focus{outline:none}
.gallery-ready:not(.is-grid) .depth-work.is-current .depth-art:focus-visible img{outline:2px solid var(--ink);outline-offset:8px}

/* Let outgoing paintings finish their movement instead of clipping at the content frame. */
.gallery-ready:not(.is-grid){overflow-x:clip}
.gallery-ready:not(.is-grid) .depth-gallery{overflow:visible}
.gallery-exit-ghost,.gallery-exit-ghost .depth-art{pointer-events:none!important}
/* A bounded visible stack keeps the full collection quietly circulating behind it. */
.gallery-ready:not(.is-grid) .depth-work{visibility:visible;transition:transform 720ms cubic-bezier(.22,1,.36,1),visibility 0s}
.gallery-ready:not(.is-grid) .depth-work.is-stack-distant{visibility:hidden;pointer-events:none;transition:transform 720ms cubic-bezier(.22,1,.36,1),visibility 0s 720ms}
.gallery-ready:not(.is-grid) .filter-result{visibility:hidden}

@media(prefers-reduced-motion:reduce){.gallery-ready:not(.is-grid) .depth-work{transition:none!important}}

/* Browse beside the stack; read the caption along the painting's own edges. */
.gallery-ready .carousel-navigation{position:absolute;inset:0 var(--gutter);display:flex;align-items:center;justify-content:space-between;pointer-events:none;z-index:100}
.gallery-ready .carousel-navigation[hidden]{display:none}
.gallery-ready .carousel-navigation button{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;min-width:48px;padding:12px;pointer-events:auto;background:var(--paper);color:var(--ink);border:1px solid var(--gallery-glass-edge);border-radius:50%;box-shadow:none;transition:background 180ms ease,transform 180ms ease}
.gallery-ready .carousel-navigation button:hover{background:var(--gallery-glass-hover);transform:scale(1.06)}
.gallery-ready .carousel-navigation button:active{transform:scale(.96)}
.gallery-ready .carousel-navigation button:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.gallery-ready .carousel-navigation svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5}
.gallery-ready .gallery-controls{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title count" "meta meta";grid-template-rows:auto auto;gap:4px 16px;align-items:baseline;width:var(--front-card-width,320px);max-width:calc(100% - 2*var(--gutter));margin:var(--caption-offset,16px) auto 0;padding:0 0 28px}
.gallery-ready .gallery-controls[hidden]{display:none}
.gallery-ready .gallery-current{grid-area:title;min-width:0;max-width:none;text-align:left;margin:0}
.gallery-ready .gallery-title{font-size:clamp(22px,2vw,28px);line-height:1.15;text-wrap:pretty}
.gallery-ready .gallery-controls>.gallery-count{grid-area:count;min-width:7ch;text-align:right;margin:0;font-size:12px;line-height:1.5;white-space:nowrap}
.gallery-ready .gallery-title .gallery-open{display:flex;align-items:flex-start;justify-content:flex-start;width:100%;min-width:0;min-height:44px;padding:0;background:transparent;color:inherit;border:0;border-radius:0;font:inherit;text-align:left;line-height:inherit;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.gallery-ready .gallery-title-text{min-width:0}
.gallery-ready .gallery-title .gallery-open:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px}
.gallery-ready .gallery-hint{display:none}
@media(max-width:767px){
 .gallery-ready .carousel-navigation{inset-inline:12px}
 .gallery-ready .carousel-navigation button{width:44px;height:44px;min-width:44px;padding:11px}
 .gallery-ready .gallery-controls{gap:4px 12px}
 .gallery-ready .gallery-title{font-size:23px}
}
@media(prefers-reduced-motion:reduce){.gallery-ready .carousel-navigation button{transition:none;transform:none}}

/* Plain arrows sit outside the content frame while keeping generous invisible targets. */
.gallery-ready .carousel-navigation{inset:auto;top:0;left:50%;width:min(calc(100vw - 32px),calc(var(--content-max) + 128px));height:100%;transform:translateX(-50%)}
.gallery-ready .carousel-navigation button{background:transparent;border:0;border-radius:0}
.gallery-ready .carousel-navigation button:hover{background:transparent;transform:none}
.gallery-ready .carousel-navigation .gallery-previous:hover{transform:translateX(-3px)}
.gallery-ready .carousel-navigation .gallery-next:hover{transform:translateX(3px)}
.gallery-ready:not(.is-grid) .depth-art img{transform:scale(var(--format-scale,1));transition:transform 720ms cubic-bezier(.22,1,.36,1)}
.gallery-ready:not(.is-grid) .depth-work.is-landscape img{transform:rotate(90deg) scale(calc(var(--turn-scale,1)*var(--format-scale,1)))}
@media(max-width:767px){.gallery-ready .carousel-navigation{inset:auto;top:0;left:50%;width:calc(100% - 16px);height:100%}}
@media(prefers-reduced-motion:reduce){.gallery-ready:not(.is-grid) .depth-art img{transition:none}.gallery-ready .carousel-navigation button:hover{transform:none}}

/* Keyboard focus follows the painted area rather than the unused portrait holder. */
.gallery-ready:not(.is-grid) .depth-work .depth-art:focus-visible{outline:none}
.gallery-ready:not(.is-grid) .depth-work.is-current .depth-art:focus-visible img{outline:none}
.gallery-ready:not(.is-grid) .depth-art:focus-visible::after{content:"";position:absolute;inset:var(--veil-y,0px) var(--veil-x,0px);outline:2px solid var(--ink);outline-offset:6px;pointer-events:none;transform:scale(var(--format-scale,1))}
.gallery-ready:not(.is-grid) .depth-work.is-landscape .depth-art:focus-visible::after{transform:rotate(90deg) scale(calc(var(--turn-scale,1)*var(--format-scale,1)))}

/* Dimensions and support read as a quiet gallery label, separate from the title. */
.gallery-ready .gallery-meta{grid-area:meta;font:12px/1.5 var(--body);color:var(--muted);margin:0;max-width:100%}
.gallery-ready .gallery-meta[hidden]{display:none}
.gallery-ready.is-grid .depth-work figcaption.has-work-meta,.artwork figcaption.has-work-meta{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.has-work-meta .work-title{font:inherit;opacity:1;align-self:auto}
.has-work-meta .work-meta{font:12px/1.5 var(--body);color:var(--muted);opacity:1;align-self:auto;white-space:normal}
