.memory-icon{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Library */
.memory-library-heading{align-items:flex-end}
.memory-library-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 20px;margin-bottom:24px}
.memory-search-form{display:flex;gap:10px;flex:1;max-width:640px}
.memory-search-form label{flex:1}
.memory-search-form input{width:100%}
.memory-library-count{display:flex;align-items:baseline;gap:8px}
.memory-library-count strong{font-size:1.55rem}
.memory-library-count span{color:#66706d}
.memory-library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.memory-library-card{padding:22px;min-width:0}
.memory-library-card-top,.memory-library-card-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.memory-library-art{display:grid;grid-template-columns:1.2fr .8fr;grid-template-rows:38px 38px;gap:5px;width:80px;height:81px;margin:27px 0 18px}
.memory-library-art span{display:block;border-radius:9px;background:#dbe9e2}
.memory-library-art span:first-child{grid-row:1/3;background:linear-gradient(150deg,#173b35,#497c6f)}
.memory-library-art span:nth-child(2){background:#b9d66b}
.memory-library-art span:nth-child(3){background:#f1d6c8}
.memory-library-card h2{margin:0 0 8px;font-size:1.35rem}
.memory-library-card>p{margin:0 0 20px;color:#66706d}
.memory-library-card-url{display:grid;gap:4px;margin-bottom:18px;padding:14px 0;border-top:1px solid #e8ecea;border-bottom:1px solid #e8ecea}
.memory-library-card-url span{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#78817e}
.memory-library-card-url code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.memory-empty{text-align:center;padding:64px 24px}
.memory-empty-icon{display:grid;place-items:center;width:72px;height:72px;margin:0 auto 20px;border-radius:22px;background:#edf3ef;color:#183b35}
.memory-empty-icon svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.5}
.memory-empty h2{margin:0 0 10px;font-size:2rem}
.memory-empty p{max-width:680px;margin:0 auto 24px;color:#66706d;line-height:1.6}
.memory-pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:28px}
.memory-pagination span{font-size:.78rem;color:#65716d}

/* workflow */
.memory-build-path{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));overflow-x:auto;margin-bottom:22px;border:1px solid #dfe6e2;border-radius:16px;background:#fff}
.memory-build-path>a,.memory-build-path>span{display:flex;align-items:center;gap:9px;min-width:150px;padding:13px 14px;border-right:1px solid #e7ebe9;color:#697570;text-decoration:none}
.memory-build-path>*:last-child{border-right:0}
.memory-build-path i{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:9px;background:#f0f3f1;font-style:normal;font-size:.72rem;font-weight:900}
.memory-build-path strong,.memory-build-path small{display:block}
.memory-build-path strong{font-size:.76rem}
.memory-build-path small{margin-top:2px;font-size:.62rem;color:#87908d}
.memory-build-path .is-current{background:#f5f9f6;color:#173b35}
.memory-build-path .is-current i,.memory-build-path .is-complete i{background:#357466;color:#fff}
.memory-build-path .is-complete{color:#234f45}

/* Create */
.memory-create-layout,.memory-editor-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(310px,.68fr);gap:26px;align-items:start}
.memory-create-form{padding:0;overflow:hidden}
.memory-form-step{padding:28px;border-bottom:1px solid #e6ebe8}
.memory-form-step header{display:flex;gap:16px;align-items:flex-start;margin-bottom:24px}
.memory-form-step header>span{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:12px;background:#102a2a;color:#fff;font-weight:800}
.memory-form-step h2{margin:0;font-size:1.3rem}
.memory-form-step header p{margin:4px 0 0;color:#66706d}
.memory-create-form label,.memory-settings-form label,.memory-new-entry-form label,.memory-entry-form label{display:grid;gap:7px;margin-bottom:16px;font-size:.88rem;font-weight:700}
.memory-create-form label small,.memory-settings-form label small,.memory-new-entry-form label small,.memory-entry-form label small{font-weight:400;color:#76807c}
.memory-create-form input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),
.memory-create-form textarea,.memory-create-form select,
.memory-settings-form input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),
.memory-settings-form textarea,.memory-settings-form select,
.memory-new-entry-form input:not([type=checkbox]):not([type=radio]):not([type=file]),
.memory-new-entry-form textarea,.memory-new-entry-form select,
.memory-entry-form input:not([type=checkbox]):not([type=radio]):not([type=file]),
.memory-entry-form textarea,.memory-entry-form select{
    width:100%;border:1px solid #d8e0dc;border-radius:12px;background:#fff;padding:12px 13px;font:inherit;color:#152b27;outline:none
}
.memory-create-form input:focus,.memory-create-form textarea:focus,
.memory-settings-form input:focus,.memory-settings-form textarea:focus,
.memory-new-entry-form input:focus,.memory-new-entry-form textarea:focus,
.memory-entry-form input:focus,.memory-entry-form textarea:focus{
    border-color:#357466;box-shadow:0 0 0 3px rgba(53,116,102,.12)
}
.field-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.memory-theme-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 20px;padding:0;border:0}
.memory-theme-picker legend{grid-column:1/-1;margin-bottom:8px;font-weight:800}
.memory-theme-picker label{display:block;margin:0;cursor:pointer}
.memory-theme-picker input{position:absolute;opacity:0}
.memory-theme-picker span{display:grid;gap:3px;min-height:82px;padding:14px;border:1px solid #dce3df;border-radius:14px;background:#fff}
.memory-theme-picker input:checked+span{border-color:#357466;background:#edf5f1;box-shadow:0 0 0 2px rgba(53,116,102,.13)}
.memory-theme-picker small{font-weight:400;color:#71807a}
.memory-color-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}
.memory-color-grid label{padding:12px;border:1px solid #e2e7e4;border-radius:14px;background:#f7f9f8}
.memory-color-grid input[type=color]{width:100%;height:42px;padding:0;border:0;background:transparent;cursor:pointer}
.memory-toggle-row{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 18px}
.memory-toggle-row label{display:flex;align-items:center;gap:8px;margin:0;padding:9px 12px;border:1px solid #e0e6e2;border-radius:999px;background:#fff;font-weight:700}
.memory-toggle-row input{width:17px;height:17px}
.memory-upload-zone{position:relative!important;display:flex!important;align-items:center!important;gap:14px!important;min-height:96px;padding:17px!important;border:1.5px dashed rgba(53,116,102,.42)!important;border-radius:16px!important;background:linear-gradient(145deg,#f6faf5,#fff)!important;cursor:pointer}
.memory-upload-zone:hover{border-color:#357466!important}
.memory-upload-zone>input[type=file]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.memory-upload-icon{display:grid;width:46px;height:46px;flex:0 0 46px;place-items:center;border-radius:14px;background:#102a2a;color:#b9d66b}
.memory-upload-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.memory-upload-zone strong,.memory-upload-zone small{display:block}
.memory-upload-zone small{margin-top:4px}
.memory-upload-preview{display:flex;align-items:center;gap:12px;margin:12px 0;padding:10px;border:1px solid #e2e7e4;border-radius:13px;background:#fff}
.memory-upload-preview img{width:70px;height:70px;border-radius:11px;object-fit:cover}
.memory-upload-preview strong,.memory-upload-preview small{display:block}
.memory-upload-preview small{margin-top:3px;color:#76807c}
.memory-create-submit{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px 28px;background:#f4f7f5}
.memory-create-submit div{display:grid;gap:3px}
.memory-create-submit small{color:#66706d}
.memory-create-preview,.memory-editor-preview{position:sticky;top:92px}
.memory-preview-label{display:grid;gap:3px;margin-bottom:12px}
.memory-phone{width:min(100%,370px);margin:0 auto;padding:9px;border-radius:38px;background:#152521;box-shadow:0 26px 60px rgba(12,34,28,.16)}
.memory-phone-top{display:flex;align-items:center;justify-content:center;height:28px}
.memory-phone-top span{width:86px;height:16px;border-radius:20px;background:#07120f}
.memory-phone-screen{min-height:610px;overflow:hidden;padding:18px 18px 30px;border-radius:29px;background:var(--memory-surface,#fffdf8);color:var(--memory-primary,#102a2a)}
.memory-phone-cover{display:grid;place-items:center;height:180px;margin:-18px -18px 22px;overflow:hidden;background:linear-gradient(145deg,color-mix(in srgb,var(--memory-primary) 90%,#fff),color-mix(in srgb,var(--memory-accent) 55%,#fff))}
.memory-phone-cover.has-image{background:#eee}
.memory-phone-cover img{width:100%;height:100%;object-fit:cover}
.memory-phone-cover span{display:grid;place-items:center;width:56px;height:56px;border:1px solid rgba(255,255,255,.28);border-radius:16px;color:#fff}
.memory-phone-cover svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.5}
.memory-phone-screen>small{font-size:.62rem;font-weight:900;letter-spacing:.16em;color:var(--memory-accent)}
.memory-phone-screen h2{margin:8px 0;font-family:Georgia,serif;font-size:2rem;font-weight:400;line-height:1.02}
.memory-phone-screen>p{margin:0 0 12px;color:color-mix(in srgb,var(--memory-primary) 62%,#fff);font-size:.77rem;line-height:1.55}
.memory-phone-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px}
.memory-phone-meta span{padding:5px 7px;border:1px solid color-mix(in srgb,var(--memory-primary) 13%,transparent);border-radius:99px;font-size:.58rem}
.memory-phone-screen nav{display:flex;gap:6px;overflow:hidden;margin-bottom:13px}
.memory-phone-screen nav span,.memory-phone-screen nav b{padding:6px 8px;border:1px solid color-mix(in srgb,var(--memory-primary) 13%,transparent);border-radius:999px;white-space:nowrap;font-size:.57rem}
.memory-phone-screen nav b{background:var(--memory-primary);color:#fff}
.memory-phone-grid{display:grid;grid-template-columns:1.15fr .85fr;grid-template-rows:82px 82px;gap:6px}
.memory-phone-grid i{border-radius:10px;background:#dce6e1}
.memory-phone-grid i:first-child{grid-row:1/3;background:linear-gradient(145deg,#8ca99f,#315c47)}
.memory-phone-grid i:nth-child(2){background:#e6c8b9}
.memory-phone-grid i:nth-child(3){background:#c9d69f}
.memory-create-preview>p{max-width:350px;margin:14px auto 0;color:#67746f;font-size:.8rem;text-align:center}

/* Editor */
.memory-editor-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin-bottom:22px}
.memory-editor-heading h1{margin:8px 0 5px;font-size:2.35rem}
.memory-editor-heading p{margin:0;color:#66706d}
.memory-editor-status{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.memory-editor-status form{margin:0}
.memory-publish-locked{max-width:300px;color:#7d7771;font-size:.72rem}
.memory-next-step{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px;padding:18px 20px}
.memory-next-step>div{display:grid;gap:3px}
.memory-next-step p{margin:2px 0 0;color:#66706d;font-size:.82rem}
.memory-editor-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px}
.memory-editor-metrics article{display:grid;gap:3px;padding:16px;border:1px solid #e0e6e2;border-radius:16px;background:#fff}
.memory-editor-metrics small{color:#75817d}
.memory-editor-metrics strong{font-size:1.45rem}
.memory-editor-metrics span{font-size:.75rem;color:#66706d}
.memory-editor-main{display:grid;gap:16px}
.memory-editor-section{padding:0;overflow:hidden}
.memory-editor-section>summary{display:flex;align-items:center;justify-content:space-between;min-height:76px;padding:19px 22px;cursor:pointer;list-style:none}
.memory-editor-section>summary::-webkit-details-marker{display:none}
.memory-editor-section>summary>span{display:grid;grid-template-columns:34px auto;column-gap:12px}
.memory-editor-section>summary i{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#edf3ef;font-style:normal;font-size:.72rem;font-weight:900}
.memory-editor-section>summary strong{font-size:1.02rem}
.memory-editor-section>summary small{color:#76807c}
.memory-editor-section[open]>summary{border-bottom:1px solid #e5eae7}
.memory-section-chevron,.memory-card-chevron{display:grid;place-items:center;width:31px;height:31px;border:1px solid #dfe5e2;border-radius:9px;transition:transform .18s}
.memory-section-chevron svg,.memory-card-chevron svg{width:17px;height:17px;fill:none;stroke:#315c47;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.memory-editor-section[open] .memory-section-chevron,.memory-entry-editor-card[open] .memory-card-chevron{transform:rotate(180deg)}
.memory-settings-form,.memory-new-entry-form{padding:22px}
.memory-current-cover{display:flex;align-items:center;gap:14px;margin-bottom:16px;padding:12px;border:1px solid #e2e7e4;border-radius:14px;background:#f8faf8}
.memory-current-cover img{width:92px;height:72px;border-radius:11px;object-fit:cover}
.memory-current-cover strong{display:block;margin-bottom:8px}
.memory-entry-editor-list{display:grid;gap:10px;padding:14px 18px}
.memory-entry-editor-card{overflow:hidden;border:1px solid #e3e8e5;border-radius:14px;background:#fff}
.memory-entry-editor-card>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;cursor:pointer;list-style:none}
.memory-entry-editor-card>summary::-webkit-details-marker{display:none}
.memory-entry-summary{display:flex;align-items:center;gap:11px;min-width:0}
.memory-entry-thumb{display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;overflow:hidden;border-radius:12px;background:#edf3ef;color:#396c60}
.memory-entry-thumb img{width:100%;height:100%;object-fit:cover}
.memory-entry-thumb svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5}
.memory-entry-summary>div{display:grid;gap:2px;min-width:0}
.memory-entry-summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.memory-entry-summary small{color:#78827e}
.memory-entry-flags{display:flex;align-items:center;gap:8px}
.memory-entry-flags>span{padding:5px 7px;border-radius:999px;background:#edf5f1;color:#2f6559;font-size:.66rem;font-weight:800}
.memory-entry-form{padding:18px;border-top:1px solid #e7ebe9;background:#fbfcfb}
.memory-entry-delete{padding:0 18px 16px;text-align:right;background:#fbfcfb}
.memory-entry-form-actions{display:flex;justify-content:flex-end}
.memory-new-entry-form{margin:14px 18px 18px;border:1px solid rgba(53,116,102,.32);border-radius:16px;background:linear-gradient(145deg,#f7faf8,#fff)}
.memory-new-entry-heading{margin-bottom:20px}
.memory-new-entry-heading>div{display:flex;align-items:center;gap:11px}
.memory-new-entry-heading>div>span{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#102a2a;color:#b9d66b}
.memory-new-entry-heading svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
.memory-new-entry-heading h3{margin:0}
.memory-new-entry-heading p{margin:3px 0 0;color:#6d7975;font-size:.75rem}
.memory-coordinate-fields{margin-top:-6px}
.memory-existing-assets{margin:6px 0 18px}
.memory-assets-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:9px}
.memory-assets-heading strong,.memory-assets-heading small{display:block}
.memory-assets-heading small{color:#73807b;font-size:.68rem}
.memory-existing-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.memory-existing-grid article{position:relative;overflow:hidden;padding:7px;border:1px solid #e0e6e2;border-radius:12px;background:#fff}
.memory-existing-grid img{width:100%;aspect-ratio:1/1;border-radius:8px;object-fit:cover}
.memory-existing-grid label{display:flex;align-items:center;gap:5px;margin:7px 0 0;font-size:.68rem}
.memory-existing-grid small{display:block;margin-top:5px;overflow:hidden;color:#6c7672;font-size:.62rem;text-overflow:ellipsis;white-space:nowrap}
.memory-remove-all{margin-top:11px!important;color:#8f453e}
.memory-selected-files{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:-4px 0 15px}
.memory-selected-files:empty{display:none}
.memory-selected-file{overflow:hidden;border:1px solid #e1e6e3;border-radius:12px;background:#fff}
.memory-selected-file img{display:block;width:100%;aspect-ratio:1.2/1;object-fit:cover}
.memory-selected-file>div{padding:8px}
.memory-selected-file strong{display:block;overflow:hidden;font-size:.7rem;text-overflow:ellipsis;white-space:nowrap}
.memory-selected-file input{margin-top:6px!important;padding:7px 8px!important;font-size:.68rem!important}
.memory-inline-empty{padding:28px;text-align:center}
.memory-inline-empty p{margin-bottom:0;color:#6b7672}
.memory-sort-form{padding:20px}
.memory-sort-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:18px}
.memory-sort-grid article{display:grid;grid-template-columns:28px 58px minmax(0,1fr);align-items:center;gap:10px;min-height:72px;padding:8px;border:1px solid #e0e5e2;border-radius:13px;background:#fff;cursor:grab}
.memory-sort-grid article.is-dragging{opacity:.45;border-style:dashed}
.memory-sort-grid img,.memory-sort-placeholder{width:58px;height:54px;border-radius:9px;object-fit:cover}
.memory-sort-placeholder{display:grid;place-items:center;background:#edf3ef;color:#315c47}
.memory-sort-placeholder svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5}
.memory-drag-handle{display:grid;place-items:center;color:#72807a}
.memory-drag-handle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round}
.memory-sort-grid strong,.memory-sort-grid small{display:block}
.memory-sort-grid small{margin-top:3px;color:#74807c;font-size:.66rem}
.memory-publish-panel{display:grid;gap:18px;padding:22px}
.memory-publish-panel code{display:block;margin:7px 0;padding:11px 12px;border:1px solid #dfe5e2;border-radius:10px;background:#f7f9f8;overflow-wrap:anywhere}
.memory-publish-panel p{margin:0;color:#66726e;font-size:.8rem;line-height:1.55}
.memory-publish-qr{padding:17px;border:1px solid #dce5df;border-radius:14px;background:#f7faf8}
.memory-publish-qr strong{display:block;margin-bottom:5px}
.memory-publish-qr .button{margin-top:12px}
.memory-danger-zone{padding:18px 20px;border-color:#efd5d3}
.memory-danger-zone summary{cursor:pointer;font-weight:900;color:#98403e}
.memory-danger-zone p{color:#756967}
.memory-preview-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}
.memory-preview-toolbar>div{display:grid;gap:3px}
.memory-preview-toolbar a{font-size:.76rem;font-weight:800}
.memory-phone-entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.memory-phone-entry-grid article{position:relative;min-height:100px;overflow:hidden;border:1px solid color-mix(in srgb,var(--memory-primary) 10%,transparent);border-radius:12px;background:#fff}
.memory-phone-entry-grid img{width:100%;height:82px;object-fit:cover}
.memory-phone-entry-grid article>div{padding:8px}
.memory-phone-entry-grid small{display:block;color:var(--memory-accent);font-size:.5rem;font-weight:900;text-transform:uppercase}
.memory-phone-entry-grid strong{display:block;margin-top:3px;font-size:.67rem}
.memory-phone-entry-grid .type-story{grid-column:1/-1;min-height:90px}
.memory-preview-empty{display:grid;gap:4px;padding:65px 15px;text-align:center;color:#76807c}
.memory-public-url{display:grid;gap:3px;margin-top:14px;padding:14px;border:1px solid #e0e6e2;border-radius:14px;background:#fff}
.memory-public-url small,.memory-public-url span{font-size:.72rem;color:#75817d}
.memory-public-url code{overflow-wrap:anywhere;font-size:.75rem}

/* ----------------------------------------------------------------
   Public memory experience
---------------------------------------------------------------- */
.public-memory{
    margin:0;min-height:100vh;background:var(--memory-surface,#fffdf8);color:var(--memory-primary,#102a2a);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
.public-memory *{box-sizing:border-box}
.public-memory button,.public-memory a{font:inherit}
.public-memory-hero{
    position:relative;display:flex;min-height:370px;align-items:flex-end;overflow:hidden;
    padding:calc(48px + env(safe-area-inset-top)) 22px 40px;
    background:linear-gradient(145deg,var(--memory-primary),color-mix(in srgb,var(--memory-primary) 72%,var(--memory-accent)));
    color:#fff;border-radius:0 0 34px 34px
}
.public-memory-hero.has-cover{min-height:520px}
.public-memory-hero-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.public-memory-hero-shade{position:absolute;inset:0;background:linear-gradient(to top,rgba(7,22,20,.82),rgba(7,22,20,.18) 55%,rgba(7,22,20,.06))}
.public-memory-hero-content{position:relative;z-index:1;width:min(100%,900px);margin:0 auto}
.public-memory-kicker{font-size:.67rem;font-weight:900;letter-spacing:.18em;color:color-mix(in srgb,var(--memory-accent) 70%,#fff)}
.public-memory-hero h1{max-width:760px;margin:11px 0 12px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2.8rem,10vw,5.6rem);font-weight:400;line-height:.93;letter-spacing:-.045em}
.public-memory-hero p{max-width:660px;margin:0;color:rgba(255,255,255,.82);font-size:clamp(.9rem,2vw,1.05rem);line-height:1.65}
.public-memory-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:21px}
.public-memory-meta span{display:flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(10,28,24,.18);backdrop-filter:blur(8px);font-size:.76rem;font-weight:700}
.public-memory-meta svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6}
.public-memory-main{width:min(100% - 28px,1100px);margin:0 auto;padding:20px 0 90px}
.public-memory-toolbar{position:sticky;top:0;z-index:10;margin:0 -2px 18px;padding:10px 2px 12px;background:color-mix(in srgb,var(--memory-surface) 92%,transparent);backdrop-filter:blur(16px)}
.public-memory-filters{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none}
.public-memory-filters::-webkit-scrollbar{display:none}
.public-memory-filters button{display:flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--memory-primary) 14%,transparent);border-radius:999px;background:#fff;color:var(--memory-primary);white-space:nowrap;cursor:pointer;font-size:.76rem;font-weight:850}
.public-memory-filters button small{display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:#edf2ef;font-size:.6rem}
.public-memory-filters button.active{border-color:var(--memory-primary);background:var(--memory-primary);color:#fff}
.public-memory-filters button.active small{background:rgba(255,255,255,.18)}
.public-memory-grid{columns:3 280px;column-gap:14px}
.public-memory-card{display:inline-block;width:100%;margin:0 0 14px;overflow:hidden;border:1px solid color-mix(in srgb,var(--memory-primary) 9%,transparent);border-radius:20px;background:#fff;box-shadow:0 12px 32px rgba(16,42,42,.055);break-inside:avoid}
.public-memory-card.is-featured{border-color:color-mix(in srgb,var(--memory-accent) 58%,#fff);box-shadow:0 16px 38px rgba(16,42,42,.1)}
.public-memory-image{position:relative;display:block;width:100%;padding:0;border:0;background:#edf2ef;cursor:zoom-in}
.public-memory-image img{display:block;width:100%;height:auto;min-height:190px;max-height:520px;object-fit:cover}
.public-memory-image-count,.public-memory-featured{position:absolute;top:12px;padding:6px 8px;border-radius:999px;background:rgba(7,25,21,.74);color:#fff;backdrop-filter:blur(8px);font-size:.63rem;font-weight:850}
.public-memory-image-count{right:12px;display:flex;align-items:center;gap:5px}
.public-memory-image-count svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5}
.public-memory-featured{left:12px;background:var(--memory-accent);color:var(--memory-primary)}
.public-memory-card-body{padding:17px 18px 19px}
.public-memory-type{font-size:.61rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:var(--memory-accent)}
.public-memory-card h2{margin:7px 0 8px;font-family:Georgia,"Times New Roman",serif;font-size:1.48rem;font-weight:400;line-height:1.05}
.public-memory-story{margin:0;color:color-mix(in srgb,var(--memory-primary) 68%,#fff);font-size:.82rem;line-height:1.67;white-space:pre-line}
.public-memory-card-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:13px}
.public-memory-card-meta span{padding:5px 7px;border-radius:8px;background:color-mix(in srgb,var(--memory-primary) 5%,#fff);color:color-mix(in srgb,var(--memory-primary) 65%,#fff);font-size:.65rem}
.public-memory-map-link{display:inline-block;margin-top:13px;color:var(--memory-primary);font-size:.72rem;font-weight:850;text-decoration:none}
.public-memory-card.type-story:not(:has(.public-memory-image)){background:color-mix(in srgb,var(--memory-accent) 7%,#fff)}
.public-memory-card.type-story:not(:has(.public-memory-image)) .public-memory-card-body{padding:26px 24px}
.public-memory-card.type-story:not(:has(.public-memory-image)) h2{font-size:1.85rem}
.public-memory-card.type-place:not(:has(.public-memory-image)){background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--memory-primary) 5%,#fff))}
.public-memory-empty{text-align:center;padding:90px 20px}
.public-memory-empty>span{display:grid;place-items:center;width:64px;height:64px;margin:0 auto;border-radius:18px;background:color-mix(in srgb,var(--memory-primary) 7%,#fff)}
.public-memory-empty svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.5}
.public-memory-empty h2{margin:15px 0 6px;font-family:Georgia,serif;font-weight:400}
.public-memory-empty p{margin:0;color:#6d7974}
.public-memory-loading{display:flex;align-items:center;justify-content:center;gap:10px;padding:24px;color:#687570;font-size:.78rem}
.public-memory-loading span{width:19px;height:19px;border:2px solid #dce4df;border-top-color:var(--memory-primary);border-radius:50%;animation:memory-spin .7s linear infinite}
.public-memory-load-more{display:block;margin:24px auto 0;padding:11px 16px;border:1px solid color-mix(in srgb,var(--memory-primary) 18%,transparent);border-radius:999px;background:#fff;color:var(--memory-primary);cursor:pointer;font-weight:850}
.public-memory-sentinel{height:1px}
.public-memory-footer{display:flex;align-items:center;gap:7px;width:min(100% - 28px,1100px);margin:0 auto;padding:22px 0 calc(30px + env(safe-area-inset-bottom));border-top:1px solid color-mix(in srgb,var(--memory-primary) 10%,transparent);color:#78827e;font-size:.72rem}
.public-memory-footer a{color:var(--memory-primary);font-weight:900;text-decoration:none}
.public-memory-footer small{margin-left:auto}

/* Themes */
.memory-theme-journal .public-memory-hero h1,
.memory-theme-journal .public-memory-card h2{font-family:Georgia,"Times New Roman",serif}
.memory-theme-clean .public-memory-hero{border-radius:0}
.memory-theme-clean .public-memory-hero h1,
.memory-theme-clean .public-memory-card h2{font-family:inherit;font-weight:800;letter-spacing:-.04em}
.memory-theme-clean .public-memory-card{border-radius:12px;box-shadow:none}

/* Lightbox */
.memory-lightbox{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(4,12,10,.94);color:#fff}
.memory-lightbox[hidden]{display:none}
.memory-lightbox figure{display:grid;place-items:center;max-width:min(100%,1100px);max-height:calc(100vh - 70px);margin:0}
.memory-lightbox figure img{display:block;max-width:100%;max-height:calc(100vh - 115px);border-radius:14px;object-fit:contain}
.memory-lightbox figcaption{margin-top:10px;color:rgba(255,255,255,.72);font-size:.78rem;text-align:center}
.memory-lightbox-close,.memory-lightbox-nav{position:absolute;display:grid;place-items:center;border:1px solid rgba(255,255,255,.2);border-radius:50%;background:rgba(0,0,0,.28);color:#fff;cursor:pointer;backdrop-filter:blur(8px)}
.memory-lightbox-close{top:max(16px,env(safe-area-inset-top));right:18px;width:42px;height:42px}
.memory-lightbox-close svg,.memory-lightbox-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.memory-lightbox-nav{top:50%;width:46px;height:46px;transform:translateY(-50%)}
.memory-lightbox-nav.previous{left:18px}
.memory-lightbox-nav.next{right:18px}

@keyframes memory-spin{to{transform:rotate(360deg)}}

@media(max-width:980px){
    .memory-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .memory-create-layout,.memory-editor-layout{grid-template-columns:1fr}
    .memory-create-preview,.memory-editor-preview{position:static}
    .memory-editor-preview{order:-1}
    .memory-build-path{grid-template-columns:repeat(6,minmax(160px,1fr))}
}
@media(max-width:720px){
    .memory-library-toolbar,.memory-editor-heading,.memory-create-submit,.memory-next-step{align-items:stretch;flex-direction:column}
    .memory-library-grid,.memory-editor-metrics{grid-template-columns:1fr}
    .memory-search-form{max-width:none}
    .memory-editor-status{justify-content:flex-start}
    .memory-editor-status form,.memory-editor-status .button{width:100%}
    .field-pair,.memory-theme-picker,.memory-color-grid{grid-template-columns:1fr}
    .memory-existing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .memory-sort-grid{grid-template-columns:1fr}
    .memory-selected-files{grid-template-columns:repeat(2,minmax(0,1fr))}
    .public-memory-hero.has-cover{min-height:460px}
    .public-memory-grid{columns:2 230px}
}
@media(max-width:520px){
    .memory-form-step{padding:22px 18px}
    .memory-create-submit{padding:20px 18px}
    .memory-phone{max-width:345px}
    .memory-phone-screen{min-height:560px}
    .memory-entry-editor-card>summary{align-items:flex-start}
    .memory-entry-flags>span{display:none}
    .memory-entry-summary{min-width:0}
    .memory-existing-grid,.memory-selected-files{grid-template-columns:1fr 1fr}
    .memory-assets-heading{align-items:flex-start;flex-direction:column}
    .public-memory-main{width:min(100% - 20px,1100px)}
    .public-memory-hero{min-height:350px;padding-inline:16px;border-radius:0 0 26px 26px}
    .public-memory-hero.has-cover{min-height:420px}
    .public-memory-hero h1{font-size:clamp(2.7rem,14vw,4.2rem)}
    .public-memory-grid{columns:1}
    .public-memory-card{margin-bottom:12px;border-radius:17px}
    .public-memory-image img{max-height:none}
    .public-memory-footer{width:min(100% - 20px,1100px);flex-wrap:wrap}
    .public-memory-footer small{width:100%;margin-left:0}
    .memory-lightbox-nav{width:39px;height:39px}
    .memory-lightbox-nav.previous{left:8px}
    .memory-lightbox-nav.next{right:8px}
}

/* ---------------------------------------------------------------
   Memory public state safety
   The browser hidden attribute must win over component display rules.
---------------------------------------------------------------- */
.public-memory-loading[hidden],
.public-memory-load-more[hidden],
.public-memory-empty[hidden],
.memory-lightbox[hidden] {
    display: none !important;
}

/* ---------------------------------------------------------------
   Memory QR acquisition / SEO page
---------------------------------------------------------------- */
.memory-seo-hero {
    overflow: hidden;
    padding: 78px 0 88px;
    background:
        radial-gradient(circle at 82% 22%, rgba(185,214,107,.22), transparent 29rem),
        radial-gradient(circle at 15% 78%, rgba(240,188,167,.18), transparent 26rem);
}

.memory-seo-hero-grid {
    display: grid;
    grid-template-columns: minmax(0,1.05fr) minmax(330px,.72fr);
    align-items: center;
    gap: 64px;
}

.memory-seo-copy h1 {
    max-width: 760px;
    margin: 20px 0 22px;
    font-size: clamp(3.7rem,7vw,7.2rem);
    line-height: .91;
    letter-spacing: -.055em;
}

.memory-seo-copy > p {
    max-width: 680px;
    font-size: 1.08rem;
    line-height: 1.72;
    color: #66736e;
}

.memory-seo-showcase {
    position: relative;
    width: min(100%,430px);
    margin-inline: auto;
}

.memory-seo-phone {
    min-height: 610px;
    overflow: hidden;
    padding: 24px;
    border: 9px solid #132a25;
    border-radius: 42px;
    background: #fffdf8;
    box-shadow: 0 38px 80px rgba(10,40,32,.17);
}

.memory-seo-phone-cover {
    display: flex;
    align-items: flex-end;
    height: 230px;
    margin: -24px -24px 24px;
    padding: 22px;
    background:
        linear-gradient(to top,rgba(11,35,29,.68),transparent),
        radial-gradient(circle at 70% 24%,#d7e4a8 0 8%,transparent 9%),
        linear-gradient(145deg,#356f61,#91a98b 52%,#d6b198);
}

.memory-seo-phone-cover span {
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .18em;
    color: #fff;
}

.memory-seo-phone > small {
    color: #75952d;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .16em;
}

.memory-seo-phone h2 {
    margin: 8px 0;
    font-family: Georgia,serif;
    font-size: 2.35rem;
    font-weight: 400;
}

.memory-seo-phone > p {
    margin: 0 0 18px;
    color: #68746f;
    font-size: .8rem;
    line-height: 1.55;
}

.memory-seo-phone nav {
    display: flex;
    gap: 6px;
    margin-bottom: 13px;
}

.memory-seo-phone nav > * {
    padding: 7px 9px;
    border: 1px solid #dde4df;
    border-radius: 999px;
    font-size: .6rem;
}

.memory-seo-phone nav b {
    border-color: #173b35;
    background: #173b35;
    color: #fff;
}

.memory-seo-mosaic {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    grid-template-rows: 94px 94px;
    gap: 7px;
}

.memory-seo-mosaic i {
    border-radius: 12px;
    background: #d7e3de;
}

.memory-seo-mosaic i:first-child {
    grid-row: 1/3;
    background: linear-gradient(150deg,#214f42,#739381);
}

.memory-seo-mosaic i:nth-child(2) {
    background: linear-gradient(135deg,#d9b3a0,#f1d9cb);
}

.memory-seo-mosaic i:nth-child(3) {
    background: linear-gradient(135deg,#bdcf7d,#e0e7b6);
}

.memory-seo-floating-card {
    position: absolute;
    right: -42px;
    bottom: 70px;
    display: grid;
    gap: 3px;
    width: 220px;
    padding: 15px 17px;
    border: 1px solid rgba(25,62,52,.12);
    border-radius: 15px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 45px rgba(12,38,31,.14);
    backdrop-filter: blur(12px);
}

.memory-seo-floating-card span {
    color: #75952d;
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.memory-seo-floating-card strong {
    font-family: Georgia,serif;
    font-size: 1.07rem;
}

.memory-seo-floating-card small {
    color: #6d7874;
}

.memory-seo-workflow ol {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.memory-seo-workflow li {
    min-height: 230px;
    padding: 24px;
    border: 1px solid #e0e7e3;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
}

.memory-seo-workflow li > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 30px;
    border-radius: 11px;
    background: #173b35;
    color: #b9d66b;
    font-weight: 900;
}

.memory-seo-workflow li strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.memory-seo-workflow li p {
    margin: 0;
    color: #697570;
    line-height: 1.65;
}

.memory-seo-use-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px;
}

.memory-seo-use-grid article {
    padding: 25px;
    border: 1px solid #e1e6e3;
    border-radius: 18px;
    background: #fff;
}

.memory-seo-use-grid strong {
    display: block;
    margin-bottom: 8px;
    font-family: Georgia,serif;
    font-size: 1.25rem;
    font-weight: 400;
}

.memory-seo-use-grid p {
    margin: 0;
    color: #6a7671;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .memory-seo-hero-grid {
        grid-template-columns: 1fr;
    }

    .memory-seo-showcase {
        width: min(100%,390px);
    }

    .memory-seo-workflow ol {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 680px) {
    .memory-seo-hero {
        padding: 54px 0 66px;
    }

    .memory-seo-copy h1 {
        font-size: clamp(3.15rem,16vw,5rem);
    }

    .memory-seo-floating-card {
        right: -8px;
        bottom: 56px;
    }

    .memory-seo-workflow ol,
    .memory-seo-use-grid {
        grid-template-columns: 1fr;
    }
}
