.memories-dialog{width:min(1120px,96vw);max-width:96vw;height:94dvh;max-height:94dvh;padding:16px;overflow:hidden;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:8px}.memories-dialog:not([open]){display:none}.memories-heading,.memories-toolbar,.memories-pages,.memory-full-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.memories-heading h2{margin:0}.memories-dialog p{margin:0;font-size:14px}.memories-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px;min-height:0}.memory-card{display:flex;flex-direction:column;gap:4px;background:#e9f5f4;border:1px solid #b8dce9;padding:8px;border-radius:14px;min-width:0;min-height:0;overflow:hidden}.memory-card:nth-child(3n+2){background:#f0eafa}.memory-card:nth-child(3n){background:#fff4d6}.memory-card strong,.memory-card small{overflow-wrap:anywhere;line-height:1.2}.memory-card small{font-size:11px}.memory-preview{flex:1;min-height:0;display:grid;place-items:center;width:100%;background:white;border-radius:9px;overflow:hidden;padding:0}.memory-preview img{width:100%;height:100%;object-fit:contain;min-height:0}.memory-controls{display:flex;gap:6px;flex-wrap:wrap}.memory-controls button{padding:7px;font-size:12px}.memories-pages{justify-content:center}.memories-parent .memories-grid{overflow:auto;grid-template-rows:none;grid-auto-rows:310px}.memory-full{grid-row:3/-1;min-height:0;display:grid;place-items:center;overflow:hidden}.memory-full img{width:100%;height:100%;object-fit:contain}.memory-upload{grid-row:2/-1;overflow:auto;max-width:520px}.memories-help{position:relative}.memories-help summary{list-style:none;cursor:pointer;border:1px solid #9dd5e5;border-radius:50%;padding:8px 14px;background:#e4f3f8}.memories-help p{position:absolute;right:0;top:45px;z-index:4;width:min(320px,80vw);background:#fffdf8;border:1px solid #9dd5e5;padding:14px;border-radius:12px}.art-actions:has(#art-memories){grid-template-columns:repeat(5,minmax(0,1fr))}.child-memories-tile{background:#ffeddf!important}
@media(max-width:600px) and (orientation:portrait){.memories-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}.memories-dialog{padding:10px}.memories-heading h2{font-size:27px}.memories-heading button{padding:9px}.art-actions:has(#art-memories){grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(orientation:landscape) and (max-height:600px){.memories-dialog{height:98dvh;max-height:98dvh;gap:4px;padding:8px}.memories-dialog button{padding:6px 10px}.memories-heading h2{font-size:25px}.memory-card{padding:5px}.memory-card small{font-size:10px}}

.memories-child-choice{display:flex;align-items:center;gap:8px;margin:0;min-width:0}.memories-child-choice select{width:auto;max-width:200px;min-width:100px}.memories-toolbar{flex-wrap:wrap}
