/* The gallery page (gallery/index.html, js/gallery/). On top, a dark
   featured band with the page's header: the favourite photos, in one of two
   styles still being chosen between (scrapbook, string lights; each style's
   rules are under .feat--scrapbook or .feat--wire). Below it, on the cream
   page, every photo in a masonry grid with filter chips; one viewer for
   both. Ported from the lab mocks in lab/gallery-concepts/ (mix-scrapbook,
   mix-wire). Loads after style.css, rail.css and arrows.css. */

:root {
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 10px;
  /* the page's side gutters; the left one leaves room for the rail */
  --gl: max(clamp(1.25rem, 4vw, 3.5rem), 96px);
  --gr: clamp(1.25rem, 4vw, 3.5rem);
}
html { scrollbar-gutter: stable; }
html.is-locked { overflow: hidden; }   /* the viewer is open */
body { background: var(--cream); color: var(--ink); }
/* a decoration spilling sideways would zoom a phone's page out */
main.gal { overflow-x: clip;
  /* the string lights' fade into the cream (.feat--wire .join) */
  --jh: clamp(84px, 13vh, 130px); }
.col { max-width: calc(1240px + var(--gl) + var(--gr)); margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
.ph-only { display: none; }

/* =========================================================
   THE FEATURED BAND, and the header on it
   ========================================================= */
.feat { position: relative; display: flow-root; color: var(--oat); }
.feat__deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.feat__head { position: relative; z-index: 1; }
.feat__head-in { position: relative; display: grid; grid-template-columns: auto minmax(0, 24rem); align-items: end; justify-content: space-between; gap: .5rem 2.5rem; }
.feat__eyebrow { grid-column: 1 / -1; margin: 0; font: 500 .72rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; }
.feat__title { margin: 0; font: 500 clamp(2.2rem, 3.6vw, 2.9rem)/1.02 var(--serif); color: var(--cream); letter-spacing: -.01em; }
.feat__title em { font-style: italic; }
.feat__lede { margin: 0 0 .3rem; font: 300 .95rem/1.5 var(--sans); color: var(--oat-dim); }
.feat__band { position: relative; z-index: 2; }

/* ---------------------------------------------------------
   Scrapbook: the walnut table, and a strip of kraft paper on it
   --------------------------------------------------------- */
.feat--scrapbook { --kraft: #c49f74; --pen: #2b1d14; z-index: 2; }
.feat--scrapbook .feat__head { overflow: hidden; padding-block: 30px 48px;
  background-color: #21170f;
  background-image:
    radial-gradient(ellipse 60% 120% at 50% 0%, rgba(255, 186, 104, .14), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1800' height='420'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035 .11' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .07 0 0 0 0 .04 0 0 0 0 .02 1.5 0 0 0 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(180deg, transparent 0 207px, rgba(0, 0, 0, .45) 207px 209px, rgba(255, 210, 160, .05) 209px 210px),
    linear-gradient(180deg, #2c2016, #241a12 60%, #2a1e15);
}
/* string lights hanging out of frame, out of focus */
.feat--scrapbook .feat__head::before { content: ''; position: absolute; inset: 0 0 auto; height: 150px; pointer-events: none;
  background:
    radial-gradient(circle at 14% -10px, rgba(255, 190, 100, .26), transparent 60px),
    radial-gradient(circle at 34% 4px, rgba(255, 210, 140, .2), transparent 46px),
    radial-gradient(circle at 55% -14px, rgba(255, 178, 74, .24), transparent 70px),
    radial-gradient(circle at 75% 2px, rgba(255, 210, 140, .18), transparent 50px),
    radial-gradient(circle at 93% -8px, rgba(255, 190, 100, .24), transparent 64px);
  filter: blur(4px); }
/* the paper's contact shadow on the wood */
.feat--scrapbook .feat__head::after { content: ''; position: absolute; inset: auto 0 0; height: 46px; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(5, 3, 2, .55)); }
.feat--scrapbook .feat__eyebrow { margin-bottom: .1rem; color: var(--amber); opacity: .9; }
.feat--scrapbook .feat__title em { color: var(--lamp); text-shadow: 0 0 22px rgba(255, 178, 74, .35); }
.feat--scrapbook .feat__lede { max-width: 24rem; }
.feat--scrapbook .feat__band { margin-top: -26px; }

/* the strip: torn along the bottom (the shapes are drawn in JS) */
.feat--scrapbook .spread { position: relative; }
/* soft shadow under the torn edge, on the cream */
.feat--scrapbook .spread__shadow { position: absolute; left: 0; right: 0; bottom: -7px; height: 90px; pointer-events: none; filter: blur(4px); opacity: .5; }
.feat--scrapbook .spread__shadow i { position: absolute; inset: 0; background: #4a2a12; clip-path: var(--ts); }
/* the paper's pale core, showing where it tore */
.feat--scrapbook .spread__fibre { position: absolute; inset: 0; clip-path: var(--tf); background-color: #e8d8bc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05 .9' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .4 0 0 0 0 .25 1.4 0 0 0 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"); }
.feat--scrapbook .spread__paper { position: relative; clip-path: var(--tk); padding-block: 30px 46px; color: var(--pen);
  background-color: var(--kraft);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.035 .55' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .19 0 0 0 0 .08 1.8 0 0 0 -1.02'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045 .6' numOctaves='2' seed='21' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .93 0 0 0 0 .8 1.5 0 0 0 -.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .14 0 0 0 0 .05 1.1 0 0 0 -.47'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='1' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 1.6 0 0 0 -.78'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23h)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 240, 210, .18), transparent 6px),
    radial-gradient(ellipse 70% 90% at 45% 30%, rgba(255, 236, 200, .22), transparent 70%),
    linear-gradient(180deg, transparent 70%, rgba(90, 55, 25, .16));
}

/* the composition: laid out in hundredths of the board's width (--u) */
.feat--scrapbook .board { position: relative; container-type: inline-size; width: min(100%, calc((100svh - 340px) * 2.5)); margin-inline: auto; aspect-ratio: 100 / 40; --u: 1cqw; }
.feat--scrapbook .it { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); rotate: calc(var(--r, 0) * 1deg); }
.feat--scrapbook .doodle { display: block; width: calc(var(--w) * var(--u)); height: auto; color: var(--pen); opacity: .78; overflow: visible; }
.feat--scrapbook .press { display: block; width: calc(var(--w) * var(--u)); height: auto; mix-blend-mode: multiply; filter: drop-shadow(0 calc(.15 * var(--u)) calc(.15 * var(--u)) rgba(50, 25, 8, .25)); }
/* a stain soaks into the paper; a sticker sits on it */
.feat--scrapbook .stain { display: block; width: calc(var(--w) * var(--u)); height: auto; mix-blend-mode: multiply; overflow: visible; }
.feat--scrapbook .sticker { display: block; width: calc(var(--w) * var(--u)); height: auto; overflow: visible; filter: drop-shadow(0 calc(.15 * var(--u)) calc(.2 * var(--u)) rgba(50, 25, 8, .4)); }

/* a featured photo: the print, its tape, its caption and arrow. They settle
   onto the paper once, a beat apart, and then hold still. */
.feat--scrapbook .fp { z-index: 2; width: calc(var(--w) * var(--u)); animation: settle .8s var(--ease) backwards; animation-delay: calc(var(--n, 0) * 90ms + 120ms); }
@keyframes settle { from { opacity: 0; translate: 0 calc(-1.6 * var(--u)); } }
.feat--scrapbook .snap { position: relative; display: block; width: 100%; margin: 0; padding: calc(.8 * var(--u)) calc(.8 * var(--u)) calc(1.15 * var(--u)); border: 0; font: inherit; color: inherit; cursor: zoom-in;
  background: linear-gradient(160deg, #fffaf0, #efe5d1);
  box-shadow: 0 calc(.12 * var(--u)) calc(.25 * var(--u)) rgba(50, 25, 8, .35), 0 var(--u) calc(1.7 * var(--u)) calc(-.6 * var(--u)) rgba(50, 25, 8, .55);
  transition: translate .4s cubic-bezier(.3, 1.3, .5, 1), rotate .5s cubic-bezier(.3, 1.3, .5, 1), box-shadow .4s ease; -webkit-tap-highlight-color: transparent; }
.feat--scrapbook .snap img { display: block; width: 100%; height: auto; aspect-ratio: var(--a); object-fit: cover; filter: saturate(.92) contrast(1.02) sepia(.06); }
.feat--scrapbook .snap::after { content: ''; position: absolute; inset: calc(.8 * var(--u)) calc(.8 * var(--u)) calc(1.15 * var(--u)); pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 40%); }
.feat--scrapbook .snap--bare { padding: 0; background: none; box-shadow: 0 calc(.15 * var(--u)) calc(.3 * var(--u)) rgba(50, 25, 8, .4), 0 var(--u) calc(1.6 * var(--u)) calc(-.6 * var(--u)) rgba(50, 25, 8, .5); }
.feat--scrapbook .snap--bare::after { inset: 0; }
.feat--scrapbook .snap:focus-visible { outline: 2px solid var(--brick); outline-offset: 5px; }
.feat--scrapbook .fp.is-ghost .snap img { visibility: hidden; }
@media (hover: hover) {
  .feat--scrapbook .snap:hover { translate: 0 calc(-.45 * var(--u)); rotate: calc(var(--r, 0) * -.4deg); box-shadow: 0 calc(.25 * var(--u)) calc(.5 * var(--u)) rgba(50, 25, 8, .3), 0 calc(2 * var(--u)) calc(3 * var(--u)) calc(-.9 * var(--u)) rgba(50, 25, 8, .6); }
}
/* photo corners, on the prints without a white border */
.feat--scrapbook .corner { position: absolute; z-index: 2; width: calc(2.1 * var(--u)); height: calc(2.1 * var(--u)); pointer-events: none;
  background: linear-gradient(135deg, #3a2a1f, #20160f); clip-path: polygon(0 0, 100% 0, 0 100%); filter: drop-shadow(0 0 1px rgba(0, 0, 0, .5)); }
.feat--scrapbook .corner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 46%, rgba(255, 230, 190, .25) 49%, transparent 54%); }
.feat--scrapbook .corner--tl { left: calc(-.4 * var(--u)); top: calc(-.4 * var(--u)); }
.feat--scrapbook .corner--tr { right: calc(-.4 * var(--u)); top: calc(-.4 * var(--u)); rotate: 90deg; }
.feat--scrapbook .corner--br { right: calc(-.4 * var(--u)); bottom: calc(-.4 * var(--u)); rotate: 180deg; }
.feat--scrapbook .corner--bl { left: calc(-.4 * var(--u)); bottom: calc(-.4 * var(--u)); rotate: 270deg; }

/* washi tape, torn at both ends (each strip's edges drawn in JS) */
.feat--scrapbook .tape { position: absolute; z-index: 3; width: calc(7.6 * var(--u)); height: calc(2.3 * var(--u)); pointer-events: none; mix-blend-mode: multiply; opacity: .9; background-color: var(--tc); }
.feat--scrapbook .tape::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, .06)); }
.feat--scrapbook .tape--stripe { background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .28) 0 calc(.32 * var(--u)), transparent calc(.32 * var(--u)) calc(.8 * var(--u))); }
.feat--scrapbook .tape--dots { background-image: radial-gradient(circle, rgba(255, 255, 255, .42) calc(.16 * var(--u)), transparent calc(.2 * var(--u))); background-size: calc(.8 * var(--u)) calc(.8 * var(--u)); }
.feat--scrapbook .tape--grid { background-image: linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px); background-size: calc(.6 * var(--u)) calc(.6 * var(--u)); }
.feat--scrapbook .tape--top { left: 50%; top: calc(-1.2 * var(--u)); translate: -50% 0; rotate: -3deg; }
.feat--scrapbook .tape--tl { left: calc(-2.6 * var(--u)); top: calc(-.5 * var(--u)); rotate: -38deg; }
.feat--scrapbook .tape--tr { right: calc(-2.6 * var(--u)); top: calc(-.5 * var(--u)); rotate: 40deg; }
.feat--scrapbook .t-brick { --tc: color-mix(in srgb, var(--brick) 72%, #f3d6c4); }
.feat--scrapbook .t-capiz { --tc: color-mix(in srgb, var(--capiz) 85%, #fff); }
.feat--scrapbook .t-pink { --tc: color-mix(in srgb, var(--bougainvillea) 78%, #fff); }
.feat--scrapbook .t-leaf { --tc: color-mix(in srgb, var(--leaf) 62%, #e9ecd2); }

/* handwriting on the paper */
.feat--scrapbook .fp__cap, .feat--scrapbook .note { margin: 0; font: italic 500 calc(2.25 * var(--u))/1.02 var(--serif); color: var(--pen); opacity: .92; }
.feat--scrapbook .fp__cap { position: absolute; left: calc(var(--cx) * var(--u)); top: calc(var(--cy) * var(--u)); rotate: calc(var(--cr, 0) * 1deg); width: max-content; max-width: calc(var(--mw, 22) * var(--u)); }
/* a caption over its print hangs up from its place; captions and keepsakes can be sized by hand */
.feat--scrapbook .fp__cap { scale: var(--cs, 1); transform-origin: 0 0; }
.feat--scrapbook .fp__cap--above { translate: 0 -100%; transform-origin: 0 100%; }
.feat--scrapbook .keep { scale: var(--s, 1); }
.feat--scrapbook .board.no-settle .fp { animation: none; }
/* the pen arrows, each drawn from its caption to its print (js/gallery/strip.js) */
.feat--scrapbook .arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 5;
  fill: none; stroke: var(--pen); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .78; }
.feat--scrapbook .arrows path { vector-effect: non-scaling-stroke; }
.feat--scrapbook .note { display: flex; align-items: flex-start; gap: calc(.5 * var(--u)); font-size: calc(1.9 * var(--u)); }
.feat--scrapbook .note .doodle { margin-top: calc(.6 * var(--u)); }

/* the ticket stub */
.feat--scrapbook .stub { width: calc(var(--w) * var(--u)); padding: calc(.9 * var(--u)) calc(1.1 * var(--u)) calc(.9 * var(--u)) calc(2 * var(--u)); color: #5a2d1f;
  background: radial-gradient(circle at 0 50%, transparent calc(.5 * var(--u)), #ecd9b6 calc(.55 * var(--u))) 0 0 / 100% calc(1.5 * var(--u)) repeat-y;
  box-shadow: 0 calc(.15 * var(--u)) calc(.3 * var(--u)) rgba(50, 25, 8, .3); }
.feat--scrapbook .stub::before { content: ''; position: absolute; left: calc(1.2 * var(--u)); top: calc(.6 * var(--u)); bottom: calc(.6 * var(--u)); border-left: 1.5px dashed rgba(90, 45, 31, .45); }
.feat--scrapbook .stub small { display: block; font: 600 calc(.78 * var(--u))/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; opacity: .8; }
.feat--scrapbook .stub b { display: block; margin: calc(.2 * var(--u)) 0 calc(.15 * var(--u)); font: italic 600 calc(2.4 * var(--u))/1 var(--serif); color: var(--brick); }
.feat--scrapbook .stub span { font: 500 calc(.9 * var(--u))/1.2 var(--sans); letter-spacing: .08em; opacity: .75; }
.feat--scrapbook .stub .tape { width: calc(5 * var(--u)); height: calc(1.8 * var(--u)); top: calc(-.9 * var(--u)); }

/* ---------------------------------------------------------
   String lights: the evening garden, polaroids on a wire
   --------------------------------------------------------- */
.feat--wire { --paper: #f6efe2; --pen: #3b2a1d; --wire: #1a120c; z-index: 0; }
/* the garden reaches down behind the whole fade, past the band's end */
.feat--wire .feat__deco { bottom: calc(var(--jh) * -.4);
  background:
    radial-gradient(70% 70% at 72% 0%, rgba(255, 178, 74, .10), transparent 65%),
    radial-gradient(60% 60% at 8% 100%, rgba(95, 111, 60, .14), transparent 70%),
    linear-gradient(180deg, #0d0b09 0%, var(--night) 55%, #0a0806 100%); }
.feat--wire .garden__leaves { position: absolute; top: -40px; right: -60px; width: min(42vw, 520px); height: auto; opacity: .95; }
.feat--wire .garden__bokeh { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 112, .55), rgba(255, 178, 74, 0) 70%); filter: blur(2px); opacity: var(--o, .2); }
.feat--wire .feat__head { padding-top: clamp(2.2rem, 6vh, 3.4rem); }
.feat--wire .feat__head-in { gap: .6rem 3rem; }
.feat--wire .feat__eyebrow { margin-bottom: .1rem; font: 400 .75rem/1 var(--sans); letter-spacing: .22em; color: var(--capiz); opacity: .85; }
.feat--wire .feat__title { font-size: clamp(2.5rem, 4.8vw, 4rem); }
.feat--wire .feat__title em { color: var(--amber); text-shadow: 0 0 22px rgba(255, 160, 60, .35); }
.feat--wire .feat__lede { margin-bottom: .45rem; font: 400 .98rem/1.6 var(--sans); }
.feat--wire .feat__lede a { color: var(--lamp); text-decoration: none; border-bottom: 1px solid rgba(255, 217, 154, .35); transition: border-color .25s ease, color .25s ease; }
.feat--wire .feat__lede a:hover { color: var(--amber); border-color: var(--amber); }
.feat--wire .feat__lede a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

/* the line of lights */
.feat--wire .line { position: relative; margin-top: clamp(.4rem, 2vh, 1.2rem); }
.feat--wire .line__head { display: none; align-items: baseline; gap: .7rem; margin: 0 0 .2rem; }
.feat--wire .line__name { margin: 0; font: italic 500 1.35rem/1 var(--serif); color: var(--lamp); }
.feat--wire .line__swipe { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; letter-spacing: .06em; color: var(--oat-dim); }
.feat--wire .line__swipe .arrow { width: 1.2em; height: 1.2em; color: var(--amber); }
.feat--wire .line__row { position: relative; }
.feat--wire .line__track { position: relative; }
.feat--wire .line__track::before { /* the warm pool of light under the lit line */
  content: ''; position: absolute; inset: -20% -6% 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 170, 70, .12), rgba(255, 170, 70, .05) 55%, rgba(255, 170, 70, 0));
  opacity: 0; transition: opacity 2.2s ease .4s; }
.feat--wire .line.is-lit .line__track::before { opacity: 1; }
/* too narrow for all of them: the line swipes sideways (phones, small tablets) */
.feat--wire .line.is-row .line__head { display: flex; }
.feat--wire .line.is-row .line__row { margin-right: calc(-1 * var(--gr)); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.feat--wire .line.is-row .line__row::-webkit-scrollbar { display: none; }
.feat--wire .line.is-row .pola { scroll-snap-align: center; }
@media (min-width: 641px) { /* the row stops short of the rail: the wire fades in there */
  .feat--wire .line.is-row .line__row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px); mask-image: linear-gradient(90deg, transparent, #000 22px); }
}
.feat--wire .line.is-row .line__track::before { inset: 0; }

.feat--wire .wire { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.feat--wire .wire path { fill: none; stroke: var(--wire); stroke-width: 2; stroke-linecap: round; }
.feat--wire .wire path.wire__hi { stroke: rgba(255, 210, 150, .16); stroke-width: .8; transform: translateY(-.8px); transition: stroke 1.8s ease; }
.feat--wire .line.is-lit .wire path.wire__hi { stroke: rgba(255, 210, 150, .34); }

/* the bulbs: dark until the line is lit, then each catches (one flicker,
   in turn along the wire) and stays lit, still */
.feat--wire .bulb { position: absolute; width: 12px; height: 26px; margin-left: -6px; pointer-events: none; transform-origin: 50% 0; rotate: var(--r, 0deg); z-index: 3; }
.feat--wire .bulb::before { content: ''; position: absolute; left: 3px; top: 0; width: 6px; height: 9px; border-radius: 1.5px 1.5px 2px 2px; background: linear-gradient(90deg, #0d0906, #2b2019 45%, #0d0906); }
.feat--wire .bulb i {
  position: absolute; left: 1px; top: 8px; width: 10px; height: 14px; border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  background: radial-gradient(circle at 45% 60%, rgba(120, 96, 70, .55), rgba(60, 45, 32, .5) 70%);
  box-shadow: inset 0 0 0 .6px rgba(255, 230, 190, .18);
  transition: background .5s ease, box-shadow .8s ease; transition-delay: var(--wait, 0s); }
.feat--wire .bulb b {
  position: absolute; left: 50%; top: 15px; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 100, .32), rgba(255, 170, 70, .1) 35%, rgba(255, 170, 70, 0) 68%);
  opacity: 0; transition: opacity 1.2s ease; transition-delay: var(--wait, 0s); }
.feat--wire .line.is-lit .bulb i {
  background: radial-gradient(circle at 45% 55%, #fffaf0, var(--lamp) 32%, var(--amber) 78%, #d9822a);
  box-shadow: 0 0 6px 2px rgba(255, 190, 100, .75), 0 0 18px 5px rgba(255, 160, 60, .35);
  /* backwards, not both: once it has caught, the animation is over and
     gone, and the bulb simply stays lit */
  animation: catch .7s steps(1, end) var(--wait, 0s) backwards; }
.feat--wire .line.is-lit .bulb b { opacity: 1; }
@keyframes catch { 0% { opacity: .3; } 25% { opacity: 1; } 40% { opacity: .5; } 60%, 100% { opacity: 1; } }

/* the polaroids, on their pegs */
.feat--wire .pola { position: absolute; top: 0; left: 0; z-index: 2; }
.feat--wire .peg {
  position: absolute; z-index: 4; width: 9px; height: 30px; margin-left: -4.5px; border-radius: 2px 2px 3px 3px; pointer-events: none;
  background: linear-gradient(180deg, transparent 38%, rgba(30, 20, 12, .55) 38% 41%, transparent 41%), linear-gradient(90deg, #8a5f3a, #c79a68 40%, #a77649 70%, #7a5232);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, .55); }
.feat--wire .peg::after { content: ''; position: absolute; left: -2px; right: -2px; top: 11px; height: 3px; border-radius: 2px; background: linear-gradient(180deg, #d9d3c8, #7d776d); }
.feat--wire .line.is-lit .peg { background: linear-gradient(180deg, transparent 38%, rgba(30, 20, 12, .55) 38% 41%, transparent 41%), linear-gradient(90deg, #96683f, #dcae78 40%, #b7834f 70%, #855a36); }

.feat--wire .card {
  all: unset; box-sizing: border-box; position: relative; display: block; cursor: zoom-in;
  transform-origin: 50% -6px; rotate: var(--tilt, 0deg);
  -webkit-tap-highlight-color: transparent; }
/* a gentle sway, only while the line is on screen (js: .is-swaying); it
   starts and ends at the polaroid's own tilt */
.feat--wire .line.is-swaying .card { animation: sway var(--dur, 9s) ease-in-out infinite; }
@keyframes sway {
  0%, 100% { rotate: var(--tilt); }
  25% { rotate: calc(var(--tilt) + var(--amp, .6deg)); }
  75% { rotate: calc(var(--tilt) - var(--amp, .6deg)); }
}
.feat--wire .card__paper {
  display: block; position: relative; padding: var(--b) var(--b) var(--bb);
  background: linear-gradient(170deg, #fbf6ec, var(--paper) 55%, #efe5d3); border-radius: 1.5px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 0 0 .5px rgba(0, 0, 0, .25), 0 14px 26px -10px rgba(0, 0, 0, .85), 0 4px 8px -2px rgba(0, 0, 0, .5);
  transition: box-shadow .4s ease, scale .4s cubic-bezier(.3, 1.4, .5, 1), filter 1.6s ease;
  filter: brightness(.62) saturate(.8); }
.feat--wire .line.is-lit .card__paper { filter: none; }
.feat--wire .card__paper::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 186, 96, .22), rgba(255, 186, 96, 0) 45%, rgba(40, 20, 8, .12)); mix-blend-mode: multiply; }
.feat--wire .card__photo { position: relative; display: block; width: var(--pw); height: var(--ph); overflow: hidden; background: #2b2019; }
.feat--wire .card__photo img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.04) saturate(1.05) sepia(.06); }
.feat--wire .card__photo::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), inset 0 0 24px rgba(30, 15, 5, .25); }
.feat--wire .card__cap {
  position: absolute; left: var(--b); right: var(--b); bottom: 0; height: var(--bb);
  display: flex; align-items: center; justify-content: center;
  font: italic 500 var(--fs, 1.15rem)/1 var(--serif); color: var(--pen); letter-spacing: .01em;
  rotate: var(--capr, -1deg); white-space: nowrap; overflow: hidden; }
.feat--wire .card:hover .card__paper { scale: 1.035; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 0 0 .5px rgba(0, 0, 0, .25), 0 22px 34px -12px rgba(0, 0, 0, .9), 0 6px 10px -2px rgba(0, 0, 0, .5); }
.feat--wire .card:focus-visible .card__paper { outline: 2px solid var(--amber); outline-offset: 5px; }
.feat--wire .pola:hover, .feat--wire .pola:focus-within { z-index: 5; }
.feat--wire .pola.is-ghost .card__photo img { visibility: hidden; }

/* the join: night into the cream page, an eased fade (many stops) so the
   middle is not a muddy grey band. Its lower part hangs below the band, so
   the rail turns light once the fade is mostly cream behind it. */
.feat--wire .join {
  position: relative; height: var(--jh); margin-top: -12px; margin-bottom: calc(var(--jh) * -.4); pointer-events: none;
  background: linear-gradient(180deg,
    rgba(244, 234, 217, 0) 0%, rgba(244, 234, 217, .02) 12%, rgba(244, 234, 217, .07) 24%,
    rgba(244, 234, 217, .16) 35%, rgba(240, 226, 204, .3) 46%, rgba(240, 226, 204, .48) 56%,
    rgba(242, 230, 210, .66) 66%, rgba(244, 234, 217, .82) 76%, rgba(244, 234, 217, .93) 86%,
    rgba(244, 234, 217, .985) 94%, var(--cream) 100%); }
/* a vine climbing in from the right, trailing over the edge into the day */
.feat--wire .join__vine { position: absolute; right: 0; top: -64px; width: clamp(170px, 20vw, 250px); height: auto; overflow: visible; }

/* =========================================================
   EVERY PHOTO: the plain masonry and its filters
   ========================================================= */
.every { position: relative; z-index: 1; padding-top: 34px; padding-bottom: 5rem; }
/* under the string lights the grid starts inside the fade's lower part */
.feat--wire ~ .every { padding-top: calc(var(--jh) * .4 + clamp(.2rem, 1vh, .8rem)); }
.every__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; }
.every__title { margin: 0; font: 500 clamp(1.8rem, 2.8vw, 2.3rem)/1.05 var(--serif); color: var(--ink); }
.every__title em { font-style: italic; color: var(--brick); }
.every__note { margin: 0; font-size: .9rem; color: var(--ink-soft); }
/* the scrapbook's: all in italic, no note */
.feat--scrapbook ~ .every .every__title { font-style: italic; font-size: clamp(1.8rem, 2.6vw, 2.2rem); }
.feat--scrapbook ~ .every .every__title em { color: inherit; }
.feat--scrapbook ~ .every .every__note { display: none; }

.filters { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .35rem; padding: .85rem 0; margin-bottom: clamp(.6rem, 1.5vw, 1.2rem); }
.filters::before { content: ''; position: absolute; inset: 0 -50vw; z-index: -1; background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .3s ease; }
.filters.is-stuck::before { opacity: 1; }
.filters__chips { display: flex; flex-wrap: wrap; gap: .5rem .7rem; padding-left: 6px; }
/* the way in to sharing, at the end of the bar (js/gallery/share.js) */
.share-pill { flex: none; margin-left: .9rem; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .95rem; border: 1px solid color-mix(in srgb, var(--brick) 45%, transparent); border-radius: 999px; background: #fffdf8; color: var(--brick); font: 600 .82rem var(--sans); cursor: pointer; transition: background .2s ease, color .2s ease; }
.share-pill span { font-size: 1.05rem; line-height: 1; }
.share-pill:hover { background: var(--brick); color: #fff; }
.share-pill:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }
@media (max-width: 640px) { .share-pill { padding: .4rem .7rem; font-size: .76rem; margin-left: .5rem; } }
.filters__n { margin: 0 0 0 auto; font: italic 500 1.05rem var(--serif); color: var(--ink-soft); white-space: nowrap; }
.chip {
  position: relative; isolation: isolate; flex: none; padding: .42rem .9rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: none; color: var(--ink-soft); font: 500 .82rem/1.2 var(--sans); white-space: nowrap; cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease; }
.chip:hover { border-color: color-mix(in srgb, var(--ink) 45%, transparent); color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--cream); border-color: transparent; cursor: default; }
.chip:focus-visible { outline: 2px solid var(--brick); outline-offset: 4px; }
/* the chosen chip, under the scrapbook: a strip of brick washi tape (the
   one scrapbook touch below the tear) */
.chip::before { content: ''; position: absolute; inset: -2px -7px; z-index: -1; rotate: -1.5deg; opacity: 0; scale: .9 1; transition: opacity .25s ease, scale .35s var(--ease);
  background-color: color-mix(in srgb, var(--brick) 90%, #f3d6c4);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 45%, rgba(0, 0, 0, .08)), repeating-linear-gradient(115deg, rgba(255, 255, 255, .13) 0 4px, transparent 4px 10px);
  clip-path: polygon(2% 0, 98% 0, 100% 14%, 97.5% 30%, 99.5% 47%, 97% 63%, 100% 80%, 98% 100%, 2% 100%, 0 86%, 2.6% 70%, .4% 52%, 3% 36%, 0 20%);
  filter: drop-shadow(0 1px 1px rgba(60, 25, 10, .25)); }
.chip[aria-pressed="true"]::before { opacity: 1; scale: 1; }
/* under the string lights: a plain dark pill */
.feat--wire ~ .every .filters__chips { gap: .35rem; padding-left: 0; }
.feat--wire ~ .every .chip::before { display: none; }
.feat--wire ~ .every .chip:focus-visible { outline-offset: 2px; }
.feat--wire ~ .every .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }

.grid { position: relative; margin: 0; padding: 0; list-style: none; transition: height .6s var(--ease); }
.tile { position: absolute; top: 0; left: 0; transform: translate(var(--x, 0), calc(var(--y, 0px) + var(--rise, 0px))) scale(var(--s, 1)); transition: transform .65s var(--ease), opacity .45s ease; }
.tile.is-pre { --rise: 18px; opacity: 0; }
.tile.is-out { --s: .94; opacity: 0; visibility: hidden; pointer-events: none; transition: transform .35s ease, opacity .3s ease, visibility 0s linear .35s; }
.tile.is-snap { transition: none; }
.grid.is-instant .tile { transition: none; }
.tile__btn { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: zoom-in; border-radius: var(--radius); transition: transform .45s var(--ease); -webkit-tap-highlight-color: transparent; }
.tile__frame { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--cream-deep); box-shadow: 0 18px 36px -26px rgba(60, 30, 10, .55), 0 0 0 1px rgba(43, 29, 20, .04); transition: box-shadow .45s var(--ease); }
.tile__frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease, transform .9s var(--ease), filter .6s ease; }
.tile__frame img.is-loaded { opacity: 1; }
.tile.is-ghost .tile__frame img { visibility: hidden; }
.tile__frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(255, 178, 74, .14), rgba(255, 178, 74, 0) 60%);   /* a warm glow on hover (the caption no longer sits on the photo) */ opacity: 0; transition: opacity .45s ease; }
.tile__cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .55rem; min-width: 0; margin: 0; }
.tile__cap em { font: italic 500 1.3rem/1.15 var(--serif); }
/* laptops: the photo lifts and warms on hover or focus; the caption and
   credit sit under it, always in view (as on phones, below) */
@media (hover: hover) and (min-width: 641px) {
  .tile__cap { padding: .6rem .2rem 0; }
  .tile__btn { position: relative; }
  .tile__btn:hover, .tile__btn:focus-visible { transform: translateY(-4px); }
  .tile__btn:hover .tile__frame, .tile__btn:focus-visible .tile__frame { box-shadow: 0 30px 48px -26px rgba(110, 52, 18, .6), 0 0 0 1px rgba(43, 29, 20, .04); }
  .tile__btn:hover .tile__frame img, .tile__btn:focus-visible .tile__frame img { transform: scale(1.03); filter: saturate(1.12) sepia(.1) brightness(1.04); }
  .tile__btn:hover .tile__frame::after, .tile__btn:focus-visible .tile__frame::after { opacity: 1; }
}
/* touch and phones: the caption sits under the photo */
@media (hover: none), (max-width: 640px) {
  .tile__cap { padding: .5rem .15rem 0; }
  .tile__cap em { font-size: 1.12rem; }
  .tile.is-narrow .tile__cap { flex-direction: column; align-items: flex-start; }
  .tile.is-narrow .tile__cap em { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tile__btn:active .tile__frame img { filter: saturate(1.1) sepia(.08) brightness(1.04); }
}
.tile__btn:focus-visible { outline: 2px solid var(--brick); outline-offset: 4px; }
.every__end { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: clamp(3rem, 6vw, 4.5rem) 0 0; font: italic 500 1.25rem var(--serif); color: var(--ink-soft); }
.every__end::before, .every__end::after { content: ''; flex: none; width: 2.4rem; height: 1px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.every__end span { text-align: center; }
.every__end a { color: var(--brick); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brick) 40%, transparent); transition: border-color .25s ease, color .25s ease; }
.every__end a:hover { border-color: var(--brick); }
.every__end a:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; border-radius: 2px; }

/* =========================================================
   THE VIEWER (one for the band and the grid)
   ========================================================= */
.vw { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--cream); overflow: hidden; }
.vw::backdrop { background: transparent; }
.vw[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); }
.vw__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 50% 45%, #15100c, #080605 70%); }
.vw__top { display: flex; align-items: center; justify-content: space-between; padding: max(.9rem, env(safe-area-inset-top)) clamp(1rem, 2.5vw, 1.6rem) .4rem; }
.vw__count { margin: 0; font: 500 .82rem/1 var(--sans); letter-spacing: .08em; color: var(--oat-dim); font-variant-numeric: tabular-nums; }
.vw__count b { font-weight: 500; color: var(--cream); }
.vw__btn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 999px; border: 1px solid rgba(255, 217, 154, .18); background: rgba(244, 234, 217, .06); color: var(--cream); cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease; -webkit-tap-highlight-color: transparent; }
.vw__btn:hover { background: rgba(244, 234, 217, .14); border-color: rgba(255, 217, 154, .38); color: var(--lamp); }
.vw__btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.vw__btn .arrow { width: 22px; height: 22px; vertical-align: 0; }
.vw__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.vw__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: .4rem clamp(5.5rem, 8vw, 7rem); touch-action: pan-y pinch-zoom; }
.vw__img { display: block; max-width: none; border-radius: 4px; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; background: #1d1612; }
.vw__foot { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 1rem 1.2rem .3rem; }
.vw__cap { margin: 0; text-align: center; min-height: 3.2rem; }
.vw__cap em { display: block; font: italic 500 clamp(1.4rem, 2.4vw, 1.75rem)/1.15 var(--serif); color: var(--cream); }
.vw__cap small { display: block; margin-top: .4rem; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }
.vw__nav { position: absolute; top: 50%; translate: 0 -50%; width: 54px; height: 54px; }
.vw__nav--prev { left: clamp(1rem, 2.5vw, 1.8rem); }
.vw__nav--next { right: clamp(1rem, 2.5vw, 1.8rem); }
.vw__thumbs { display: flex; gap: .45rem; justify-content: safe center; overflow-x: auto; scrollbar-width: none; padding: .8rem 3.5rem max(1.1rem, env(safe-area-inset-bottom)); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3rem calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 3rem calc(100% - 3rem), transparent); }
.vw__thumbs::-webkit-scrollbar { display: none; }
.vw__th { flex: none; width: 64px; height: 46px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #1d1612; opacity: .42; cursor: pointer; transition: opacity .3s ease, box-shadow .3s ease, transform .3s var(--ease); }
.vw__th img { width: 100%; height: 100%; object-fit: cover; }
.vw__th:hover { opacity: .8; }
.vw__th[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px #0c0907, 0 0 0 3.5px var(--amber); transform: translateY(-2px); }
.vw__th:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.vw__hint { display: none; }

/* =========================================================
   SMALLER SCREENS
   ========================================================= */
/* smaller laptops and tablets: the lede goes under the title */
@media (max-width: 900px) {
  .feat__head-in { grid-template-columns: minmax(0, 1fr); }
  .feat__lede { max-width: 30rem; }
}
/* short laptops: the scrapbook's lede steps aside so the strip fits */
@media (min-width: 641px) and (max-height: 700px) {
  .feat--scrapbook .feat__head { padding-block: 22px 42px; }
  .feat--scrapbook .feat__lede { display: none; }
  .feat--scrapbook .board { width: min(100%, calc((100svh - 290px) * 2.5)); }
}

/* phones: the rail is a bottom bar; the scrapbook strip and the line of
   lights become rows you swipe */
@media (max-width: 640px) {
  :root { --gl: 1rem; --gr: 1rem; }
  main.gal { --jh: 84px; }
  .ph-only { display: block; }
  .feat__eyebrow { margin-bottom: .2rem; }
  .feat__lede { margin-top: .3rem; }

  .feat--scrapbook .feat__head { padding-block: 22px 46px; }
  .feat--scrapbook .feat__title { font-size: 2.15rem; }
  .feat--scrapbook .feat__lede { font-size: .88rem; }
  .feat--scrapbook .spread__paper { padding-block: 16px 34px; }
  .feat--scrapbook .spread .col { padding: 0; }
  .feat--scrapbook .board { --u: 2.4vw; width: auto; aspect-ratio: auto; container-type: normal; display: flex; align-items: center; gap: 9vw;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 26px 12vw 14px; }
  .feat--scrapbook .board::-webkit-scrollbar { display: none; }
  .feat--scrapbook .lap-only { display: none; }
  .feat--scrapbook .it { position: relative; left: auto; top: auto; flex: none; }
  .feat--scrapbook .fp { width: calc(var(--pw) * 1vw); margin-top: calc(var(--py, 0) * var(--u)); scroll-snap-align: center; }
  .feat--scrapbook .fp__cap--above { translate: none; }
  .feat--scrapbook .keep, .feat--scrapbook .fp__cap { scale: none; }
  .feat--scrapbook .fp__cap { position: static; width: auto; max-width: none; margin: calc(1.3 * var(--u)) 0 0; text-align: center; font-size: 1.3rem; rotate: calc(var(--r, 0) * -.6deg); }
  .feat--scrapbook .stub { --w: 40; width: 40vw; scroll-snap-align: center; }
  .feat--scrapbook .note { width: 34vw; flex-direction: column; align-items: center; text-align: center; font-size: 1.25rem; scroll-snap-align: center; }
  .feat--scrapbook .note .doodle { --w: 4.5; }
  .feat--scrapbook .swipe { position: absolute; z-index: 3; top: 10px; right: 16px; display: flex; align-items: center; gap: 4px; margin: 0; font: italic 500 1.05rem/1 var(--serif); color: var(--pen); opacity: .8; transition: opacity .4s ease; pointer-events: none; }
  .feat--scrapbook .swipe .doodle { --w: 3.4; --u: 8px; }
  .feat--scrapbook .swipe.is-gone { opacity: 0; }
  .feat--scrapbook .spread__bulbs { position: absolute; top: 2px; left: 14px; --u: 1.5vw; }

  .feat--wire .feat__head { padding-top: 2.4rem; }
  .feat--wire .feat__title { font-size: 2.55rem; }
  .feat--wire .feat__lede { font-size: .95rem; line-height: 1.55; }
  .feat--wire .line { margin-top: 1rem; }
  .feat--wire .line.is-row .line__row { margin-left: calc(-1 * var(--gl)); }
  .feat--wire .garden__leaves { width: 70vw; top: -30px; right: -70px; opacity: .8; }
  .feat--wire .join__vine { width: 150px; top: -46px; }

  .every { padding-top: 26px; padding-bottom: calc(7.5rem + env(safe-area-inset-bottom)); }
  .every__title { font-size: 1.75rem; }
  .every__note { font-size: .85rem; }
  .filters { padding: .7rem 0; }
  .filters__n { display: none; }

  .vw__stage { padding: .2rem 0; }
  .vw__img { border-radius: 0; }
  .vw__foot { grid-template-columns: 46px 1fr 46px; align-items: center; gap: .6rem; padding: 1rem 1rem max(1.4rem, calc(env(safe-area-inset-bottom) + .8rem)); }
  .vw__nav { position: static; translate: none; width: 46px; height: 46px; }
  .vw__nav--prev { grid-column: 1; grid-row: 1; }
  .vw__cap { grid-column: 2; grid-row: 1; min-height: 4.6rem; display: flex; flex-direction: column; justify-content: center; }
  .vw__nav--next { grid-column: 3; grid-row: 1; }
  .vw__thumbs { display: none; }
  .vw__hint { display: block; margin: .35rem 0 0; font-size: .7rem; color: var(--oat-dim); opacity: .7; }
}

/* reduced motion: nothing settles, sways, flickers or glides */
@media (prefers-reduced-motion: reduce) {
  img.dev-ph { animation: none; }
  .feat--scrapbook .fp, .feat--wire .card, .feat--wire .line.is-lit .bulb i { animation: none !important; }
  .feat--scrapbook .snap, .chip::before { transition: none; }
  .feat--scrapbook .snap:hover { translate: none; rotate: none; }
  .feat--wire .bulb i, .feat--wire .bulb b, .feat--wire .line__track::before, .feat--wire .card__paper, .feat--wire .wire path.wire__hi { transition-duration: .2s !important; transition-delay: 0s !important; }
  .tile, .tile.is-out, .grid, .tile__btn, .tile__frame img, .tile__cap { transition: opacity .2s ease, visibility 0s; }
  .tile.is-pre { --rise: 0px; }
  .tile.is-out { --s: 1; }
  .tile__btn:hover, .tile__btn:focus-visible { transform: none !important; }
  .tile__btn:hover .tile__frame img { transform: none !important; }
}

/* ---------------------------------------------------------
   Photos developing while they load (js/gallery/develop.js): the
   small picture, pale and soft, under the full one fading in
   --------------------------------------------------------- */
img.dev-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
  filter: sepia(.85) saturate(.6) brightness(1.25) contrast(.6) blur(3px); transform: scale(1.05);
  animation: dev-pulse 1.6s ease-in-out infinite alternate; transition: opacity .7s ease; }
img.dev-ph.is-done { opacity: 0; animation: none; }
img.dev-wait { opacity: 0; }
.feat--scrapbook .snap img, .feat--wire .card__photo img { transition: opacity .7s ease; }
/* the prints and polaroids tint their photos: the developing look wins */
.feat--scrapbook .snap img.dev-ph, .feat--wire .card__photo img.dev-ph { filter: sepia(.85) saturate(.6) brightness(1.25) contrast(.6) blur(3px); }
.feat--scrapbook .snap img.dev-ph { inset: calc(.8 * var(--u)) calc(.8 * var(--u)) calc(1.15 * var(--u)); width: auto; height: auto; aspect-ratio: auto; }
.feat--scrapbook .snap--bare img.dev-ph { inset: 0; }
.tile__frame img.dev-ph { opacity: 1; }
.tile__frame img.dev-ph.is-done { opacity: 0; }
.is-ghost img.dev-ph { visibility: hidden; }
@keyframes dev-pulse { from { opacity: .55; } to { opacity: .95; } }

/* while the photos are fetched: a quiet cup where the band will be */
.gload { display: flex; justify-content: center; align-items: center; gap: .5rem; margin: 0; padding: clamp(3rem, 10vh, 6rem) 1rem; font: italic 500 1.15rem var(--serif); color: var(--ink-soft); }
.feat--scrapbook .gload { padding-top: calc(clamp(3rem, 10vh, 6rem) + 26px); }
.feat--wire .gload { color: var(--oat-dim); }
.gload .cup-fill { width: 1.6em; height: 1.6em; }

/* ---------------------------------------------------------
   No photos yet (js/gallery/gallery.js, empty): a warm note and the
   way to the menu, in place of the band and the grid
   --------------------------------------------------------- */
.feat--empty.feat--scrapbook .feat__head { padding-bottom: 40px; }
.feat--empty.feat--wire { padding-bottom: clamp(2.5rem, 7vh, 4.5rem); }
.every--empty { padding-top: 0; }
.gempty { display: grid; justify-items: center; gap: .9rem; max-width: 33rem; margin: clamp(2.5rem, 8vh, 5rem) auto 0; text-align: center; }
.gempty .logo-mark { height: 2.6rem; color: var(--brick); filter: none; opacity: .85; }
.gempty__title { margin: 0; font: italic 500 clamp(2rem, 3.6vw, 2.7rem)/1.05 var(--serif); color: var(--ink); }
.gempty__title em { color: var(--brick); }
.gempty__text { margin: 0; font: 300 1rem/1.65 var(--sans); color: var(--ink-soft); }
.gempty__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: .5rem; }
.gempty .btn--ink { border: 1px solid rgba(43, 29, 20, .35); color: var(--ink); }
.gempty .btn--ink:hover { background: rgba(43, 29, 20, .06); }
.gempty .btn .arrow { width: 1.1em; height: 1.1em; }

/* =========================================================
   ARRANGING THE SCRAPBOOK (?arrange, framed by the admin;
   js/gallery/arrange.js). Only the band shows.
   ========================================================= */
.is-arrange nav.rail, .is-arrange .every, .is-arrange .vw, .is-arrange .gallery-tryout, .is-arrange [aria-label="Palette tryout"] { display: none !important; }
.is-arrange body { min-height: 100vh; padding-bottom: 110px; }
/* the admin around the frame says it is staging already; no room kept for a scrollbar */
.is-arrange .staging-tag { display: none !important; }
html.is-arrange { scrollbar-gutter: auto; }
.is-arranging .feat--scrapbook .board { outline: 1.5px dashed rgba(43, 29, 20, .3); outline-offset: 6px; border-radius: 4px; touch-action: none; user-select: none; }
.is-arranging .feat--scrapbook .it, .is-arranging .feat--scrapbook .snap, .is-arranging .feat--scrapbook .fp__cap { cursor: grab; }
.is-arranging .feat--scrapbook .snap { transition: none; }
.is-arranging .feat--scrapbook .snap:hover { translate: none; rotate: none; }
.sel { position: absolute; inset: -6px; z-index: 40; pointer-events: none; border: 1.5px dashed #fffaf0; outline: 1px solid rgba(43, 29, 20, .55); border-radius: 3px; }
/* the handles: turn (a circular arrow, above) and resize (a diagonal arrow, at the corner) */
.sel i { position: absolute; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fffaf0; color: var(--brick); border: 1.5px solid var(--brick);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); pointer-events: auto; scale: var(--k, 1); transition: background .15s, color .15s; }
.sel i svg { width: 15px; height: 15px; pointer-events: none; }
.sel i:hover { background: var(--brick); color: #fffaf0; }
.sel .h-rot { left: 50%; top: -42px; margin-left: -13px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg stroke='%23fff' stroke-width='4.5'%3E%3Cpath d='M19.2 12.6A7.3 7.3 0 1 1 16.9 6.6'/%3E%3Cpath d='M17.6 2.8v4.4h-4.4'/%3E%3C/g%3E%3Cg stroke='%232b1d14' stroke-width='2'%3E%3Cpath d='M19.2 12.6A7.3 7.3 0 1 1 16.9 6.6'/%3E%3Cpath d='M17.6 2.8v4.4h-4.4'/%3E%3C/g%3E%3C/svg%3E") 12 12, grab; }
.sel .h-rot::after { content: ''; position: absolute; left: 50%; top: 100%; height: 14px; border-left: 1.5px dashed #fffaf0; }
.sel .h-size { right: -14px; bottom: -14px; cursor: nwse-resize; }
.arrange-bar { position: fixed; z-index: 100; left: 50%; bottom: 14px; translate: -50% 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem .8rem; width: max-content; max-width: calc(100vw - 24px);
  padding: .55rem .8rem; border-radius: 18px; background: rgba(21, 16, 12, .92); backdrop-filter: blur(8px); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5); font: 500 .85rem var(--sans); color: var(--oat); }
.arrange-bar__seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.arrange-bar__seg button, .arrange-bar__btn { font: 500 .85rem var(--sans); color: var(--oat); background: none; border: 0; padding: .45rem .85rem; border-radius: 999px; cursor: pointer; }
.arrange-bar__seg button[aria-pressed="true"] { background: var(--lamp); color: var(--espresso); }
.arrange-bar__btn { border: 1px solid rgba(255, 217, 154, .25); }
.arrange-bar__btn:hover:not(:disabled) { border-color: var(--lamp); color: var(--lamp); }
.arrange-bar__btn:disabled { opacity: .4; cursor: default; }
.arrange-bar__hint { flex-basis: 100%; margin: 0; text-align: center; font: 400 .78rem var(--sans); color: var(--oat-dim); }
.arrange-bar__tray-wrap { position: relative; }
.arrange-bar__tray { position: absolute; bottom: calc(100% + 10px); left: 50%; translate: -50% 0; display: grid; grid-template-columns: repeat(4, 80px); gap: 6px; padding: 10px; border-radius: 16px; background: rgba(21, 16, 12, .96); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .6); }
.arrange-bar__tray[hidden] { display: none; }
.arrange-bar__tray button { display: grid; justify-items: center; gap: 5px; padding: 6px 4px 6px; font: 500 .72rem/1.15 var(--sans); color: var(--oat); background: rgba(255, 255, 255, .05); border: 0; border-radius: 10px; cursor: pointer; text-align: center; }
.arrange-bar__tray button:hover, .arrange-bar__tray button:focus-visible { background: rgba(255, 217, 154, .16); }
.arrange-bar__tray button:hover .arrange-bar__keep { translate: 0 -2px; rotate: -3deg; }
/* each keepsake on a little swatch of the strip's kraft, in the same pen */
.arrange-bar__keep { display: grid; place-items: center; width: 66px; height: 48px; border-radius: 6px; color: #2b1d14; overflow: hidden; transition: translate .25s ease, rotate .25s ease;
  background: #c49f74 radial-gradient(ellipse 80% 90% at 40% 30%, rgba(255, 236, 200, .3), transparent 70%); box-shadow: inset 0 0 0 1px rgba(60, 35, 15, .25); }
.arrange-bar__keep svg { display: block; width: 54px; height: 34px; overflow: visible; }
.arrange-bar__keep .doodle { opacity: .85; }
.arrange-bar__keepname { white-space: nowrap; }
.kp-note { display: flex; align-items: center; gap: 2px; padding: 0 3px; font: italic 500 .74rem/1 var(--serif); text-align: center; }
.kp-note svg { width: 9px; height: 14px; flex: none; }
.kp-stub { display: block; padding: 3px 6px 4px 9px; background: #ecd9b6; color: #5a2d1f; rotate: -4deg; box-shadow: 0 1px 2px rgba(50, 25, 8, .35); border-left: 1px dashed rgba(90, 45, 31, .5); }
.kp-stub small { display: block; font: 600 .38rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.kp-stub b { display: block; font: italic 600 .78rem/1 var(--serif); color: var(--brick); }
.arrange-bar__keep .stain { mix-blend-mode: multiply; }

/* ---------- Photos shared by guests (js/gallery/share.js) ---------- */
/* the credit: in a tile's caption, and in the viewer */
.tile__credit { font: 500 .78rem var(--sans); color: color-mix(in srgb, currentColor 75%, transparent); }
.tile__credit a { color: var(--brick); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brick) 40%, transparent); transition: border-color .2s ease; }
.tile__credit a:hover { border-color: var(--brick); }
.tile__credit a:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; border-radius: 2px; }
.vw__cap .credit { display: block; margin-top: .35rem; font: 500 .82rem var(--sans); color: color-mix(in srgb, var(--cream) 80%, transparent); }
.vw__cap .credit a { color: var(--lamp); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--lamp) 45%, transparent); }

/* "Share your photo": a polaroid waiting for its picture */
.share { margin-top: clamp(1.8rem, 3.5vw, 2.6rem); display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.share__visit { margin: 0; font: italic 500 1.1rem var(--serif); color: var(--ink-soft); }
.share__visit a { color: var(--brick); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brick) 40%, transparent); }
.share__visit a:hover { border-color: var(--brick); }
.share__card { display: flex; align-items: center; gap: 1.4rem; max-width: 34rem; padding: 1rem 1.6rem 1rem 1rem; border: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--cream-deep) 55%, transparent); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), border-color .25s ease, background .25s ease; }
.share__card:hover { transform: translateY(-2px); border-color: var(--brick); background: var(--cream-deep); }
.share__card:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }
.share__print { flex: none; display: grid; place-items: center; width: 5.2rem; aspect-ratio: .82; padding: .45rem .45rem 1.3rem; background: #fffdf8; box-shadow: 0 6px 14px rgba(43, 29, 20, .2); transform: rotate(-4deg); transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.share__card:hover .share__print { transform: rotate(2deg); }
.share__plus { display: grid; place-items: center; width: 100%; height: 100%; background: color-mix(in srgb, var(--art-bg) 85%, #000 4%); color: var(--brick); font: 300 2.2rem/1 var(--sans); }
.share__words { display: grid; gap: .25rem; }
.share__words b { font: italic 500 1.45rem/1.15 var(--serif); }
.share__words span { color: var(--ink-soft); font-size: .92rem; line-height: 1.45; }

/* the form */
.share-dlg { width: min(34rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 20px; background: var(--cream); color: var(--ink); box-shadow: 0 24px 60px rgba(20, 10, 4, .35); }
.share-dlg::backdrop { background: rgba(20, 12, 6, .55); backdrop-filter: blur(3px); }
.share-f { position: relative; display: grid; gap: .9rem; padding: 1.6rem 1.5rem 1.4rem; }
.share-f__x { position: absolute; top: .9rem; right: .9rem; width: 2.2rem; height: 2.2rem; border: 1px solid var(--line, rgba(43, 29, 20, .14)); border-radius: 50%; background: none; color: var(--ink-soft); font-size: 1.2rem; cursor: pointer; }
.share-f__title { margin: 0; font: 500 1.9rem/1.1 var(--serif); }
.share-f__title em { color: var(--brick); }
.share-f__intro { margin: -.3rem 0 0; color: var(--ink-soft); font-size: .93rem; line-height: 1.5; }
.share-f__drop { display: grid; gap: .6rem; justify-items: start; padding: .9rem; border: 1.5px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--cream-deep) 50%, transparent); cursor: pointer; }
.share-f__drop.is-full { cursor: default; }
.share-f__picks { display: flex; flex-wrap: wrap; gap: .6rem; }
.share-f__picks:empty { display: none; }
.share-f__pick { position: relative; width: 5.4rem; aspect-ratio: 1; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(43, 29, 20, .2); }
.share-f__pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-f__pick button { position: absolute; top: .25rem; right: .25rem; width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: rgba(20, 12, 6, .7); color: #fff; font-size: .9rem; line-height: 1; cursor: pointer; }
.share-f__choose { font: 600 .82rem var(--sans); letter-spacing: .04em; color: var(--brick); }
.share-f__field { display: grid; gap: .3rem; font-size: .85rem; font-weight: 500; }
.share-f__field small { color: var(--ink-soft); font-weight: 400; }
.share-f__field > span { display: flex; align-items: baseline; gap: .35rem; }
.share-f__left { margin-left: auto; font-size: .78rem; font-variant-numeric: tabular-nums; }
.share-f__left.is-low { color: #b8432f; font-weight: 600; }
.share-f__field input { padding: .6rem .75rem; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 10px; background: #fffdf8; color: var(--ink); font: inherit; font-weight: 400; }
.share-f__field input:focus { outline: 2px solid color-mix(in srgb, var(--brick) 50%, transparent); outline-offset: 1px; }
/* Instagram: the @ sits in the field, so only the name is typed */
.share-f__at { position: relative; display: block; }
.share-f__at i { position: absolute; left: .75rem; top: 50%; translate: 0 -50%; font-style: normal; color: var(--ink-soft); pointer-events: none; }
.share-f__at input { width: 100%; box-sizing: border-box; padding-left: 1.6rem; }
.share-f__two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.share-f__ok { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; line-height: 1.45; cursor: pointer; }
.share-f__ok input { margin-top: .2rem; accent-color: var(--brick); width: 1.05rem; height: 1.05rem; flex: none; }
.share-f__ok { margin: 0 -.5rem; padding: .5rem; border-radius: 10px; border: 1.5px solid transparent; transition: border-color .2s ease, background .2s ease; }
.share-f__ok.is-missing { border-color: #b8432f; background: rgba(184, 67, 47, .07); animation: share-nudge .4s ease; }
@keyframes share-nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .share-f__ok.is-missing, .share-f__ok.is-next { animation: none; } }
.share-f__note { margin: -.6rem 0 0 1.65rem; color: var(--ink-soft); font-size: .8rem; font-style: italic; line-height: 1.45; }
.share-f__msg { margin: 0; color: #9c3a28; font-size: .86rem; }
.share-f__msg:empty { display: none; }
.share-f__acts { display: flex; justify-content: flex-end; align-items: center; gap: .8rem; margin-top: .2rem; }
.share-f__ok.is-next { border-color: color-mix(in srgb, var(--amber) 70%, transparent); animation: share-glow 2.4s ease-in-out infinite; }
@keyframes share-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 146, 90, 0); background: transparent; } 50% { box-shadow: 0 0 0 4px rgba(232, 146, 90, .18); background: rgba(232, 146, 90, .07); } }
.share-f [type=submit]:disabled { opacity: .45; cursor: not-allowed; filter: saturate(.6); }
@media (max-width: 520px) { .share__card { gap: 1rem; padding-right: 1rem; } .share-f__two { grid-template-columns: 1fr; } }

/* the thank-you: the photos develop as polaroids */
.share-f--thanks { justify-items: center; text-align: center; padding-top: 2rem; }
.share-f__prints { display: flex; justify-content: center; margin-bottom: .4rem; }
.share-f__print { width: 7rem; padding: .45rem .45rem 1.6rem; background: #fffdf8; box-shadow: 0 8px 18px rgba(43, 29, 20, .25); transform: rotate(calc(-5deg + var(--i) * 6deg)); margin: 0 -.6rem; animation: share-drop .7s cubic-bezier(.3, 1.3, .5, 1) both; animation-delay: calc(var(--i) * .15s); }
.share-f__print img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; animation: share-develop 2.8s ease-out both; animation-delay: calc(.3s + var(--i) * .2s); }
@keyframes share-drop { from { opacity: 0; transform: translateY(-14px) rotate(calc(-5deg + var(--i) * 6deg)); } }
@keyframes share-develop { from { filter: sepia(1) brightness(1.9) contrast(.5) blur(2px); opacity: .7; } to { filter: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .share-f__print, .share-f__print img { animation: none; } .share__card, .share__print { transition: none; } }
