.detail.memory-detail { width:620px; }
.memory-detail .detail-header { position:sticky; top:0; z-index:2; background:var(--ds-surface); }
.memory-detail .detail-body { padding:var(--ds-space-2) var(--ds-space-8) var(--ds-space-10); }
.memory-document { min-width:0; }
.memory-document-header { margin-bottom:var(--ds-space-6); }
.memory-document-topline { margin:0 0 var(--ds-space-2); font-size:var(--ds-text-sm); }
.memory-document-copy { display:inline-flex; align-items:center; min-height:32px; color:var(--ds-muted); font-size:var(--ds-text-sm); }
.memory-document .memory-document-title { margin:0; font-size:var(--ds-text-xl); font-weight:600; line-height:1.35; text-wrap:pretty; overflow-wrap:anywhere; }
.memory-document-meta { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ds-space-1) var(--ds-space-4); margin-top:var(--ds-space-2); color:var(--ds-muted); font-size:var(--ds-text-sm); line-height:1.6; }
.memory-document-meta>span,.memory-document-meta>time { min-width:0; overflow-wrap:anywhere; }
.memory-document-tabs { display:flex; gap:var(--ds-space-6); margin-bottom:var(--ds-space-6); }
.memory-document-tabs>[role=tab] { min-height:36px; padding:0; border:0; border-radius:0; background:transparent; color:var(--ds-muted); font-size:var(--ds-text-base); font-weight:450; }
.memory-document-tabs>[aria-selected=true] { color:var(--ds-ink); font-weight:600; }
.memory-reader-panel[hidden],.memory-source-panel[hidden] { display:none; }
.memory-reader-panel,.memory-source-panel { min-width:0; outline-offset:5px; }
.memory-prose { color:var(--ds-ink); font-size:var(--ds-text-base); line-height:1.8; overflow-wrap:anywhere; }
.memory-prose p,.memory-prose ul,.memory-prose ol,.memory-prose pre { margin:0 0 var(--ds-space-4); }
.memory-prose p:last-child,.memory-prose ul:last-child,.memory-prose ol:last-child,.memory-prose pre:last-child { margin-bottom:0; }
.memory-prose ul,.memory-prose ol { padding-left:20px; }
.memory-prose li { margin:var(--ds-space-1) 0; padding-left:3px; }
.memory-prose strong { font-weight:600; color:var(--ds-ink); }
.memory-prose :is(h2,h3,h4,h5,h6) { margin:var(--ds-space-6) 0 var(--ds-space-2); color:var(--ds-ink); font-size:var(--ds-text-lg); font-weight:600; line-height:1.5; }
.memory-prose> :is(h2,h3,h4,h5,h6):first-child { margin-top:0; }
.memory-prose a { text-underline-offset:.2em; }
.memory-prose code { font-family:var(--ds-font-mono); font-size:.9em; }
.memory-prose pre { max-width:100%; overflow:auto; padding:var(--ds-space-3) var(--ds-space-4); border:0; border-radius:var(--ds-radius-control); background:var(--ds-surface); }
.memory-prose pre code { padding:0; background:none; }
.memory-journal-context { margin-bottom:var(--ds-space-6); color:var(--ds-muted); }
.memory-journal-outro { margin-top:var(--ds-space-6); }
.memory-entry-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--ds-space-3); margin-bottom:var(--ds-space-3); }
.memory-entry-heading h3,.memory-related h3 { margin:0; color:var(--ds-ink); font-size:var(--ds-text-base); font-weight:600; }
.memory-entry-count { color:var(--ds-muted); font-size:var(--ds-text-sm); }
.memory-expand { margin-left:auto; padding:0; min-height:32px; border:0; color:var(--ds-ink); background:none; font-size:var(--ds-text-sm); }
.memory-entry-search { display:flex; align-items:center; gap:var(--ds-space-2); margin-bottom:var(--ds-space-4); padding:0 var(--ds-space-3); color:var(--ds-muted); }
.memory-entry-search input { width:100%; min-width:0; min-height:40px; padding:8px 0; border:0; border-radius:0; outline:none; box-shadow:none; background:none; font-size:var(--ds-text-base); }
.memory-entry-search input::placeholder { color:var(--ds-muted); }
.memory-entry-list { display:grid; gap:var(--ds-space-5); }
.memory-entry { margin:0; }
.memory-entry>summary { padding:0; list-style:none; color:var(--ds-ink); }
.memory-entry>summary::-webkit-details-marker,.memory-document-section>summary::-webkit-details-marker,.memory-contributors>summary::-webkit-details-marker { display:none; }
.memory-entry>summary:focus-visible { outline:2px solid var(--ds-accent); outline-offset:3px; border-radius:var(--ds-radius-control); }
.memory-entry-topline { display:flex; align-items:baseline; justify-content:space-between; gap:var(--ds-space-3); }
.memory-entry-topline time { display:flex; flex-wrap:wrap; gap:var(--ds-space-2); min-width:0; color:var(--ds-ink); font-size:var(--ds-text-sm); font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.memory-entry-topline time>span { color:var(--ds-muted); font-weight:400; }
.memory-entry-prompt { flex-shrink:0; color:var(--ds-muted); font-size:var(--ds-text-sm); white-space:nowrap; }
.memory-entry-preview { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; margin-top:var(--ds-space-1); color:var(--ds-ink); font-size:var(--ds-text-base); line-height:1.7; white-space:pre-line; overflow-wrap:anywhere; }
.memory-entry[open]>summary { padding-bottom:var(--ds-space-2); }
.memory-entry[open] .memory-entry-preview,.memory-entry-close { display:none; }
.memory-entry[open] .memory-entry-read { display:none; }
.memory-entry[open] .memory-entry-close { display:inline; }
.memory-entry-body { padding:0; font-size:var(--ds-text-base); line-height:1.8; }
.memory-show-more { display:flex; justify-content:flex-start; width:fit-content; min-height:36px; margin-top:var(--ds-space-4); padding:0; border:0; color:var(--ds-ink); background:transparent; font-size:var(--ds-text-sm); }
.memory-show-more[hidden],.memory-search-empty[hidden] { display:none; }
.memory-search-empty,.memory-document-empty { padding:var(--ds-space-6) 0; color:var(--ds-muted); font-size:var(--ds-text-base); }
.memory-document-section { margin:0; }
.memory-document-section>summary { display:flex; align-items:center; min-height:44px; padding:var(--ds-space-2) 0; list-style:none; color:var(--ds-ink); font-size:var(--ds-text-base); font-weight:600; }
.memory-document-section>summary>:is(h2,h3,h4,h5,h6) { min-width:0; margin:0; font-size:inherit; font-weight:inherit; line-height:1.5; overflow-wrap:anywhere; }
.memory-document-section-body { padding:var(--ds-space-1) 0 var(--ds-space-5); }
.memory-source-caption { margin:0 0 var(--ds-space-3); color:var(--ds-muted); font-size:var(--ds-text-sm); }
.memory-source-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:var(--ds-space-3); margin-bottom:var(--ds-space-3); }
.memory-source-toolbar .memory-source-caption { margin:0; }
.memory-source-text { margin:0; padding:var(--ds-space-4); border:0; border-radius:var(--ds-radius-control); color:var(--ds-ink); background:var(--ds-surface-soft); white-space:pre-wrap; overflow-wrap:anywhere; font:var(--ds-text-sm)/1.8 var(--ds-font-mono); }
.memory-related { margin-top:var(--ds-space-8); }
.memory-related>div { display:grid; gap:0; margin-top:var(--ds-space-2); }
.memory-related-link { display:flex; align-items:center; min-height:36px; padding:0; color:var(--ds-ink); font-size:var(--ds-text-base); text-underline-offset:.2em; }
.memory-related-link>span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.memory-contributors { margin-top:var(--ds-space-6); }
.memory-contributors>summary { display:flex; align-items:center; min-height:40px; list-style:none; color:var(--ds-muted); font-size:var(--ds-text-sm); }
.memory-contributor-list { display:grid; gap:var(--ds-space-2); padding:var(--ds-space-1) 0; }
.memory-contributor { display:flex; align-items:baseline; gap:var(--ds-space-3); color:var(--ds-ink); font-size:var(--ds-text-sm); }
.memory-contributor>span { flex:1; min-width:0; overflow-wrap:anywhere; }
.memory-contributor small { flex-shrink:0; color:var(--ds-muted); font-size:var(--ds-text-sm); }
.memory-document [role=tab]:focus-visible,.memory-document summary:focus-visible,.memory-expand:focus-visible { outline:2px solid var(--ds-accent); outline-offset:3px; }
@media (hover:hover) and (pointer:fine) { .memory-entry>summary:hover .memory-entry-prompt, .memory-expand:hover, .memory-contributors>summary:hover { color:var(--ds-ink); } .memory-related-link:hover { background:transparent; } }
@media (max-width:620px) { .memory-detail .detail-body { padding:var(--ds-space-2) var(--ds-space-5) var(--ds-space-8); } }
@media (max-width:360px) { .memory-detail .detail-body { padding-left:var(--ds-space-4); padding-right:var(--ds-space-4); } .memory-entry-prompt>span { display:none; } }
@media (forced-colors:active) { .memory-document :is(.memory-source-text,.memory-prose pre) { border:1px solid GrayText; background:Canvas; } .memory-document-tabs>[aria-selected=true] { color:Highlight; } }
