.zw-memories{max-width:980px;margin:0 auto;padding:24px 16px 56px;color:#1f2937}.zw-memories__back{display:inline-flex;margin-bottom:20px;text-decoration:none;font-weight:600}.zw-memories__hero,.zw-memories__empty,.zw-memories--state{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:24px;box-shadow:0 8px 30px rgba(15,23,42,.05)}.zw-memories__kicker{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#6b7280}.zw-memories h1{font-size:clamp(28px,5vw,44px);line-height:1.08;margin:8px 0 10px}.zw-memories__count{font-size:14px;color:#6b7280;margin-bottom:18px}.zw-memories__hero p{max-width:680px;font-size:17px;line-height:1.6}.zw-memories__primary{display:inline-flex;align-items:center;justify-content:center;margin-top:8px;border:0;border-radius:12px;padding:12px 18px;font-weight:700;cursor:pointer;opacity:1;text-decoration:none}.zw-memories__devnote{margin-top:10px;font-size:13px;color:#6b7280}.zw-memories__list{margin-top:18px}.zw-memories__empty h2{margin-top:0;font-size:22px}.zw-memories__empty p,.zw-memories__muted{color:#6b7280;line-height:1.65}.zw-memories--state{margin:24px auto;max-width:760px}@media(max-width:640px){.zw-memories{padding:16px 12px 40px}.zw-memories__hero,.zw-memories__empty,.zw-memories--state{border-radius:16px;padding:18px}.zw-memories__primary{width:100%}}

/* Profile preview */
.zw-memory-preview__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.zw-memory-preview__count{flex:0 0 auto;min-width:42px;height:42px;border:1px solid #e5e7eb;border-radius:999px;display:flex;align-items:center;justify-content:center;font-weight:700}.zw-memory-preview__empty{margin-top:16px;padding:14px 16px;border:1px solid #e5e7eb;border-radius:14px;color:#6b7280;line-height:1.55}.zw-memory-preview__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.zw-memory-preview__primary,.zw-memory-preview__secondary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border-radius:12px;text-decoration:none;font-weight:700}.zw-memory-preview__primary{background:#1f2937;color:#fff}.zw-memory-preview__secondary{border:1px solid #d1d5db;color:#1f2937;background:#fff}@media(max-width:640px){.zw-memory-preview__actions{display:grid;grid-template-columns:1fr}.zw-memory-preview__primary,.zw-memory-preview__secondary{width:100%}}

/* Stage 3 — submission form */
.zw-memory-form{margin-top:20px;padding:24px;border:1px solid #e5e7eb;border-radius:18px;background:#fff}
.zw-memory-form h2{margin:0 0 6px}.zw-memory-form form{display:grid;gap:18px;margin-top:20px}
.zw-memory-form label{display:grid;gap:7px;font-weight:600}.zw-memory-form__field{display:grid;gap:7px}.zw-memory-form__label{font-weight:600}.zw-memory-form input[type=text],.zw-memory-form textarea,.zw-memory-form select{width:100%;box-sizing:border-box;border:1px solid #d8dee8;border-radius:10px;padding:11px 12px;background:#fff;font:inherit}
.zw-memory-form textarea{resize:vertical;min-height:150px}.zw-memory-form__optional,.zw-memory-form small{font-weight:400;color:#718096}.zw-memory-form__check{display:flex!important;grid-template-columns:none;align-items:flex-start;gap:10px!important;font-weight:400!important}.zw-memory-form__check input{margin-top:4px}.zw-memory-form__notice,.zw-memory-state{padding:14px 16px;border:1px solid #d8dee8;border-radius:12px;background:#f8fafc;margin-top:16px}.zw-memory-state--created{margin-bottom:18px}.zw-memory-form .zw-memories__primary{justify-self:start;border:0;cursor:pointer}
@media(max-width:700px){.zw-memory-form{padding:18px 15px;border-radius:14px}.zw-memory-form .zw-memories__primary{width:100%;justify-content:center}}

/* Stage 3.1 — localized custom file picker */
.zw-memory-file{display:flex;align-items:center;gap:12px;min-height:46px;padding:7px;border:1px solid #d8dee8;border-radius:10px;background:#fff}
.zw-memory-file__input{position:absolute!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}
.zw-memory-file__button{display:inline-flex!important;align-items:center;justify-content:center!important;gap:0!important;min-height:36px;padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;font-weight:600!important;cursor:pointer;white-space:nowrap}
.zw-memory-file__button:hover{background:#f1f5f9}.zw-memory-file__button:focus-within{outline:2px solid currentColor;outline-offset:2px}
.zw-memory-file__status{min-width:0;color:#64748b;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:640px){.zw-memory-file{align-items:stretch;flex-direction:column}.zw-memory-file__button{width:100%}.zw-memory-file__status{padding:2px 4px;white-space:normal}}

/* Stage 3.2 — visible post-submit state in profile */
.zw-memory-preview__notice{margin-top:16px;padding:14px 16px;border:1px solid #d8dee8;border-radius:14px;background:#f8fafc;line-height:1.55}.zw-memory-preview__notice--success{border-color:#bbf7d0;background:#f0fdf4}.zw-memory-preview__notice+.zw-memory-preview__empty{margin-top:10px}


/* Stage 3.3 — published memory cards */
.zw-memory-preview__cards{display:grid;gap:12px;margin-top:16px}.zw-memory-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:20px;box-shadow:0 5px 18px rgba(15,23,42,.035);scroll-margin-top:96px}.zw-memory-card+.zw-memory-card{margin-top:14px}.zw-memory-card--compact{padding:16px;border-radius:15px}.zw-memory-card__author{display:flex;align-items:center;gap:11px}.zw-memory-card__avatar{width:52px;height:52px;border-radius:50%;object-fit:cover;background:#f1f5f9}.zw-memory-card--compact .zw-memory-card__avatar{width:42px;height:42px}.zw-memory-card__authorText{min-width:0}.zw-memory-card__authorName{font-weight:700;color:#172033}.zw-memory-card__meta{margin-top:2px;color:#718096;font-size:13px;line-height:1.4}.zw-memory-card__title{font-size:21px;line-height:1.25;margin:16px 0 9px}.zw-memory-card--compact .zw-memory-card__title{font-size:18px;margin:13px 0 7px}.zw-memory-card__title a{color:inherit;text-decoration:none}.zw-memory-card__title a:hover{text-decoration:underline}.zw-memory-card__text{color:#334155;line-height:1.65;margin:0}.zw-memory-card__text--full p{margin:.6em 0}.zw-memory-card__period{margin-top:12px;font-size:14px;color:#64748b}.zw-memory-card__media{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:15px}.zw-memory-card__media--compact{grid-template-columns:minmax(0,220px)}.zw-memory-card__photo img{display:block;width:100%;height:auto;max-height:520px;object-fit:cover;border-radius:12px}.zw-memory-card--compact .zw-memory-card__photo img{max-height:150px}.zw-memory-card__footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:15px;padding-top:12px;border-top:1px solid #eef2f7}.zw-memory-card__label{font-size:12px;color:#94a3b8}.zw-memory-card__open{font-weight:700;text-decoration:none;white-space:nowrap}.zw-memories__pagination{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:20px 0}.zw-memories__pagination a{display:flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 10px;border:1px solid #dbe2ea;border-radius:10px;text-decoration:none}.zw-memories__pagination a.is-current{background:#1f2937;color:#fff;border-color:#1f2937}.zw-memory-form[hidden]{display:none!important}.zw-memory-form__top{display:flex;align-items:center;justify-content:space-between;gap:12px}.zw-memory-form__top h2{margin:0}.zw-memory-form__close{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid #dbe2ea;border-radius:999px;background:#fff;font-size:24px;line-height:1;cursor:pointer}
@media(max-width:640px){.zw-memory-card{padding:15px;border-radius:14px}.zw-memory-card__media{grid-template-columns:1fr}.zw-memory-card__media--compact{grid-template-columns:1fr}.zw-memory-card__footer{align-items:flex-start;flex-direction:column}.zw-memory-card__open{white-space:normal}.zw-memory-card__title{font-size:19px}.zw-memory-card--compact .zw-memory-card__title{font-size:17px}}


/* Stage 6: single memory view */
.zw-memory-single{max-width:980px;margin:0 auto;padding:8px 0 30px;color:#202b3c}
.zw-memory-single__nav{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 24px;font-size:14px}
.zw-memory-single__nav a{color:#526078;text-decoration:none}
.zw-memory-single__nav a:hover{text-decoration:underline}
.zw-memory-single__eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#78859a;margin-bottom:7px}
.zw-memory-single__person{font-size:clamp(28px,4vw,44px);line-height:1.08;margin:0 0 22px}
.zw-memory-single__person a{color:inherit;text-decoration:none}
.zw-memory-single__body{background:#fff;border:1px solid #e3e8ef;border-radius:22px;padding:clamp(20px,4vw,38px);box-shadow:0 10px 30px rgba(15,23,42,.04)}
.zw-memory-single__status{display:inline-block;margin-bottom:14px;padding:5px 10px;border-radius:999px;background:#f4f6f9;color:#536176;font-size:13px;font-weight:700}
.zw-memory-single__title{font-size:clamp(24px,3vw,34px);line-height:1.18;margin:0 0 22px;color:#1d2737}
.zw-memory-single__author{display:flex;align-items:center;gap:12px;padding-bottom:20px;border-bottom:1px solid #edf0f4}
.zw-memory-single__author .zw-memory-card__avatar{width:56px;height:56px;border-radius:50%;object-fit:cover}
.zw-memory-single__author-name{font-weight:700}
.zw-memory-single__meta{font-size:13px;color:#748198;margin-top:3px}
.zw-memory-single__period{margin:22px 0 0;color:#536176}
.zw-memory-single__text{margin-top:24px;font-size:17px;line-height:1.78;color:#283447}
.zw-memory-single__text p{margin:0 0 1.25em}
.zw-memory-single__gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:28px}
.zw-memory-single__photo{margin:0;overflow:hidden;border-radius:14px;background:#f3f5f7}
.zw-memory-single__photo img{display:block;width:100%;height:auto}
.zw-memory-single__footer{margin-top:28px;padding-top:16px;border-top:1px solid #edf0f4;color:#97a2b3;font-size:13px}
.zw-memory-single--state{max-width:760px;margin:0 auto;padding:36px 0}
@media(max-width:640px){.zw-memory-single{padding-top:0}.zw-memory-single__nav{margin-bottom:18px}.zw-memory-single__body{border-radius:16px;padding:18px}.zw-memory-single__author{align-items:flex-start}.zw-memory-single__gallery{grid-template-columns:1fr}.zw-memory-single__text{font-size:16px;line-height:1.7}}

/* Stage 8: author edit */
.zw-memory-edit{max-width:1200px;margin:0 auto;padding:18px 0 36px}.zw-memory-edit h1{margin:10px 0 8px}.zw-memory-edit__notice{padding:12px 14px;border:1px solid #dbe4ef;border-radius:12px;background:#f7f9fc}.zw-memory-edit__error{padding:12px 14px;border:1px solid #efc9c9;border-radius:12px;background:#fff7f7;margin:12px 0}.zw-memory-edit__form{display:grid;gap:16px;margin-top:18px}.zw-memory-edit__form>label>span,.zw-memory-edit__photos legend{display:block;font-weight:700;margin-bottom:6px}.zw-memory-edit__form input[type=text],.zw-memory-edit__form textarea,.zw-memory-edit__form select,.zw-memory-edit__form input[type=file]{width:100%;box-sizing:border-box;border:1px solid #d7dee8;border-radius:10px;padding:11px 12px;background:#fff}.zw-memory-edit__check{display:flex;gap:10px;align-items:flex-start}.zw-memory-edit__check span{font-weight:400!important;margin:0!important}.zw-memory-edit__photos{border:0;padding:0;margin:0}.zw-memory-edit__photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}.zw-memory-edit__photo{border:1px solid #e2e7ee;border-radius:12px;padding:8px}.zw-memory-edit__photo img{width:100%;height:110px;object-fit:cover;border-radius:8px}.zw-memory-edit__photo span{font-size:13px;margin-top:7px!important;font-weight:400!important}.zw-memory-edit__actions{display:flex;align-items:center;justify-content:flex-end;gap:14px}.zw-memory-edit__actions button{min-height:44px;border:0;border-radius:10px;padding:10px 18px;background:#1f2937;color:#fff;font-weight:700}@media(max-width:640px){.zw-memory-edit{padding:12px 0 28px}.zw-memory-edit__actions{justify-content:space-between}.zw-memory-edit__photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Stage 8.1 — localized edit upload and robust dialog buttons */
.zw-memory-edit__upload-label{display:block;font-weight:700;margin-bottom:6px}.zw-memory-edit__upload small{display:block;margin-top:6px;color:#64748b}
.zw-memory-edit__form .zw-memory-file__input{position:absolute!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}

/* Stage 9 — reports for a single memory */
.zw-memory-single__footer{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.zw-memory-report-link{border:0!important;background:transparent!important;padding:0!important;margin:0!important;color:#526078!important;text-decoration:underline;cursor:pointer;font:inherit;box-shadow:none!important}
.zw-memory-report-login{font-size:13px;color:#7b879a}
.zw-memory-report-dialog{width:min(560px,calc(100% - 28px));border:0;border-radius:16px;padding:0;box-shadow:0 22px 80px rgba(15,23,42,.28);overflow:hidden}
.zw-memory-report-dialog::backdrop{background:rgba(15,23,42,.48)}
.zw-memory-report-form{padding:22px}
.zw-memory-report-dialog__head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px}
.zw-memory-report-dialog__head h2{margin:0;font-size:22px;line-height:1.25}
.zw-memory-report-dialog__close{border:0!important;background:transparent!important;padding:0!important;width:34px;height:34px;font-size:26px;line-height:1;cursor:pointer;color:#667085!important;box-shadow:none!important}
.zw-memory-report-form label{display:block;margin:0 0 15px;font-weight:600}
.zw-memory-report-form label>span{display:block;margin-bottom:7px}
.zw-memory-report-form select,.zw-memory-report-form textarea{width:100%;border:1px solid #d7dee8;border-radius:10px;background:#fff;padding:10px 12px;font:inherit;color:#24344d}
.zw-memory-report-form textarea{resize:vertical;min-height:120px}
.zw-memory-report-dialog__actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.zw-memory-report-dialog__actions button{min-height:42px;padding:8px 16px;border-radius:10px;border:1px solid #d9e2ef!important;background:#fff!important;color:#24344d!important;opacity:1!important;-webkit-text-fill-color:#24344d!important;cursor:pointer}
.zw-memory-report-dialog__actions .zw-memory-report-submit{background:#1f2937!important;border-color:#1f2937!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.zw-memory-report-message{border-radius:10px;padding:10px 12px;margin-top:6px;font-size:14px}
.zw-memory-report-message--success{background:#edf9f0;border:1px solid #b9e6c3;color:#216e39}
.zw-memory-report-message--error{background:#fff2f2;border:1px solid #f1c0c0;color:#9b2c2c}
@media(max-width:640px){.zw-memory-report-form{padding:18px}.zw-memory-report-dialog__actions{flex-direction:column-reverse}.zw-memory-report-dialog__actions button{width:100%}.zw-memory-single__footer{align-items:flex-start;flex-direction:column}}


/* Stage 11.4.1 — report success toast */
.zw-memory-report-toast{position:fixed;left:50%;bottom:28px;z-index:100000;transform:translateX(-50%);width:min(520px,calc(100% - 28px));box-sizing:border-box;padding:14px 18px;border:1px solid #b9e6c3;border-radius:12px;background:#edf9f0;color:#216e39;font-weight:600;line-height:1.45;box-shadow:0 12px 38px rgba(15,23,42,.16);opacity:1;transition:opacity .25s ease,transform .25s ease}
.zw-memory-report-toast.is-hiding{opacity:0;transform:translate(-50%,8px)}
@media(max-width:640px){.zw-memory-report-toast{bottom:16px;width:calc(100% - 24px);padding:13px 15px}}
