#renovation-roll.memory-gallery{padding:clamp(42px,5vw,68px) 24px;background:radial-gradient(ellipse at 50% 55%,#152237 0%,#080e19 60%,#060a12 100%);color:#f5eedf;overflow:hidden}
.memory-gallery .gallery-head{max-width:880px;margin:0 auto 24px;display:block;text-align:center}
.memory-gallery .gallery-head .eyebrow{color:#dfbc70;margin-bottom:12px}
.memory-gallery .gallery-head h2{font-size:clamp(32px,3.8vw,52px);line-height:1.14}
.memory-gallery .gallery-head>p{margin:14px auto 0;max-width:580px;color:#b8c2d1;font-size:15px}
.memory-stage{position:relative;height:350px;max-width:1060px;margin:auto;perspective:1300px;touch-action:pan-y;cursor:grab;user-select:none}
.memory-stage:active{cursor:grabbing}
.memory-card{position:absolute;top:0;left:50%;width:300px;height:350px;margin-left:-150px;padding:12px;background:linear-gradient(145deg,#172338,#0a101b);border:1px solid #9e7b40;border-radius:8px;box-shadow:0 22px 45px #0008;cursor:pointer;transition:transform .55s cubic-bezier(.22,.75,.2,1),opacity .55s,filter .55s;transform-style:preserve-3d;backface-visibility:hidden;overflow:hidden}
.memory-card img{width:100%;height:100%;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
.memory-card[data-position='0']{transform:translateX(0) rotateY(0);z-index:5;filter:none;opacity:1;box-shadow:0 24px 55px #0009,0 0 30px #d4a65918}
.memory-card[data-position='-1']{transform:translateX(-235px) translateZ(-100px) rotateY(28deg) scale(.9);z-index:4;filter:brightness(.7);opacity:.9}
.memory-card[data-position='1']{transform:translateX(235px) translateZ(-100px) rotateY(-28deg) scale(.9);z-index:4;filter:brightness(.7);opacity:.9}
.memory-card[data-position='-2']{transform:translateX(-405px) translateZ(-210px) rotateY(40deg) scale(.8);z-index:3;filter:brightness(.5);opacity:.65}
.memory-card[data-position='2']{transform:translateX(405px) translateZ(-210px) rotateY(-40deg) scale(.8);z-index:3;filter:brightness(.5);opacity:.65}
.memory-card[data-position='hidden']{transform:translateZ(-320px) scale(.65);opacity:0;pointer-events:none;z-index:1}
.memory-controls{display:flex;justify-content:center;align-items:center;gap:24px;margin:24px 0 0}
.memory-arrow,.memory-all-button,.memory-dialog button{min-height:44px;color:#f5dfae;background:#111c2b;border:1px solid #91713c;cursor:pointer;border-radius:4px;font:600 14px/1.2 'DM Sans',sans-serif}
.memory-arrow{width:46px;font-size:23px}
.memory-counter{color:#edd8aa;font-size:14px;min-width:72px;text-align:center;font-variant-numeric:tabular-nums}
.memory-footer{display:flex;align-items:center;justify-content:center;gap:24px;margin-top:18px}
.memory-footer p{font-size:12px;color:#aab6c8;margin:0}
.memory-all-button{padding:12px 22px}
.memory-gallery button:focus-visible,.memory-dialog button:focus-visible{outline:3px solid #f2d99e;outline-offset:4px}
.memory-gallery button:hover{border-color:#f2d99e}
.memory-dialog{position:fixed;inset:0;width:min(1160px,calc(100vw - 32px));height:min(850px,calc(100dvh - 32px));max-width:none;max-height:none;padding:0;border:1px solid #9c7b45;border-radius:8px;background:#090f1a;color:#f5eedf;box-shadow:0 30px 100px #0009;margin:auto}
.memory-dialog::backdrop{background:#03060be8;backdrop-filter:blur(6px)}
.memory-dialog[open]{display:flex;flex-direction:column}
.memory-dialog-bar{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;gap:18px;border-bottom:1px solid #8d704544;flex-shrink:0}
.memory-dialog-bar h3{margin:0;font:400 22px/1.2 'Libre Baskerville',serif}
.memory-dialog-bar button{width:44px;font-size:25px;flex-shrink:0}
.memory-dialog .gallery-grid{overflow:auto;min-height:0;padding:20px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));width:100%;align-content:start;gap:12px}
.memory-dialog .gallery-item{height:160px;border:1px solid #8a6c383d;background:#111b2a;box-shadow:none;border-radius:4px}
.memory-dialog .gallery-item img{object-fit:contain}
.memory-image-area{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:14px}
.memory-image-area img{width:100%;height:100%;object-fit:contain}
.memory-photo-controls{padding:0 16px 18px;flex-shrink:0;margin:0}
@keyframes deckArrival{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}
.memory-stage.memory-arrive{animation:deckArrival .7s ease-out both}
@media(max-width:600px){#renovation-roll.memory-gallery{padding:36px 16px}.memory-gallery .gallery-head{margin-bottom:20px}.memory-gallery .gallery-head>p{font-size:14px}.memory-stage{height:275px}.memory-card{width:220px;height:275px;margin-left:-110px;padding:8px}.memory-card[data-position='-1']{transform:translateX(-145px) translateZ(-90px) rotateY(30deg) scale(.86)}.memory-card[data-position='1']{transform:translateX(145px) translateZ(-90px) rotateY(-30deg) scale(.86)}.memory-card[data-position='-2']{transform:translateX(-225px) translateZ(-180px) rotateY(40deg) scale(.72)}.memory-card[data-position='2']{transform:translateX(225px) translateZ(-180px) rotateY(-40deg) scale(.72)}.memory-controls{margin-top:18px;gap:20px}.memory-footer{flex-direction:column;gap:12px;margin-top:14px}.memory-dialog{width:calc(100vw - 16px);height:calc(100dvh - 16px)}.memory-dialog-bar{padding:12px}.memory-dialog-bar h3{font-size:18px}.memory-dialog .gallery-grid{padding:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.memory-dialog .gallery-item{height:140px}}
@media(prefers-reduced-motion:reduce){.memory-card{transition:none}.memory-stage.memory-arrive{animation:none}}


.memory-dialog .gallery-grid{display:grid;grid-auto-rows:160px}.memory-dialog .gallery-item{padding:0;cursor:pointer}.memory-gallery h2{color:#f5eedf}.memory-gallery .eyebrow{color:#dfbc70}
/* Consistent thumbnail grid; full photos remain available in the detail viewer. */
#memory-all{height:auto;max-height:calc(100dvh - 40px)}
#memory-all .gallery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:auto;gap:16px;padding:20px;overflow-y:auto;overflow-x:hidden;align-items:stretch;align-content:start;flex:0 1 auto;min-height:0}
#memory-all .gallery-item{display:block;position:relative;width:100%;height:auto;min-height:0;aspect-ratio:4/3;overflow:hidden;padding:0;margin:0;border:1px solid #8a6c3866;border-radius:6px;background:#111b2a;cursor:pointer}
#memory-all .gallery-item img{display:block;position:absolute;inset:0;width:100%;height:100%;max-width:100%;object-fit:cover;object-position:center;margin:0}
#memory-all .gallery-item:hover{border-color:#dfbc70}
@media(max-width:900px){#memory-all .gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){#memory-all{max-height:calc(100dvh - 16px)}#memory-all .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}#memory-all .gallery-item{height:auto}}
