/* Shared montage. Fonts are supplied by the existing NAS shell; no font requests. */
.as-scroll {
  --as-paper: #f1eadc;
  --as-reading: #f8f2e7;
  --as-ink: #19221e;
  --as-muted: #505a50;
  --as-seal: #a53628;
  --as-warm: #ecb49a;
  --as-line: #c8bfae;
  --as-silk: #737c69;
  --as-edge: 6px;
  --as-gutter: 12px;
  --as-serif: 'Cormorant Garamond', 'Shippori Mincho', Georgia, serif;
  --as-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1320px;
  min-width: 0;
  margin: 0 auto;
  color: var(--as-ink);
  color-scheme: light;
  font: 400 14px/1.65 var(--as-sans);
  text-align: start;
  overflow-wrap: anywhere;
}
.as-scroll *, .as-scroll *::before, .as-scroll *::after { box-sizing: border-box; }
.as-scroll :is(h2, h3, h4, p, figure) { margin: 0; }
.as-scroll :is(a, button, summary) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.as-scroll :is(a, button, summary):focus-visible { outline: 3px solid var(--as-seal); outline-offset: 3px; }
.as-scroll :is(button, a, summary) { font-family: var(--as-sans); }
.as-scroll [hidden] { display: none !important; }
.as-scroll ::selection { background: var(--as-seal); color: var(--as-reading); }

/* The controls remain in normal flow; no global chrome, body state or scroll trap. */
.as-scroll .as-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 2px 12px;
  color: var(--as-ink);
}
.as-scroll .as-view-switch { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--as-line); border-radius: 28px; background: var(--as-reading); }
.as-scroll .as-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 24px;
  color: var(--as-ink);
  background: transparent;
  font: 500 12px/1.4 var(--as-sans);
  cursor: pointer;
  white-space: normal;
  text-align: center;
}
.as-scroll .as-view-switch .as-control[aria-pressed="true"] { background: var(--as-ink); color: var(--as-reading); }
.as-scroll .as-motion-control { border-radius: 0; border-bottom-color: var(--as-line); background: var(--as-reading); padding-inline: 8px; }
.as-scroll .as-motion-control[aria-pressed="true"] { border-bottom-color: var(--as-seal); }
.as-scroll .as-control:disabled { cursor: default; opacity: .7; }

/* A mounted sheet, visible abstract art and two still end rollers. */
.as-scroll .as-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: calc(100% - 4px);
  min-width: 0;
  margin: 0 2px;
  padding: 48px var(--as-gutter) 32px;
  background: var(--as-silk);
  background-image: repeating-linear-gradient(90deg, #ffffff18 0 1px, transparent 1px 4px), repeating-linear-gradient(0deg, #293d2017 0 1px, transparent 1px 3px);
  box-shadow: 0 12px 36px #29332320;
}
.as-scroll .as-surface::before {
  content: '';
  position: absolute;
  z-index: -3;
  inset: 21px var(--as-edge);
  border-inline: 1px solid #c4b58d;
  background: var(--as-paper);
  background-image: repeating-linear-gradient(98deg, transparent 0 5px, #685b3f0a 6px, transparent 7px), repeating-linear-gradient(5deg, transparent 0 8px, #ffffff40 9px, transparent 10px);
  pointer-events: none;
}
.as-scroll .as-roller {
  position: absolute;
  z-index: 4;
  left: 1px;
  right: 1px;
  height: 21px;
  border-radius: 5px;
  background: linear-gradient(180deg, #2f332b 0, #7b7560 17%, #b4a98b 32%, #746b54 48%, #383d32 83%, #202b24 100%);
  box-shadow: 0 4px 7px #17291e26;
  pointer-events: none;
}
.as-scroll .as-roller-top { top: 0; }
.as-scroll .as-roller-bottom { bottom: 0; }
.as-scroll .as-roller::before, .as-scroll .as-roller::after { content: ''; position: absolute; inset-block: 2px; width: 8px; border: 1px solid #283124; border-radius: 3px; background: linear-gradient(90deg, #222a22, #8a856c 42%, #343c2f 78%); }
.as-scroll .as-roller::before { left: 0; }
.as-scroll .as-roller::after { right: 0; }
.as-scroll .as-roller > span { position: absolute; left: 6%; right: 6%; top: 2px; height: 1px; background: #e5dbc55c; }
.as-scroll .as-atmosphere { position: absolute; z-index: -2; inset: 22px var(--as-edge); overflow: hidden; pointer-events: none; }
.as-scroll .as-wash { position: absolute; inset: 0 0 auto; height: 1020px; background-image: linear-gradient(180deg, transparent 0 64%, var(--as-paper) 98%), url('/art/album-scroll/wash.webp'); background-size: 100% 100%, auto 760px; background-repeat: no-repeat; background-position: center, 52% top; }
.as-scroll .as-river { position: absolute; top: 780px; bottom: 0; left: 0; right: 0; opacity: .72; background-image: url('/art/album-scroll/river.webp'); background-size: auto 1250px; background-repeat: repeat-y; background-position: center top; }

/* Opening title is solid ink, leaving spare painting around the full image. */
.as-scroll .as-source-group { position: relative; min-width: 0; }
.as-scroll .as-opening { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 10px; padding-bottom: 36px; }
.as-scroll .as-intro {
  position: relative;
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 26px 14px 56px;
  color: var(--as-reading);
  background: var(--as-ink);
}
.as-scroll .as-intro::after { content: ''; position: absolute; bottom: -18px; left: 0; right: 0; height: 22px; background: var(--as-ink); clip-path: polygon(0 0, 100% 0, 100% 61%, 88% 75%, 71% 48%, 58% 100%, 42% 65%, 29% 84%, 12% 50%, 0 71%); pointer-events: none; }
.as-scroll .as-label { display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 22px; color: var(--as-warm); font-size: 11px; line-height: 1.6; letter-spacing: .1em; white-space: pre-wrap; }
.as-scroll .as-seal { display: block; flex: 0 0 30px; width: 30px; height: 38px; background: var(--as-seal); border: 3px double var(--as-reading); clip-path: polygon(1% 3%, 96% 0, 100% 94%, 5% 100%, 0 65%); }
.as-scroll .as-title { max-width: 100%; color: inherit; font: 500 clamp(46px, 15vw, 76px)/.99 var(--as-serif); letter-spacing: -.04em; white-space: pre-wrap; overflow-wrap: anywhere; }
.as-scroll .as-scope-note { max-width: 50ch; margin-top: 24px; color: #e3e5d9; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.as-scroll .as-opening-shot { position: relative; z-index: 1; grid-column: 4 / -1; grid-row: 2; width: 100%; min-width: 0; max-width: 380px; justify-self: end; margin-top: -17px; }
.as-scroll .as-opening-stroke { grid-column: 1 / 4; grid-row: 2; align-self: start; width: 60%; height: 140px; margin-top: 48px; background: #263e31; clip-path: polygon(44% 0, 84% 4%, 67% 28%, 86% 46%, 53% 62%, 63% 86%, 19% 100%, 34% 68%, 17% 54%, 43% 29%); opacity: .75; pointer-events: none; }
.as-scroll .as-group-heading { position: relative; z-index: 1; width: fit-content; max-width: 100%; margin: 18px 0 28px; padding: 8px 6px; color: var(--as-ink); background: var(--as-reading); font: 500 clamp(30px, 9vw, 54px)/1.05 var(--as-serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.as-scroll .as-opening-shot > .as-group-heading { margin: 28px 0 20px; font-size: clamp(22px, 6.5vw, 34px); }

/* Source order is DOM order. Pairs share a row even on the narrowest phones. */
.as-scroll .as-chapter { position: relative; isolation: isolate; min-width: 0; padding: 36px 0 48px; }
.as-scroll .as-pair { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: start; gap: 24px 16px; }
.as-scroll .as-pair > .as-moment:nth-child(2) { margin-top: 36px; }
.as-scroll .as-pair-reverse { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
.as-scroll .as-pair-reverse > .as-moment:nth-child(2) { margin-top: 30px; }
.as-scroll .as-ink { color: var(--as-reading); }
.as-scroll .as-ink::before { content: ''; position: absolute; z-index: -1; top: -4px; bottom: -4px; left: calc(var(--as-edge) - var(--as-gutter)); right: calc(var(--as-edge) - var(--as-gutter)); background-image: linear-gradient(115deg, #19221eeb, #19221ef5), url('/art/album-scroll/river.webp'); background-size: cover; background-position: center; pointer-events: none; }
.as-scroll .as-broad { padding-top: 28px; padding-bottom: 40px; }
.as-scroll .as-feature > .as-moment { width: 82%; max-width: 760px; margin-left: auto; }
.as-scroll .as-single > .as-moment { grid-column: 1 / -1; width: 76%; max-width: 640px; }
.as-scroll .as-ink.as-single > .as-moment { margin-left: auto; }
.as-scroll .as-broad > .as-moment { width: 100%; }

/* Mats stay behind photo pixels. Photographs are never cropped or transformed. */
.as-scroll .as-moment { position: relative; z-index: 1; align-self: start; min-width: 0; width: 100%; max-width: 100%; }
.as-scroll .as-photo-window { position: relative; isolation: isolate; display: block; width: 100%; min-width: 0; min-height: 44px; color: var(--as-ink); background: #ded8c9; text-decoration: none; }
.as-scroll .as-landscape { aspect-ratio: 4 / 3; }
.as-scroll .as-portrait { aspect-ratio: 3 / 4; }
.as-scroll .as-photo-window::before { content: ''; position: absolute; z-index: -1; inset: -4px; background: #faf4e7; clip-path: polygon(0 2%, 13% 1%, 26% 2%, 40% 0, 56% 1%, 71% 0, 89% 2%, 99% 0, 100% 21%, 99% 44%, 100% 68%, 99% 85%, 100% 99%, 82% 98%, 65% 100%, 47% 99%, 30% 100%, 12% 98%, 0 100%, 1% 79%, 0 55%, 1% 30%); pointer-events: none; }
.as-scroll .as-photo-window::after { content: ''; position: absolute; z-index: -2; inset: -10px -6px -9px; background: #52634f; clip-path: polygon(2% 4%, 24% 0, 53% 2%, 78% 0, 98% 3%, 96% 29%, 100% 62%, 97% 94%, 79% 97%, 58% 95%, 38% 100%, 10% 96%, 0 99%, 3% 68%, 0 38%); pointer-events: none; }
.as-scroll .as-moment:nth-child(2) .as-photo-window::after { background: #92967b; }
.as-scroll .as-opening-shot .as-photo-window::after { background: #263e31; inset: -13px -6px -10px -9px; }
.as-scroll .as-image { position: relative; display: block; width: 100%; height: 100%; max-width: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; object-fit: contain; object-position: center; aspect-ratio: inherit; transform: none; filter: none; transition: none; }
.as-scroll .as-video-placeholder, .as-scroll .as-unavailable { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px 6px; font: 500 12px/1.6 var(--as-sans); text-align: center; background: #ded8c9; color: var(--as-ink); }
.as-scroll .as-play-icon { flex: 0 0 auto; width: 20px; height: 20px; }
.as-scroll .as-video-placeholder .as-play-icon { width: 32px; height: 32px; }

/* Small, stable captions; Notes expand below their controls in normal flow. */
.as-scroll .as-meta { position: relative; min-width: 0; margin-top: 15px; padding: 8px 0 0; color: var(--as-ink); background: var(--as-reading); }
.as-scroll .as-photo-title { font: 500 clamp(22px, 5.6vw, 30px)/1.06 var(--as-serif); letter-spacing: -.02em; white-space: pre-wrap; overflow-wrap: anywhere; }
.as-scroll .as-opening-shot .as-photo-title { font-size: clamp(26px, 6.5vw, 34px); }
.as-scroll .as-broad .as-photo-title { font-size: clamp(30px, 8vw, 48px); }
.as-scroll .as-kind { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px; font-size: 11px; font-weight: 600; }
.as-scroll .as-kind .as-play-icon { width: 14px; height: 14px; }
.as-scroll .as-photo-actions { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 44px; padding-right: 44px; }
.as-scroll .as-open { position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; min-width: 44px; min-height: 44px; max-width: 100%; color: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.as-scroll .as-open > span { font-size: 18px; }
.as-scroll .as-open:hover { text-decoration: underline; text-underline-offset: 4px; }
.as-scroll .as-notes { min-width: 0; }
.as-scroll .as-notes > summary { min-width: 44px; min-height: 44px; padding: 10px 0; color: inherit; font: 500 12px/24px var(--as-sans); cursor: pointer; }
.as-scroll .as-notes > summary::marker { color: var(--as-seal); }
.as-scroll .as-notes[open] { width: calc(100% + 44px); }
.as-scroll .as-notes[open] > summary { width: calc(100% - 44px); }
.as-scroll .as-note-body { padding: 2px 2px 14px; color: var(--as-ink); background: var(--as-reading); }
.as-scroll .as-note-body :is(.as-place, .as-date, .as-caption) { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.as-scroll .as-place, .as-scroll .as-date { color: var(--as-muted); font-size: 12px; line-height: 1.65; }
.as-scroll .as-caption { font-size: 13px; line-height: 1.75; }
.as-scroll .as-ink .as-meta { color: var(--as-reading); background: var(--as-ink); }
.as-scroll .as-ink .as-notes > summary::marker { color: var(--as-warm); }
.as-scroll .as-ink .as-note-body { padding-inline: 6px; }
.as-scroll .as-ink :is(.as-photo-window, .as-open, summary):focus-visible { outline-color: var(--as-warm); }
.as-scroll .as-feedback { margin-top: 16px; padding: 10px 6px; border-left: 3px solid var(--as-seal); color: var(--as-ink); background: var(--as-reading); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.as-scroll .as-retry { min-width: 44px; min-height: 44px; max-width: 100%; margin-top: 8px; padding: 8px; border: 0; border-radius: 0; color: var(--as-reading); background: var(--as-ink); font: 500 12px/1.4 var(--as-sans); white-space: normal; cursor: pointer; }
.as-scroll .as-tail { display: flex; justify-content: center; padding: 40px 0 20px; }
.as-scroll .as-tail > span { width: 30px; height: 36px; border: 3px double var(--as-reading); background: var(--as-seal); clip-path: polygon(5% 0, 100% 4%, 94% 100%, 0 93%); }
.as-scroll .as-empty-opening .as-intro { padding-bottom: 30px; }
.as-scroll .as-empty { position: relative; margin-top: 40px; padding: 20px 12px; background: var(--as-reading); color: var(--as-ink); white-space: pre-wrap; }

/* Desktop widens the same continuous sheet rather than introducing a new layout. */
@media (min-width: 601px) {
  .as-scroll { --as-edge: 10px; --as-gutter: clamp(24px, 3.8vw, 54px); }
  .as-scroll .as-surface { width: calc(100% - 16px); margin-inline: 8px; padding-top: 70px; padding-bottom: 42px; }
  .as-scroll .as-surface::before { inset-block: 24px; }
  .as-scroll .as-atmosphere { inset-block: 25px; }
  .as-scroll .as-roller { height: 24px; }
  .as-scroll .as-opening { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 36px; padding-bottom: 70px; }
  .as-scroll .as-intro { grid-column: 1; grid-row: 1; padding: 34px 24px 46px; }
  .as-scroll .as-intro::after { inset: 0 -20px -14px auto; width: 24px; height: auto; clip-path: polygon(0 0, 70% 0, 45% 13%, 88% 24%, 54% 38%, 100% 51%, 58% 67%, 82% 81%, 42% 94%, 0 100%); }
  .as-scroll .as-title { font-size: clamp(54px, 7.2vw, 104px); }
  .as-scroll .as-opening-shot { grid-column: 2; grid-row: 1; margin-top: 140px; }
  .as-scroll .as-opening-stroke { grid-column: 2; grid-row: 1; width: 40px; height: 90px; margin-top: 0; justify-self: center; }
  .as-scroll .as-pair { column-gap: clamp(22px, 3.5vw, 46px); }
  .as-scroll .as-pair > .as-moment:nth-child(2) { margin-top: 80px; }
  .as-scroll .as-pair-reverse > .as-moment:nth-child(2) { margin-top: 110px; }
  .as-scroll .as-chapter { padding-top: 52px; padding-bottom: 70px; }
  .as-scroll .as-broad { padding-top: 32px; padding-bottom: 58px; }
  .as-scroll .as-photo-title { font-size: clamp(28px, 3vw, 40px); }
  .as-scroll .as-broad .as-photo-title { font-size: clamp(36px, 4vw, 54px); }
  .as-scroll .as-meta { margin-top: 20px; padding-inline: 6px; }
  .as-scroll .as-photo-window::before { inset: -6px; }
  .as-scroll .as-photo-window::after { inset: -13px -10px -11px; }
  .as-scroll .as-tail { padding: 58px 0 26px; }
}

/* Gallery is an ordinary static layout; flatten only our own chapter wrappers. */
.as-scroll.as-gallery .as-surface { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 24px 14px 32px; background: var(--as-reading); box-shadow: none; }
.as-scroll.as-gallery :is(.as-surface::before, .as-atmosphere, .as-roller, .as-tail, .as-opening-stroke, .as-intro::after, .as-chapter::before) { display: none; }
.as-scroll.as-gallery :is(.as-source-group, .as-opening, .as-opening-shot, .as-chapter) { display: contents; }
.as-scroll.as-gallery .as-intro { grid-column: 1 / -1; grid-row: auto; padding: 0; color: var(--as-ink); background: transparent; }
.as-scroll.as-gallery .as-label { color: var(--as-muted); margin-bottom: 12px; }
.as-scroll.as-gallery .as-seal { display: none; }
.as-scroll.as-gallery .as-title { font-size: clamp(40px, 7vw, 64px); }
.as-scroll.as-gallery .as-scope-note { max-width: none; color: var(--as-muted); margin-top: 16px; }
.as-scroll.as-gallery .as-group-heading { grid-column: 1 / -1; margin: 0; padding: 12px 0 4px; font-size: 30px; }
.as-scroll.as-gallery .as-moment,
.as-scroll.as-gallery .as-chapter > .as-moment:nth-child(n) { grid-column: auto; grid-row: auto; width: 100%; max-width: 100%; margin: 0; color: var(--as-ink); }
.as-scroll.as-gallery .as-photo-window { aspect-ratio: 4 / 3; }
.as-scroll.as-gallery .as-photo-window::before, .as-scroll.as-gallery .as-photo-window::after { display: none; }
.as-scroll.as-gallery .as-meta { color: var(--as-ink); background: var(--as-reading); margin-top: 12px; }
.as-scroll.as-gallery .as-photo-title { font-size: 30px; }
.as-scroll.as-gallery .as-notes > summary::marker { color: var(--as-seal); }
.as-scroll.as-gallery :is(a, button, summary):focus-visible { outline-color: var(--as-seal); }
.as-scroll.as-gallery .as-empty-opening { grid-column: 1 / -1; }
@media (min-width: 601px) {
  .as-scroll.as-gallery .as-surface { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding: 28px 24px 38px; }
}
@media (min-width: 1001px) {
  .as-scroll.as-gallery .as-surface { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* One event-driven reveal only; no position animation, loop, parallax or clipping. */
.as-scroll .as-revealing .as-photo-window { animation: as-photo-reveal 780ms ease-out both; }
@keyframes as-photo-reveal { from { opacity: .4; } to { opacity: 1; } }
.as-scroll.as-motion-off .as-revealing .as-photo-window,
.as-scroll.as-gallery .as-revealing .as-photo-window { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .as-scroll *, .as-scroll *::before, .as-scroll *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Explicit shell integration: these rules never change unrelated site controls. */
.album-public .filters :is(button, input, select),
.album-public .sugg button,
.album-public .sbar :is(button, input),
.album-public .galhead button,
.mem .filters :is(button, input, select),
.mem .mem-more button,
.mem .mem-unavailable button { min-width: 44px; min-height: 44px; max-width: 100%; }
.album-public .filters, .mem .filters { min-width: 0; }
.album-public .filters .seg, .mem .filters .seg { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
.album-public .filters button, .album-public .sugg button, .mem .filters button { white-space: normal; overflow-wrap: anywhere; }
.album-public .sbar { min-width: 0; }
.album-public .sbar input { min-width: 0; flex: 1 1 0; }
.album-public .sbar .btn,
.mx .mem .filters .btn,
.mem .filters .btn { color: #f8f2e7; background: #19221e; border-color: #19221e; }
.album-public .filters .chip,
.album-public .sugg .chip,
.mx .mem .filters .chip,
.mem .filters .chip { color: #19221e; background: #f8f2e7; border: 1px solid #a7aa99; }
.album-public .filters .chip.on,
.album-public .filters .chip[aria-pressed="true"],
.album-public .sugg .chip:hover,
.mx .mem .filters .chip.on,
.mx .mem .filters .chip[aria-pressed="true"],
.mem .filters .chip.on,
.mem .filters .chip[aria-pressed="true"] { color: #f8f2e7; background: #19221e; border-color: #19221e; }
.album-public :is(.filters, .sugg, .sbar, .galhead) :is(button, input, select):focus-visible,
.mem .filters :is(button, input, select):focus-visible { outline: 3px solid #a53628; outline-offset: 3px; }

@media print {
  .as-scroll .as-toolbar, .as-scroll .as-atmosphere, .as-scroll .as-roller, .as-scroll .as-tail { display: none; }
  .as-scroll .as-surface { width: 100%; margin: 0; padding: 16px; background: white; box-shadow: none; }
  .as-scroll .as-surface::before, .as-scroll .as-chapter::before, .as-scroll .as-intro::after, .as-scroll .as-photo-window::before, .as-scroll .as-photo-window::after { display: none; }
  .as-scroll .as-intro, .as-scroll .as-meta, .as-scroll .as-ink .as-meta { background: white; color: black; }
  .as-scroll .as-label, .as-scroll .as-scope-note { color: black; }
  .as-scroll .as-moment { break-inside: avoid; }
  .as-scroll .as-revealing .as-photo-window { animation: none; }
}
