.memo-settings {display:grid;gap:12px;margin:10px 0 16px;min-width:0}
.memo-photo-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:10px}
.memo-photo-grid:empty {display:none}
.memo-photo {display:grid;grid-template-columns:76px minmax(0,1fr);align-items:start;gap:10px;padding:12px;border:1px solid #dbe4ee;border-radius:10px;background:#f8fafc;color:#27364b}
.memo-photo>img {width:76px;height:80px;object-fit:cover;border-radius:6px;background:#e6ecf1}
.memo-photo>label {display:grid;gap:4px;font-size:13px;font-weight:600}
.memo-photo textarea {box-sizing:border-box;width:100%;min-width:0;resize:vertical;line-height:1.45;border:1px solid #bfccd9;border-radius:5px;padding:5px 7px;font:inherit;font-weight:400;background:#fff;color:#26364b}
.memo-photo textarea:focus {outline:2px solid #337ad6;outline-offset:1px}
.memo-photo-tools {grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px}
.memo-settings button {background:#fff;border:1px solid #cbd7e3;border-radius:5px;color:#27547f;font:inherit;font-size:12px;line-height:1.4;padding:4px 8px;cursor:pointer}
.memo-settings button:hover:enabled {background:#edf4ff}
.memo-settings button:disabled {opacity:.45;cursor:default}
.memo-settings .memo-danger {color:#a32a32;margin-left:auto}
.memo-narration,.memo-settings details {padding:10px 12px;border:1px solid #dbe4ee;border-radius:8px}
.memo-narration,.memo-narration label,.memo-settings details label {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.memo-narration input {max-width:100%}
.memo-settings summary {font-weight:600;cursor:pointer}
.memo-settings details[open] {display:flex;flex-wrap:wrap;gap:10px}
.memo-settings details summary {width:100%}
.memo-settings details label {display:inline-flex;margin:8px 14px 0 0}
.memo-settings input[type=number] {width:5em}
.memo-popup{position:fixed;inset:0;margin:auto;padding:0;border:0;box-sizing:border-box;width:90vw;max-width:none;max-height:none;background:white;color:#263632;height:90vh;height:90dvh;overflow:hidden}body:has(> .memo-popup[open]) > :not(.memo-popup) { opacity:0 !important; }
.memo-popup::backdrop {
    inset:-14px;
    background:linear-gradient(#13191d80,#13191d80) center/cover, var(--memo-scenery,none) center/cover no-repeat #242b31;
    filter:blur(9px);
}
.memo-layout{display:flex;height:100%}.memo-popup aside{display:flex;flex-direction:column;gap:.65rem;padding:1.4rem;flex:1;min-width:0}.memo-stage + aside{box-sizing:border-box;flex:0 0 clamp(268px,27%,460px);min-height:0}.memo-popup aside[hidden]{display:none}.memo-popup aside h2{font:600 1.25rem/1.4 system-ui;padding-right:2rem;margin:0}.memo-popup audio,.memo-popup iframe{width:100%}.memo-popup iframe{border:0;flex:1}.memo-stage{background:#181c1c;position:relative;overflow:hidden;flex:1;min-width:0}.memo-stage>img{width:100%;height:100%;object-fit:contain}.memo-popup button{border:0;cursor:pointer}.memo-stage>button,.memo-close{position:absolute;border-radius:1.5rem;color:white;background:#182322ca;padding:.35em .7em}.memo-popup .memo-close{top:.5rem;right:.5rem;width:2rem;height:2rem;padding:0;font:24px/1 system-ui}.memo-prev,.memo-next{top:48%;font-size:1.6rem}.memo-prev,.memo-pause{left:.5rem}.memo-next,.memo-toggle{right:.5rem}.memo-pause{top:.5rem}.memo-toggle{bottom:.5rem}.memo-strip,.memo-caption{position:absolute;left:50%;transform:translateX(-50%);background:#151919bb;border-radius:.4em;color:white;max-width:70%;}.memo-strip{bottom:.4rem;display:flex;overflow:auto;gap:.25em;padding:.25em}.memo-strip button{background:none;padding:2px}.memo-strip img{width:42px;height:32px;object-fit:cover}.memo-strip [aria-current=true]{outline:2px solid white;outline-offset:-2px}.memo-caption{bottom:3.2rem;padding:0 .5em}.memo-caption:empty{display:none}@media(max-width:680px){.memo-layout{flex-direction:column}.memo-stage{flex:3}.memo-popup aside,.memo-stage + aside{flex:2;min-height:0;padding:.8rem}.memo-toggle{right:.2em}.memo-popup{width:96vw;height:91dvh}}
dialog.memo-manager {
    position:fixed; inset:0; margin:auto; padding:0; box-sizing:border-box;
    width:94vw; height:92vh; height:92dvh;
    max-width:none; max-height:none; overflow:hidden; border:1px solid #ccd6e3;
    border-radius:14px; background:white; color:#213047; box-shadow:0 24px 90px #0c182d40;
}
.memo-manager[open] { display:flex; flex-direction:column; }
.memo-manager::backdrop { background:rgb(19 30 46 / 48%); }
.memo-manager>header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; border-bottom:1px solid #dce3ec; }
.memo-manager>header button { display:grid; place-items:center; width:36px; height:36px; background:#f0f4f8; border:0; border-radius:50%; color:#36475a; font:26px/1 system-ui; }
.memo-manager>header button:hover { background:#e1eaf4; }
.memo-manager>iframe { flex:1; min-height:0; width:100%; border:0; }
.memo-stage .memo-slides,.memo-slide { position:absolute; inset:0; overflow:hidden; }
.memo-slide { background:#181c1c; }
.memo-slide img { width:100%; height:100%; object-fit:contain; }
.memo-slide.sweep::after { content:''; position:absolute; inset:0; background:linear-gradient(105deg,transparent 38%,#fff6 50%,transparent 62%); animation:memo-light-sweep .65s ease-out both; }
@keyframes memo-light-sweep { from { transform:translateX(-100%); } to { transform:translateX(100%); } }
@media (prefers-reduced-motion:reduce) { .memo-slide.sweep::after { display:none; } }
