.memory-labs{max-width:820px}.memory-labs>header,.memory-toolbar,.memory-item footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.memory-labs>header h3{margin-bottom:6px}.memory-labs>header p{color:var(--muted)}.memory-toolbar{margin:24px 0 12px}.memory-toolbar input{flex:1;min-width:0}.memory-item{padding:14px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.memory-item p{white-space:pre-wrap;margin:0 0 10px}.memory-item footer{flex-wrap:wrap;gap:8px}.memory-item small{color:var(--muted);font-size:12px}.memory-item footer span{display:flex;gap:6px}.memory-item button{font-size:12px;padding:4px 9px}.memory-receipt,.memory-references{margin:12px 0;padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:var(--panel,#fafaf8);font-size:13px}.memory-receipt .memory-item:last-child,.memory-references .memory-item:last-child{border:0;padding-bottom:0}.memory-references summary{cursor:pointer;color:var(--muted)}.memory-dialog{width:min(520px,calc(100vw - 40px));padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--bg,#fff);color:var(--text);box-shadow:0 20px 80px #0003}.memory-dialog::backdrop{background:#0005}.memory-dialog textarea{width:100%;box-sizing:border-box;resize:vertical}.memory-error{color:#b44835;white-space:pre-wrap}.memory-dialog h3{margin-top:0}@media(max-width:600px){.memory-labs>header{align-items:flex-start}.memory-item footer{align-items:flex-start;flex-direction:column}}
.memory-labs>header{position:static;height:auto;min-height:0;padding:18px 20px;margin:0 0 12px;border:1px solid #dce2eb;border-radius:10px;background:#fff;box-shadow:none}
.memory-labs>header h3{margin:0 0 6px;font-size:15px}.memory-labs>header p{margin:0;font-size:12px;line-height:1.7}
.memory-labs .settings-check{display:flex;gap:8px;white-space:nowrap;cursor:pointer}
.memory-labs .settings-check input{appearance:none;position:relative;width:34px;height:20px;flex:none;margin:0;border:0;border-radius:12px;background:#b9c3cf;cursor:pointer}
.memory-labs .settings-check input::after{content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .15s}
.memory-labs .settings-check input:checked{background:#264d79}.memory-labs .settings-check input:checked::after{transform:translateX(14px)}.memory-labs .settings-check input:disabled{opacity:.5;cursor:default}
.memory-toolbar input{box-sizing:border-box;border:1px solid #dce2eb;border-radius:7px;background:#fff;padding:9px 12px;font:inherit;color:#27364e}
.memory-toolbar button,.memory-item button{padding:6px 10px;border:1px solid #dce2eb;border-radius:7px;background:#fff;color:#42536a;font:inherit;font-size:12px;cursor:pointer}
.memory-toolbar button{padding:9px 14px;background:#264d79;border-color:#264d79;color:#fff;white-space:nowrap}
.memory-toolbar input:focus-visible,.memory-labs input:focus-visible,.memory-item button:focus-visible{outline:2px solid #79a7dc;outline-offset:2px}
.memory-labs [data-memory-list]{margin-top:10px;padding:0 18px;background:#fff;border:1px solid #dce2eb;border-radius:10px}
.memory-labs [data-memory-list]>.memory-item:last-child{border-bottom:0}.memory-item p{line-height:1.75}
@media(prefers-reduced-motion:reduce){.memory-labs .settings-check input::after{transition:none}}

.memory-condition{font-size:12px;color:var(--muted);margin:0 0 10px;line-height:1.6}.memory-condition>span{font-weight:600;margin-right:6px}
.memory-receipt-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.memory-receipt-head button,.memory-subtle,.memory-toast button{border:0;background:transparent;color:#264d79;cursor:pointer;font:inherit;font-size:12px;padding:5px 8px;border-radius:5px}.memory-receipt-head button:hover,.memory-subtle:hover,.memory-toast button:hover{background:#edf2f7}
.memory-context{margin:10px 0 0;font-size:12px;color:var(--muted)}.memory-context summary{cursor:pointer}.memory-context .memory-item{font-size:13px;color:var(--text);padding:10px 0}.memory-context .memory-item footer{font-size:11px}
.memory-diff{margin:8px 0;color:var(--muted);font-size:12px;line-height:1.7}.memory-diff summary{cursor:pointer}.memory-diff p{margin:6px 0;white-space:pre-wrap}.memory-diff small{font-weight:600;margin-right:8px}
.memory-dialog input{width:100%;box-sizing:border-box;font:inherit;padding:9px;border:1px solid var(--line);border-radius:6px}.memory-dialog label{display:grid;gap:8px;margin-bottom:16px}
.memory-storage{font-size:12px;color:var(--muted);margin:12px 0}.memory-storage summary{cursor:pointer}.memory-empty{padding:32px 6px;line-height:1.8}.memory-empty strong{font-size:14px}.memory-empty p{font-size:13px;color:var(--muted)}
.memory-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:10000;display:flex;align-items:center;gap:16px;max-width:calc(100vw - 40px);padding:12px 18px;background:#fff;border:1px solid #dce2eb;box-shadow:0 8px 30px #20344c20;border-radius:10px;font-size:13px;color:#27364e}.memory-status{color:var(--muted)}
.memory-receipt button:focus-visible,.memory-context summary:focus-visible,.memory-subtle:focus-visible,.memory-toast button:focus-visible{outline:2px solid #79a7dc;outline-offset:2px}

.memory-labs{padding:24px;border:1px solid var(--line);border-radius:12px;margin-bottom:24px}.labs-description{padding-left:20px;line-height:1.9;font-size:14px}.redline-labs details{margin-top:16px}.redline-labs summary{cursor:pointer;font-size:13px;color:var(--muted)}.memory-labs>header .settings-check{flex-shrink:0}@media(max-width:600px){.memory-labs{padding:18px}.memory-labs>header{align-items:flex-start;flex-wrap:wrap}}
