.memory-tool{border:2px solid #4163c9;border-radius:16px;padding:clamp(18px,3vw,30px);background:#f2f6ff;color:#152336}
.memory-tool p{max-width:76ch}.memory-tool label{display:block;font-weight:700;margin:18px 0 7px}
.memory-tool fieldset{border:0;padding:0;margin:0;min-width:0}.memory-tool legend{font-weight:700}
.memory-tool textarea,.memory-tool select{font:inherit;width:100%;border:1px solid #687c9a;border-radius:7px;background:#fff;color:#152336;padding:12px;min-height:46px}
.memory-tool textarea{min-height:140px;resize:vertical}.memory-tool-row{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.memory-tool-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
.memory-tool button{font:inherit;font-weight:700;border:1px solid #314eac;border-radius:8px;background:#314eac;color:white;padding:12px 18px;cursor:pointer;min-height:46px}
.memory-tool button.secondary{background:#fff;color:#253b82}.memory-tool [hidden]{display:none!important}
.memory-tool :focus-visible{outline:3px solid #8b5000;outline-offset:4px}.memory-tool-output{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font:15px/1.6 ui-monospace,Consolas,monospace;background:#fff;color:#152336;border:1px solid #687c9a;border-radius:8px;padding:20px;margin-top:20px}
.memory-tool-status{min-height:1.6em;font-weight:600}.memory-quick-answer{border-left:4px solid #4163c9;padding:5px 0 5px 20px}
@media(max-width:600px){.memory-tool-row{grid-template-columns:1fr;gap:0}.memory-tool-actions button{width:100%}.memory-tool-output{padding:12px}}
@media(prefers-color-scheme:dark){.memory-tool{background:#142032;color:#e9efff}.memory-tool textarea,.memory-tool select,.memory-tool-output{background:#0c1422;color:#e9efff}.memory-tool button.secondary{background:#e9efff;color:#253b82}.memory-tool :focus-visible{outline-color:#ffcf70}}
