/* 鹿角梁 · the story inside the book. An album of mounted leaves (册页): each photograph mounted on a leaf of
   cream board with a double-ruled frame and an inscription; the leaves turn upward over their top edge.
   Phone first: one leaf fills the screen; photographs are never shown larger than they were taken. */
.lj { --paper: #F4F2ED; --board: #F2EEE5; --board2: #E8E2D6; --ink: #1C1A17; --ink2: #3B3731; --mid: #8d8b86;
  --lj-serif: "Newsreader", "Noto Serif SC", "Songti SC", serif; --lj-sans: "Inter Tight", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink); }
.lj section { position: relative; }
.lj .stg { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.lj-hero { position: absolute; inset: 0; z-index: 5; transform-origin: 50% 40%; }

/* the album */
.lj-book { position: absolute; left: 50%; top: 50%; width: var(--lw); height: var(--lh); margin: calc(var(--lh) / -2 + 18px) 0 0 calc(var(--lw) / -2);
  perspective: 2200px; perspective-origin: 50% -20%; }
.lj-leaf { position: absolute; inset: 0; transform-origin: 50% 0; transform-style: preserve-3d; }
.lj-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 2px; }
.lj-front { display: flex; flex-direction: column; align-items: center; padding: calc(var(--lh) * .09) calc(var(--lw) * .1) calc(var(--lh) * .06);
  background: var(--board) url("/lab/shelf/grain.png") 0 0 / 200px 200px;
  box-shadow: inset 0 0 0 1px rgba(28,26,23,.1), 0 1px 2px rgba(40,30,15,.08), 0 22px 40px -26px rgba(40,30,15,.45); }
/* the board's own ruled border, a little inside its edge */
.lj-front::before { content: ""; position: absolute; inset: calc(var(--lw) * .035); border: 1px solid rgba(28,26,23,.2); pointer-events: none; }
.lj-back { transform: rotateX(180deg); background: var(--board2) url("/lab/shelf/grain.png") 0 0 / 200px 200px; box-shadow: inset 0 0 0 1px rgba(28,26,23,.1); }
.lj-back i { position: absolute; inset: calc(var(--lw) * .035); border: 1px solid rgba(28,26,23,.12); }
.lj-shade { position: absolute; inset: 0; background: #1C1A17; opacity: 0; pointer-events: none; border-radius: 2px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }

/* a photograph set into the board: a fine dark line, a narrow margin of board, and a second faint line */
.lj-mat { flex: none; width: min(calc(var(--lw) * .8), calc(var(--lh) * .58 * var(--r, .75))); aspect-ratio: var(--r, .75); background: #DDD6C8;
  box-shadow: 0 0 0 1px rgba(28,26,23,.55), 0 0 0 calc(var(--lw) * .018) var(--board), 0 0 0 calc(var(--lw) * .018 + 1px) rgba(28,26,23,.22); }
.wide .lj-mat { margin-top: calc(var(--lh) * .06); }
.lj-mat img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lj-ins { margin-top: calc(var(--lh) * .06); text-align: center; }
.lj-lb { font: 600 max(10px, calc(var(--lw) * .024))/1 var(--lj-sans); letter-spacing: .26em; color: var(--acc); }
.lj-tx { margin-top: calc(var(--lh) * .022); font: 400 max(14px, calc(var(--lw) * .036))/1.9 var(--lj-serif); letter-spacing: .1em; color: var(--ink2); max-width: 20em; }
.lj-no { position: absolute; right: calc(var(--lw) * .08); bottom: calc(var(--lh) * .045); font: 500 max(10px, calc(var(--lw) * .022))/1 var(--lj-serif); letter-spacing: .2em; color: var(--mid); }
.lj-seal { display: inline-block; writing-mode: vertical-rl; background: var(--acc); color: var(--paper); font: 600 max(12px, calc(var(--lw) * .03))/1.15 var(--lj-serif); font-style: normal; letter-spacing: .06em; padding: .5em .36em; border-radius: 2px; }

/* the title leaf: a green slip pasted on the board, as on the cover of an album */
.lj-title { justify-content: center; }
.lj-slip { position: relative; width: calc(var(--lw) * .24); height: calc(var(--lh) * .6); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--lh) * .03);
  background: var(--acc) url("/lab/shelf/grain.png") 0 0 / 200px 200px; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 10px 20px -14px rgba(20,40,30,.6); }
.lj-slip::before { content: ""; position: absolute; inset: calc(var(--lw) * .014); border: 1px solid rgba(244,242,237,.45); }
.lj-slip h2 { writing-mode: vertical-rl; font: 600 calc(var(--lw) * .12)/1 var(--lj-serif); letter-spacing: .24em; color: var(--paper); }
.lj-slip p { writing-mode: vertical-rl; font: 500 max(10px, calc(var(--lw) * .024))/1 var(--lj-sans); letter-spacing: .3em; color: rgba(244,242,237,.8); }
.lj-sub { margin-top: calc(var(--lh) * .05); font: 500 max(10px, calc(var(--lw) * .024))/1 var(--lj-sans); letter-spacing: .3em; color: var(--mid); }
.lj-title .lj-seal, .lj-blank .lj-seal { position: absolute; left: calc(var(--lw) * .09); bottom: calc(var(--lh) * .07); }

/* the last leaf: the board with an empty window where a photograph would be */
.lj-blank .lj-mat { --r: .75; background: transparent; box-shadow: inset 0 1px 3px rgba(40,30,15,.18), 0 0 0 1px rgba(28,26,23,.18); }
.lj-blank .lj-tx { font-size: max(13.5px, calc(var(--lw) * .032)); line-height: 2; }

.lj-meta { position: absolute; left: 0; right: 0; bottom: max(14px, 2.4vh); text-align: center; font: 500 11px/1 var(--lj-sans); letter-spacing: .2em; color: var(--mid); opacity: 0; pointer-events: none; }
.lj-meta .cur { color: var(--ink); font-variant-numeric: tabular-nums; }
