#noteCard .notePhotos{display:block;margin:22px 0 20px}
.memoryAlbum{--frame:#f7f3eb;--edge:#c5b8a6;outline-offset:6px}
.memoryBook{position:relative;perspective:none;margin:0 9px 0 16px;isolation:isolate;touch-action:pan-y}
.memoryBook::before,.memoryBook::after{content:"";position:absolute;inset:0;border:1px solid #c9bba8;border-radius:5px;background:#ece3d5;z-index:-1;box-shadow:1px 2px 3px #47342130;transform:translate(4px,-4px) rotate(1deg)}
.memoryBook::after{transform:translate(8px,-8px) rotate(2deg);background:#dfc6c2;z-index:-2}
.memoryLeaf{position:relative;margin:0;padding:12px 12px 0 17px;background:var(--frame);border:1px solid #d0c5b6;border-radius:4px;box-shadow:0 7px 14px #3d35222b,inset 3px 0 2px #fff;transform-origin:3px center;backface-visibility:visible}
.memoryLeaf::before{content:"";position:absolute;left:4px;top:17px;width:6px;height:6px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#e1d8c4,#85765c 65%,#534938);box-shadow:0 0 0 1px #e3d7c4,0 1px 2px #0004}
.memoryLeaf::after{content:"";position:absolute;left:4px;bottom:17px;width:6px;height:6px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#e1d8c4,#85765c 65%,#534938);box-shadow:0 0 0 1px #e3d7c4}
.memorySurface{aspect-ratio:4/5;background:#e7e3dc;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:inset 0 0 0 1px #0001}
#noteCard .notePhotos .memorySurface img,.memorySurface video{display:block;width:100%;height:100%;max-height:100%;aspect-ratio:auto;object-fit:contain;border:0;border-radius:0;filter:none;background:#e7e3dc}
.memoryCaption{min-height:42px;display:flex;align-items:center;justify-content:center;text-align:center;padding:8px 2px;font-size:12px;line-height:1.5;letter-spacing:.04em;color:#62574c}
.memoryControls{display:flex;align-items:center;justify-content:center;gap:16px;padding:14px 0 0;font-size:12px;color:#766754}
.memoryControls button{width:40px;height:36px;border:1px solid #c9bead;border-radius:7px;background:#f5f0e6;color:#534735;font-size:20px;cursor:pointer}
.memoryControls button:disabled{opacity:.32;cursor:default}.memoryCount{min-width:44px;text-align:center;font-variant-numeric:tabular-nums}.memoryTurning{position:absolute;inset:0;z-index:2;pointer-events:none}
@media(max-width:600px){.memoryBook{max-width:280px;margin-left:auto;margin-right:auto}.memorySurface{aspect-ratio:1/1}}

/* The native video stays on a flat compositor layer between page turns. */
.memoryBook.memoryFlipping{perspective:950px}.memoryTurning{backface-visibility:hidden}.memorySurface video{will-change:transform}
