
#modal.memory-dialog{width:min(1040px,calc(100vw - 32px));max-width:1040px}.memory-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;position:sticky;top:0;background:var(--surface);padding:12px 0;z-index:2}.memory-intro,.memory-hero{padding:32px;background:var(--accent-soft);border-radius:18px;margin-bottom:24px}.memory-intro h2,.memory-hero h1{font-size:clamp(26px,4vw,44px);line-height:1.15;margin:14px 0}.memory-albums{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin:20px 0}.memory-album{display:flex;flex-direction:column;align-items:start;gap:18px;text-align:left;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);cursor:pointer}.memory-album>span{font-size:40px;color:var(--accent)}.memory-album strong{font-size:22px;overflow-wrap:anywhere}.memory-story{max-width:840px;margin:auto}.memory-hero label{display:grid;gap:10px}.memory-hero input{font-size:26px;width:100%}.memory-block{margin:28px 0}.memory-photo,.memory-story video{display:block;width:100%;max-height:75vh;object-fit:contain;border-radius:14px;background:var(--subtle)}.memory-story-text{font-size:21px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:24px 6px}.memory-caption{font-size:17px;color:var(--muted);text-align:center}.memory-block textarea{width:100%;resize:vertical;margin-top:12px;box-sizing:border-box;min-height:80px}.memory-block-tools{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;padding:8px 0}.memory-block-tools>span{margin-right:auto;color:var(--muted)}.memory-music{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px;border:1px solid var(--line);border-radius:14px}.memory-music>span{overflow-wrap:anywhere;max-width:100%}.memory-music audio{max-width:100%;height:40px}.memory-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:12px;position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:14px 0;z-index:2}.memory-bottom>span{margin-right:auto}.memory-empty{padding:48px 20px;text-align:center;color:var(--muted)}.memory-picker-path{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:16px 0;overflow-wrap:anywhere}.memory-pick,.memory-folder{display:flex;align-items:center;gap:12px;padding:16px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer}.memory-pick span{flex:1;overflow-wrap:anywhere}.memory-pick input{width:20px;height:20px;flex:none}.memory-dialog button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}@media(max-width:600px){#modal.memory-dialog{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;margin:0;border-radius:0}.memory-intro,.memory-hero{padding:20px}.memory-tools .btn{min-height:44px;flex:1}.memory-block-tools .btn{min-height:44px}.memory-story-text{font-size:18px}.memory-dialog textarea,.memory-dialog select{font-size:16px}.memory-music audio{width:100%}.memory-albums{grid-template-columns:1fr}.memory-bottom{padding-bottom:max(14px,env(safe-area-inset-bottom))}}

.memory-inline{padding:0 16px 24px;min-width:0}.memory-inline .memory-tools{position:relative}.memory-inline .memory-hero{margin-top:16px}.memory-folder-card .gallery-open{cursor:pointer}.memory-inline input,.memory-inline textarea{max-width:100%}@media(max-width:600px){.memory-inline{padding:0 4px 16px}.memory-inline .memory-tools .btn{min-height:44px}.memory-inline textarea{font-size:16px}}
