.memory-keeper-section{background:#f4f1e8;padding:82px 0 88px;border-block:1px solid #ebe6da}
.memory-keeper-wrap{width:min(1160px,calc(100% - 48px));margin-inline:auto}
.memory-keeper-heading{display:flex;align-items:end;justify-content:space-between;gap:35px;margin-bottom:27px}
.memory-keeper-heading h2{max-width:600px;margin:0;font-family:var(--serif);font-size:clamp(34px,4vw,47px);font-weight:500;letter-spacing:-.045em;line-height:1.06}
.memory-keeper-heading h2 em{color:var(--clay);font-weight:500}
.memory-keeper-heading>p{max-width:370px;margin:0;color:var(--muted);font-size:12px;line-height:1.8}
.memory-tools{display:grid;grid-template-columns:.86fr 1.14fr;gap:16px;align-items:start}
.memory-composer,.memory-gallery{min-width:0;padding:21px;background:var(--paper);border:1px solid #e8e3d8;border-radius:18px;box-shadow:0 8px 24px rgba(37,54,44,.035)}
.memory-card-title{margin:0 0 4px;font-family:var(--serif);font-size:22px;line-height:1.15;font-weight:600;letter-spacing:-.025em}
.memory-card-intro{margin:0 0 16px;color:var(--muted);font-size:10px;line-height:1.7}
.memory-photo-frame{position:relative;display:grid;place-items:center;min-height:185px;margin-bottom:10px;overflow:hidden;border:1px dashed #c9d2c6;border-radius:13px;background:#f3f3ec;color:#758176;text-align:center}
.memory-photo-frame img{width:100%;height:100%;min-height:185px;max-height:255px;object-fit:cover}
.memory-photo-placeholder{max-width:240px;padding:17px;font-size:10px;line-height:1.7}
.memory-photo-button{width:100%;margin-bottom:14px;background:#e6eee4;color:var(--forest);border:1px solid #d1ded0}
.memory-photo-button:hover{background:#dce8da}
.memory-form-label{display:block;margin:0 0 10px;color:#4b5c50;font-size:10px;font-weight:700}
.memory-form-label input,.memory-form-label textarea{display:block;width:100%;margin-top:5px;padding:11px 12px;border:1px solid #dfdfd4;border-radius:10px;background:#fffefa;color:var(--ink);font:inherit;font-size:11px;line-height:1.55;outline:none;resize:vertical}
.memory-form-label input:focus,.memory-form-label textarea:focus{border-color:var(--forest);box-shadow:0 0 0 3px rgba(37,75,62,.1)}
.memory-form-label textarea{min-height:91px}
.memory-save-button{width:100%;margin-top:2px}
.memory-save-button:disabled,.memory-action:disabled,.memory-photo-button:disabled{cursor:not-allowed;opacity:.56;transform:none;box-shadow:none}
.memory-status{min-height:17px;margin:9px 0 0;color:#657168;font-size:9px;line-height:1.55}
.memory-status.is-error{color:#9a3d30}
.memory-gallery-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.memory-gallery-head .memory-card-title{margin-bottom:3px}
.memory-count{margin:0;color:#768176;font-size:9px}
.memory-gallery-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.memory-action,.memory-small-button{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 9px;border:1px solid #d9e1d6;border-radius:9px;background:#f8faf6;color:var(--forest);font:inherit;font-size:8px;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}
.memory-action:hover,.memory-small-button:hover{background:#e9f0e6;border-color:#b9c9b7;transform:translateY(-1px)}
.memory-file-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.memory-backup-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.memory-backup-input:focus-visible+.memory-action{outline:3px solid #d8a473;outline-offset:3px}
.memory-gallery-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:10px;margin-top:12px}
.memory-card{min-width:0;overflow:hidden;border:1px solid #e9e5db;border-radius:13px;background:#fff}
.memory-card-photo{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#f3f0e7}
.memory-card-body{padding:12px}
.memory-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.memory-card-heading h3{min-width:0;margin:0;font-family:var(--serif);font-size:16px;line-height:1.25;font-weight:600;overflow-wrap:anywhere}
.memory-card-heading time{flex:none;color:#879087;font-size:8px}
.memory-card-note{min-height:30px;margin:8px 0 11px;color:#657168;font-size:9px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.memory-card-actions{display:flex;flex-wrap:wrap;gap:5px}
.memory-small-button{min-height:28px;padding:5px 7px;font-size:7px}
.memory-delete-button{color:#8b4c3b;border-color:#eadbd3;background:#fffaf7}
.memory-delete-button:hover{background:#f7ebe4;border-color:#d9b9a8}
.memory-empty{grid-column:1/-1;margin:0;padding:23px 17px;border:1px dashed #d6d9ce;border-radius:12px;background:#faf9f3;color:#748075;font-size:10px;line-height:1.7;text-align:center}
.memory-privacy-note{display:flex;gap:8px;align-items:flex-start;margin:13px 0 0;padding:11px 12px;border-radius:10px;background:#f4f1e8;color:#6d766c;font-size:8px;line-height:1.65}
.memory-privacy-note strong{color:var(--forest)}
.memory-privacy-icon{flex:none;color:var(--clay);font-size:12px;line-height:1.3}
.memory-photo-button:focus-visible,.memory-action:focus-visible,.memory-small-button:focus-visible,.memory-save-button:focus-visible{outline:3px solid #d8a473;outline-offset:3px}
@media(max-width:1000px){.memory-tools{grid-template-columns:1fr}.memory-keeper-heading{align-items:flex-start;flex-direction:column;gap:12px}.memory-keeper-heading>p{max-width:580px}}
@media(max-width:740px){.memory-keeper-section{padding:65px 0 68px}.memory-keeper-wrap{width:min(1160px,calc(100% - 34px))}.memory-keeper-heading h2{font-size:clamp(34px,9vw,44px)}.memory-composer,.memory-gallery{padding:16px}.memory-gallery-head{flex-direction:column}.memory-gallery-actions{justify-content:flex-start}.memory-gallery-list{grid-template-columns:1fr}.memory-photo-frame,.memory-photo-frame img{min-height:165px}.memory-card-actions{gap:5px}}
@media(prefers-reduced-motion:reduce){.memory-action,.memory-small-button{transition:none}}
