.agent-memory{padding:30px;margin-bottom:24px;background:linear-gradient(120deg,#fffdf8,var(--panel));border:1px solid var(--line);border-radius:22px}
.memory-eyebrow{color:var(--olive-deep);font-size:11px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:10px}
.agent-memory h2{font-family:'Playfair Display',serif;font-size:28px;font-weight:500;line-height:1.2;margin:0 0 12px}
.memory-intro{max-width:68ch;color:var(--muted);font-size:14px;line-height:1.65;margin-bottom:24px}
.memory-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.memory-fields>div:last-child{grid-column:1/-1;max-width:540px;width:100%}
.memory-fields label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}
.memory-fields textarea{width:100%;min-height:116px;font:14px/1.6 Inter,sans-serif;resize:vertical;box-sizing:border-box}
.memory-fields textarea:focus-visible,.memory-actions button:focus-visible{outline:3px solid var(--olive);outline-offset:3px}
.memory-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.memory-help,.memory-privacy{font-size:12px;line-height:1.6;color:var(--muted);margin-top:16px;max-width:85ch}
.memory-privacy{padding-top:16px;border-top:1px solid var(--line)}
.memory-status{min-height:1.5em;margin:14px 0 0;color:var(--olive-deep);font-size:13px;line-height:1.6}
.memory-error{color:#97492f}
.memory-confirm{margin-top:16px;padding:16px;background:var(--olive-soft);border-radius:12px;font-size:14px;line-height:1.6}
.memory-confirm p{margin-bottom:12px}
.agent-memory [hidden]{display:none!important}
.agent-memory button:disabled{opacity:.6;cursor:wait}
#agentMemorySource{font-size:12px;line-height:1.6;color:var(--muted);margin-top:16px}
@media(max-width:700px){.agent-memory{padding:22px}.agent-memory h2{font-size:24px}.memory-fields{grid-template-columns:1fr;gap:16px}.memory-fields>div:last-child{max-width:none}.memory-actions{align-items:stretch;flex-direction:column}.memory-actions .btn{justify-content:center;width:100%}}

.memory-primary{display:block;max-width:720px}.memory-fields.memory-primary>div{max-width:none}
.memory-more{margin-top:16px}.memory-more summary{cursor:pointer;color:var(--olive-deep);font-size:13px;padding:8px 0;list-style-position:inside}
.memory-more[open] summary{margin-bottom:14px}.memory-more .memory-fields{grid-template-columns:1fr 1fr}.memory-more .memory-fields>div:last-child{grid-column:auto;max-width:none}
.memory-more summary:focus-visible{outline:3px solid var(--olive);outline-offset:4px}
@media(max-width:700px){.memory-more .memory-fields{grid-template-columns:1fr}}

.import-file-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line,#EAE4D8);font-size:14px}
.import-file-row>span{overflow-wrap:anywhere;flex:1;min-width:0}.import-file-row>button{flex:none}

@media(max-width:700px){#obs0 .upload-start{flex-direction:column;gap:10px}#obs0 .upload-start .btn{width:100%;justify-content:center}}
