/* Optional winter album presentation. Legacy card and server-flip renderers stay intact. */
.memory-experience{position:relative;isolation:isolate;min-width:0;max-width:640px;margin:12px auto;padding:clamp(10px,3vw,22px);border-radius:22px;background:radial-gradient(ellipse at 10% 0,#fff6dc55,transparent 66%),repeating-linear-gradient(100deg,#72513c09 0 1px,transparent 1px 9px),#e9dcc4;box-shadow:inset 0 1px 0 #fff8,0 8px 24px #17343014;color:#25443e}
.memory-experience[data-memory-theme="album"]{background:linear-gradient(90deg,transparent calc(50% - 1px),#aa9b7a28 50%,transparent calc(50% + 2px)),radial-gradient(ellipse at 20% 0,#fffaf0aa,transparent 80%),#eae0c8}
.memory-experience-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.memory-experience-heading>p{flex:1;min-width:130px;margin:0;font:600 clamp(16px,4.6vw,21px)/1.3 Georgia,Palatino,serif;letter-spacing:0;text-transform:none;color:#29483e}
.memory-experience .memory-demo-button{flex:none;min-width:48px;min-height:48px;margin:0;padding:8px 12px;border:1px solid #677b6355;border-radius:13px;background:#fffaf0bb;color:#2f5146;font:600 13px/1.2 system-ui,sans-serif;box-shadow:none;touch-action:manipulation}
.memory-experience-note{margin:8px 0 0!important;font:400 13px/1.5 system-ui,sans-serif!important;color:#526451!important}
.memory-experience .memory-board{grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(6px,2vw,12px);margin:15px 0;perspective:800px}
.memory-experience .memory-board[data-pairs="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.memory-experience .memory-card{min-width:0;min-height:48px;aspect-ratio:1;padding:6px;border:1px solid #f8efdaaa;border-radius:clamp(10px,3vw,18px);background:radial-gradient(circle at 35% 25%,#517367,#2f5146 80%);color:#fdf7e8;box-shadow:0 3px 8px #57463024,inset 0 0 0 4px #d7e2d315;transition:background-color .2s,box-shadow .2s;transform-origin:center;overflow:hidden}
.memory-experience .memory-card::before{content:"";position:absolute;inset:5px;border:1px solid #f2e8cc55;border-radius:inherit;pointer-events:none}
.memory-experience .memory-card[data-face="true"]{background:radial-gradient(circle at 45% 35%,#fffdf4,#f2e7cf);border-color:#e1cfa7;box-shadow:0 3px 8px #57463020,inset 0 0 0 3px #fff7e060}
.memory-experience .memory-card.matched{background:#f8f2e3;border-color:#809a7c;opacity:1;box-shadow:0 0 0 1px #6a86634d,inset 0 0 16px #d9e6cc66}
.memory-experience .memory-card.matched::after{content:"✓";position:absolute;right:3px;bottom:3px;display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#385e4d;color:#fffaf0;font:bold 13px/1 system-ui,sans-serif;box-shadow:0 0 0 2px #fff7e8}
.memory-experience .memory-picture-back{padding:24%;opacity:.85}
.memory-experience .memory-picture-face{animation:memory-album-reveal .26s ease-out both}
.memory-experience .memory-card:focus-visible,.memory-demo-button:focus-visible{outline:3px solid #426f69!important;outline-offset:3px!important}
.memory-album{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;min-height:53px;padding:9px 7px 6px;border-top:1px solid #a4977755;box-shadow:inset 0 1px 0 #fff5}
.memory-album-slot{position:relative;display:block;flex:0 0 39px;height:43px;overflow:hidden;border:1px dashed #a99d8066;border-radius:8px;background:#fff8e536;transform:rotate(-3deg)}
.memory-album-slot:nth-child(even){transform:rotate(3deg)}
.memory-album-slot.collected{border:1px solid #b3b58d;background:#fff9e8;box-shadow:0 2px 5px #6d563c1f}
.memory-album .memory-picture-face,.memory-pair-flight .memory-picture-face{position:relative;display:block;width:100%;height:100%;animation:none}
.memory-album img,.memory-album .memory-picture-fallback,.memory-pair-flight img,.memory-pair-flight .memory-picture-fallback{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;margin:0;border:0;border-radius:0;filter:none}
.memory-pair-flight{position:absolute;z-index:4;display:block;pointer-events:none;transform-origin:top left;will-change:transform,opacity;overflow:hidden;border-radius:12px;background:#fff8e8e6;box-shadow:0 5px 16px #493e2a2b}
.memory-sr-status{position:absolute!important;display:block!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.memory-demo{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px;padding:9px;border-radius:12px;background:#fff9e7a6;color:#395647;font:13px/1.4 system-ui,sans-serif}
.memory-demo[hidden]{display:none!important}
.memory-demo-card{display:block;flex:0 0 48px;height:48px;padding:3px;border-radius:9px;background:#fffaf0;box-shadow:0 1px 4px #654b3029;animation:memory-album-reveal .3s ease-out both}
.memory-demo-card:nth-child(2){animation-delay:.14s}
.memory-demo-card svg{width:100%;height:100%}
@keyframes memory-album-reveal{from{opacity:.4;transform:perspective(500px) rotateY(-35deg) scale(.96)}to{opacity:1;transform:none}}
@media(max-width:350px){.memory-experience{padding:10px}.memory-experience .memory-board{gap:6px}.memory-experience-heading>p{font-size:16px}.memory-experience .memory-card{padding:3px}.memory-album{gap:5px}.memory-album-slot{flex-basis:32px;height:36px}}
@media(prefers-reduced-motion:reduce){.memory-experience .memory-card,.memory-experience .memory-picture-face,.memory-demo-card{animation:none!important;transition:none!important}.memory-pair-flight{display:none!important}}
html.comfort-reduce .memory-experience .memory-card,html.comfort-reduce .memory-experience .memory-picture-face,html.comfort-reduce .memory-demo-card{animation:none!important;transition:none!important}html.comfort-reduce .memory-pair-flight{display:none!important}
