.memory-gallery{display:grid;gap:10px;min-width:0;max-width:100%;text-align:left;outline-offset:4px}
.memory-viewport{position:relative;min-width:0}
.memory-stage{display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);place-items:center;min-width:0;height:min(32dvh,340px);width:100%;overflow:hidden;background:transparent;border-radius:3px;touch-action:pan-y pinch-zoom}
.memory-gallery .memory-stage :is(img,video){display:block;min-width:0;min-height:0;width:100%;height:100%;max-height:100%;object-fit:contain;border-radius:0}
.memory-navigation{position:absolute;inset:0;pointer-events:none}
.memory-navigation button{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;min-height:48px;padding:8px;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;color:var(--modal-control-ink,#50702b);font:32px/1 system-ui;cursor:pointer;pointer-events:auto;touch-action:manipulation}
.memory-navigation button:first-child{left:0}.memory-navigation button:last-child{right:0}
.memory-navigation svg{width:27px;height:27px;overflow:visible;fill:currentColor;stroke:#fff2dd;stroke-width:1.2px;paint-order:stroke fill;opacity:.64}
.memory-navigation button:is(:focus-visible,:active) svg{opacity:1}
.memory-retry{min-height:48px;padding:9px;border:1px solid #8a6b43;border-radius:6px;background:#fff3d8;color:#503c27;font:700 14px/1.3 'Trebuchet MS',sans-serif;cursor:pointer}
.memory-navigation button:disabled{opacity:.4;cursor:default}
.memory-navigation button:focus-visible,.memory-gallery:focus-visible,.memory-retry:focus-visible{outline:3px solid #7c542b;outline-offset:3px}
.memory-counter{font:600 11px system-ui,sans-serif;color:inherit;opacity:.65;white-space:nowrap;text-align:center}
.memory-status,.memory-caption{margin:0;font:14px/1.5 'Trebuchet MS',sans-serif;color:#6e5336}
.memory-status,.memory-caption{overflow-wrap:anywhere;min-width:0;max-width:100%}
.memory-status:empty,.memory-caption:empty{display:none}
.memory-gallery [hidden]{display:none!important}
@media(hover:hover) and (pointer:fine){.memory-navigation button:hover svg{opacity:1}}
