.memory-items{display:grid;gap:16px;margin-top:20px;max-width:900px}
.memory-row{border-top:1px solid var(--line,#e5e9e6);padding:16px 0;min-width:0;overflow-wrap:anywhere}
.memory-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted,#677871)}
.memory-value{white-space:pre-wrap;margin:12px 0;font-size:16px;line-height:1.6}
.memory-row details{margin-top:12px;font-size:13px;color:var(--muted,#677871)}
.memory-row summary{cursor:pointer}
.memory-project{border:1px solid #e0e5ed;border-radius:10px;background:#fff;overflow:hidden;margin-bottom:8px}
.memory-project>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;list-style:none}
.memory-project>summary::-webkit-details-marker{display:none}
.memory-project>summary>span:first-child{min-width:0;display:grid;gap:4px;overflow-wrap:anywhere}
.memory-project>summary small,.memory-project-count{font-size:11px;color:#52617a}
.memory-project-count{display:flex;align-items:center;gap:8px;white-space:nowrap}
.memory-project-count::after{content:'⌄';font-size:14px}
.memory-project[open] .memory-project-count::after{transform:rotate(180deg)}
.memory-project>div{padding:4px 13px 12px}
.memory-row details p{white-space:pre-wrap}
@media(max-width:600px){.memory-meta{display:grid}}

/* Assistant preferences: compact rows, with memory management in a modal. */
.settings-page{max-width:980px;margin:4px auto 0;display:grid;gap:22px}
.settings-page>header{margin:0 0 7px}.settings-page>header h1{margin:0 0 9px;font-size:28px;line-height:1.3;font-weight:650;letter-spacing:-.5px}
.settings-page>header p{margin:0;color:var(--muted);font-size:14px}
.preferences-group{border:1px solid var(--line,#e7e7e7);border-radius:16px;background:#fff;overflow:hidden}
.preference-row{display:flex;align-items:center;gap:16px;padding:23px 25px;min-width:0}
.preference-row+.preference-row{border-top:1px solid var(--line,#e7e7e7)}
.preference-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;flex-shrink:0;font-size:20px;background:#f1f3f5;color:#56616e}
.preference-icon svg{width:23px;height:23px}.memory-icon{background:#eaf5f0;color:#248067}.notification-icon{background:#ecf3fc;color:#3276b8}.assistant-icon{background:#edf5f2;color:#237d64}
.preference-copy{flex:1;min-width:0}.preference-copy h2{margin:0 0 6px;font-size:16px;font-weight:600;line-height:1.4}
.preference-copy p{margin:0;line-height:1.6;font-size:13px;color:var(--muted)}
.preference-note{display:block;margin-top:6px;font-size:12px;color:#858585}.preference-platform{font-size:12px;color:#717171;background:#f5f5f5;padding:5px 9px;border-radius:6px;white-space:nowrap}
.preference-controls{display:flex;align-items:center;gap:14px;flex-shrink:0}.preference-controls button,.memory-manage-button{font-size:13px;padding:8px 13px;border-radius:9px;white-space:nowrap;min-height:36px}
.preference-link{font-size:13px;text-decoration:none;white-space:nowrap;padding:8px}.preference-link span{color:#858585;margin-left:12px}
.memory-manage-button span{margin-left:7px;color:#818181}
.memory-auto-row{border-top:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 25px 20px 81px}
.memory-auto-row strong{font-size:14px;font-weight:500}.memory-auto-row p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:1.6}
.memory-switch{position:relative;display:block;flex:0 0 42px;width:42px;height:25px;min-height:0!important;padding:0!important;border:0!important;border-radius:99px;background:#b9bfc5!important}
.memory-switch span{position:absolute;left:3px;top:3px;width:19px;height:19px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:transform .2s}
.memory-switch[aria-checked=true]{background:#26816c!important}.memory-switch[aria-checked=true] span{transform:translateX(17px)}
.memory-setting-buttons,.memory-heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.memory-inline-error{font-size:13px;color:#a33333;margin:0;padding:12px 25px}
.settings-page .settings-runtime-error{margin:0;padding:0 25px 20px;color:#ab3535;font-size:13px}
.settings-page .settings-footnote{font-size:12px;color:#858585;margin:0 4px;line-height:1.8}

.memory-manager-dialog{box-sizing:border-box;width:min(880px,calc(100vw - 64px));height:min(640px,calc(100dvh - 72px));max-width:none;max-height:none;padding:0;border:1px solid #e8e8e8;border-radius:20px;background:#fff;color:#252525;box-shadow:0 24px 100px #0003;overflow:hidden}
.memory-manager-dialog[open]{display:flex;flex-direction:column}.memory-manager-dialog::backdrop{background:#18181855;backdrop-filter:blur(2px)}
.memory-manager-header{padding:22px 26px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ebebeb;flex-shrink:0}
.memory-manager-header h2{font-size:20px;font-weight:600;line-height:1.4;margin:0}
.memory-manager-dialog .memory-close{border:0;background:transparent;width:34px;height:34px;min-height:0;padding:0;border-radius:9px;font-size:26px;color:#727272}
.memory-tabs{display:flex;gap:4px;flex-wrap:wrap;padding:8px 22px;border-bottom:1px solid #ebebeb;flex-shrink:0}
.memory-manager-dialog .memory-tabs button{padding:7px 12px;border:0;border-radius:8px;font-size:13px;min-height:34px;color:#59635e;background:transparent}
.memory-manager-dialog .memory-tabs button[aria-pressed=true],.memory-heading-actions button[aria-pressed=true]{background:#ecf4ef;color:#215f4b}
.memory-manager-layout{display:flex;flex:1;min-height:0}
.memory-content{display:flex;flex-direction:column;min-width:0;min-height:0;width:100%}
.memory-library-heading{padding:20px 24px 12px}.memory-library-heading h3{margin:0;font-size:16px;font-weight:600}.memory-library-heading p{margin:5px 0 0;font-size:12px;color:#68736e}
.memory-manager-dialog[data-tab=chat] .memory-content,.memory-manager-dialog:not([data-tab=chat]) .memory-agent{display:none}
.memory-manager-dialog:is([data-tab=progress],[data-tab=briefings],[data-tab=settings]) :is(.memory-search,#memory-library-list),
.memory-manager-dialog:is([data-tab=recent],[data-tab=long],[data-tab=factors]) #memory-work-panel{display:none}
.memory-search{display:flex;gap:9px;align-items:center;margin:0 24px 10px;border:1px solid #e8e8e8;border-radius:9px;padding:0 11px;color:#929292}
.memory-search:focus-within{border-color:#a2b5ae}.memory-manager-dialog .memory-search input{width:100%;min-width:0;height:36px;margin:0;padding:7px 0;border:0;background:transparent;font:inherit;font-size:13px;outline:0;box-shadow:none}
#memory-library-list,#memory-work-panel{padding:0 24px 16px;overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}
.memory-manager-dialog .memory-items{margin:0;gap:0}.memory-manager-dialog .memory-row{padding:18px 0;border-color:#efefef}.memory-manager-dialog .memory-row:first-child{border:0}
.memory-manager-dialog .memory-meta{display:block;font-size:11px;color:#888}.memory-manager-dialog .memory-meta>span+span{display:block;margin-top:4px}
.memory-manager-dialog .memory-value{font-size:14px;line-height:1.8;margin:9px 0 12px}.memory-manager-dialog .memory-retention{margin:0}
.memory-manager-dialog .memory-row details{font-size:11px;margin-top:11px}.memory-manager-dialog .memory-row .micro{font-size:10px;color:#969696}
.memory-progress-note{font-size:13px;color:#59635e;margin:6px 0 14px}
.memory-lanes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(205px,100%),1fr));gap:12px}
.memory-lane{border:1px solid #e5eae7;border-radius:12px;padding:15px;background:#fafcfb}
.memory-lane>div,.memory-lane dl{display:flex;justify-content:space-between;align-items:center;gap:9px}
.memory-lane h4{font-size:14px;margin:0}.memory-lane dt,.memory-lane p{font-size:11px;color:#626e68}.memory-lane dd{margin:4px 0 0;font-size:20px;font-weight:550}
.memory-lane p{margin:0;line-height:1.6}.memory-job-status{font-size:11px;color:#52625a}.memory-job-status[data-running=true]{color:#177053;font-weight:600}
.memory-briefings{display:grid;gap:10px}.memory-briefings a{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #e5eae7;border-radius:10px;padding:12px 15px;text-decoration:none;font-size:13px}.memory-briefings small{display:block;color:#626e68;margin-top:4px}
#memory-sleep-form{max-width:590px}.memory-time-fields,.memory-save-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.memory-time-fields label{display:grid;gap:5px;font-size:13px}.memory-time-fields input{width:135px}
#memory-sleep-form p{font-size:13px;color:#626e68;line-height:1.7}.memory-save-row{margin:16px 0 0}#memory-sleep-status{font-size:13px;color:#4c6055}
.memory-library-empty{padding:55px 8px;text-align:center;color:#939393}.memory-library-empty>span{font-size:32px;color:#adc2b9}.memory-library-empty h3{font-size:14px;color:#5f6b65;font-weight:500;margin:17px 0 8px}.memory-library-empty p{font-size:12px;line-height:1.8;margin:0}
.memory-agent{display:flex;flex-direction:column;width:100%;min-width:0;min-height:0;background:#fcfcfc}
#memory-agent-log{padding:10px 24px 20px;overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}
.memory-agent-welcome{min-height:270px;height:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:30px 0}
.memory-welcome-icon{display:grid;place-items:center;width:45px;height:45px;background:#eaf4ef;color:#478b73;border-radius:14px}.memory-welcome-icon svg{width:26px;height:26px}
.memory-agent-welcome h3{font-size:19px;font-weight:550;margin:20px 0 10px}.memory-agent-welcome>p{font-size:12px;line-height:1.9;color:#858585;max-width:290px;margin:0}
.memory-prompts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:23px}.memory-manager-dialog .memory-prompts button{font-size:11px;padding:7px 10px;border-radius:8px;background:#fff;color:#717171;min-height:32px}
.memory-message{font-size:13px;line-height:1.85;margin:12px 0 24px;overflow-wrap:anywhere}.memory-message-label{display:block;font-size:10px;color:#8a8a8a;margin-bottom:7px}.memory-message-text{white-space:pre-wrap}
.memory-message.from-user{margin-left:auto;max-width:85%;width:fit-content;padding:10px 15px;background:#eceeee;border-radius:14px 14px 3px 14px}.memory-message.from-user .memory-message-label{display:none}
.memory-agent-wait{font-size:12px;color:#8b8b8b;display:flex;gap:8px;align-items:center;margin:12px 0}.memory-agent-wait>span{width:6px;height:6px;border-radius:50%;background:#7c9a8c;animation:memory-pulse 1.6s ease-in-out infinite}
.memory-proposal{margin-top:13px;border:1px solid #e5e7e5;border-radius:11px;background:#fff;padding:13px 15px;font-size:12px;line-height:1.8}.memory-proposal>strong{font-size:11px;font-weight:500;color:#7a7a7a}.memory-proposal p{margin:8px 0;white-space:pre-wrap}.memory-proposal-before{color:#858585}.memory-proposal-value{font-weight:500}.memory-proposal>div{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:13px}.memory-proposal>div>span{font-size:10px;color:#959595}.memory-manager-dialog .memory-proposal .primary{font-size:11px;min-height:28px;padding:5px 10px;border-radius:7px}.memory-proposal-done{font-size:11px;color:#287a60;margin-top:9px}
#memory-agent-form{padding:10px 24px 17px;margin:0;flex-shrink:0}.memory-agent-composer{display:flex;gap:10px;align-items:flex-end;border:1px solid #dedede;background:#fff;border-radius:14px;padding:10px 11px 10px 15px}.memory-agent-composer:focus-within{border-color:#96b2a7;box-shadow:0 0 0 2px #dcebe580}
.memory-manager-dialog #memory-agent-input{font:inherit;font-size:13px;line-height:1.7;box-sizing:border-box;width:100%;min-height:45px;max-height:130px;height:auto;resize:vertical;padding:3px 0;margin:0;border:0;background:transparent;outline:0;box-shadow:none}
.memory-manager-dialog #memory-agent-send{padding:0;border:0;min-height:30px;width:30px;height:30px;flex:0 0 30px;border-radius:50%;background:#2e3d36;color:#fff;font-size:20px}.memory-manager-dialog #memory-agent-send:disabled{background:#e4e8e6;color:#a1a8a4;opacity:1}
#memory-agent-hint{font-size:10px;text-align:center;color:#717171;margin:9px 0 0;line-height:1.6}
@keyframes memory-pulse{50%{opacity:.25}}
@media(prefers-reduced-motion:reduce){.memory-switch span{transition:none}.memory-agent-wait>span{animation:none}}
@media(max-width:700px){
 .settings-page{gap:16px}.settings-page>header h1{font-size:24px}.preference-row{padding:19px 17px;gap:12px;flex-wrap:wrap}.preference-copy{flex-basis:calc(100% - 60px)}.preference-row>button,.preference-row>.preference-controls,.preference-row>.preference-platform,.preference-row>.preference-link{margin-left:52px}.preference-controls{flex-wrap:wrap}.memory-auto-row{padding:18px 17px;flex-wrap:wrap}.preference-copy p{font-size:12px}
 .memory-manager-dialog{width:calc(100vw - 20px);height:calc(100dvh - 28px);border-radius:16px}.memory-manager-header{padding:13px 16px}.memory-manager-header h2{font-size:18px}
 .memory-tabs{padding:6px 12px}.memory-manager-dialog .memory-tabs button{padding:6px 9px;font-size:12px}
 .memory-library-heading{padding:16px 16px 10px}.memory-search{margin:0 16px 8px}#memory-library-list,#memory-work-panel{padding:0 16px 12px}#memory-agent-log{padding:10px 19px 16px}#memory-agent-form{padding:9px 16px 16px}.memory-agent-welcome{min-height:200px}
}
