/* Dialog rules follow the rendered content, never leak to other generic dialogs. */
#bigMask .big-modal:has(#projectMemoryPanel){width:1040px!important;max-width:calc(100vw - 40px)!important;max-height:calc(100dvh - 48px);border-radius:16px;box-shadow:0 24px 80px #1a23322b;overflow:hidden;display:flex;flex-direction:column;background:#fff}
#bigMask .big-modal:has(#projectMemoryPanel)>.modal-titlebar{padding:19px 30px 12px;border-bottom:1px solid #eef0f3;flex-shrink:0;background:#fff}
#bigMask .big-modal:has(#projectMemoryPanel)>.modal-titlebar h2{font:600 14px/1.5 var(--font-sans);color:#4d5b70}
#bigMask .big-modal:has(#projectMemoryPanel)>.mbody{padding:0!important;overflow:auto;min-height:0}
#projectMemoryPanel{--pm-ink:#202b3c;--pm-sub:#5c6879;--pm-line:#e6eaf0;color:var(--pm-ink);font:400 15px/1.7 var(--font-sans,"PingFang SC",sans-serif);text-align:left;container-type:inline-size}
#projectMemoryPanel *{box-sizing:border-box}
#projectMemoryPanel [hidden]{display:none!important}
#projectMemoryPanel svg{width:19px;height:19px;flex-shrink:0;vertical-align:middle}
#projectMemoryPanel p{margin:0}
#projectMemoryPanel button,#projectMemoryPanel summary{cursor:pointer;-webkit-tap-highlight-color:transparent}
#projectMemoryPanel button{font:500 13px/1.5 var(--font-sans);transition:background-color .15s,color .15s}
#projectMemoryPanel button:disabled{opacity:.5;cursor:wait}
#projectMemoryPanel :is(button,summary,input,textarea):focus-visible{outline:2px solid #245bdb;outline-offset:3px}
#projectMemoryPanel summary{list-style:none}
#projectMemoryPanel summary::-webkit-details-marker{display:none}
#projectMemoryPanel .pm-heading{display:flex;justify-content:space-between;gap:22px;padding:25px 30px 20px}
#projectMemoryPanel .pm-eyebrow{font-size:12px;color:var(--pm-sub);margin-bottom:6px}
#projectMemoryPanel .pm-heading h2{padding:0;border:0;text-align:left;font-size:24px;font-weight:600;line-height:1.45;letter-spacing:-.5px;margin:0 0 9px;overflow-wrap:anywhere;text-wrap:pretty}
#projectMemoryPanel .pm-description{font-size:14px;color:var(--pm-sub)}
#projectMemoryPanel .pm-icon-btn{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--pm-line);border-radius:7px;background:#fff;color:var(--pm-sub);flex-shrink:0}
#projectMemoryPanel .pm-icon-btn:hover{background:#f3f5f8;color:var(--pm-ink)}
#projectMemoryPanel .pm-summary{margin:0 30px 23px;padding:9px 13px;background:#f4f7fc;border-radius:7px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px;color:#425471}
#projectMemoryPanel .pm-summary>span{display:flex;align-items:center;gap:9px}
#projectMemoryPanel .pm-summary strong{font-weight:600;font-variant-numeric:tabular-nums}
#projectMemoryPanel .pm-layout{display:grid;grid-template-columns:minmax(0,1fr) 288px;gap:32px;padding:0 30px 25px}
#projectMemoryPanel .pm-main{min-width:0}
#projectMemoryPanel .pm-tabs{display:flex;border-bottom:1px solid var(--pm-line);gap:24px}
#projectMemoryPanel .pm-tabs button{border:0;border-bottom:2px solid transparent;background:none;padding:0 0 12px;color:var(--pm-sub);font-size:14px;white-space:nowrap;display:flex;gap:7px;align-items:center;margin-bottom:-1px}
#projectMemoryPanel .pm-tabs button[aria-selected=true]{color:#2455b5;border-bottom-color:#245bdb;font-weight:600}
#projectMemoryPanel .pm-tabs button:hover{color:#245bdb}
#projectMemoryPanel .pm-tabs span{background:#eef1f5;border-radius:4px;padding:0 5px;font-size:11px;line-height:18px;font-variant-numeric:tabular-nums}
#projectMemoryPanel .pm-tabs button[aria-selected=true] span{background:#edf2ff;color:#2455b5}
#projectMemoryPanel .pm-view{padding-top:18px}
#projectMemoryPanel .pm-section-intro{display:flex;gap:10px;justify-content:space-between;color:var(--pm-sub);font-size:12px;margin-bottom:14px}
#projectMemoryPanel .pm-welcome{padding:12px 0 23px}
#projectMemoryPanel .pm-welcome-icon{width:38px;height:38px;display:grid;place-items:center;background:#f0f4fc;color:#4069aa;border-radius:9px;margin-bottom:15px}
#projectMemoryPanel h3{font-size:19px;line-height:1.5;font-weight:600;margin:0 0 9px}
#projectMemoryPanel .pm-welcome>p{font-size:15px;line-height:1.85;color:var(--pm-sub);max-width:38em}
#projectMemoryPanel .pm-source-preview{background:#f8f9fb;border-left:3px solid #b6c8e4;padding:18px 20px;margin:0 0 20px}
#projectMemoryPanel .pm-preview-label{font-size:12px;color:#526681;margin-bottom:5px}
#projectMemoryPanel h4{font-size:15px;font-weight:600;line-height:1.7;margin:0 0 8px}
#projectMemoryPanel .pm-source-preview>p{font-size:14px;line-height:1.9;white-space:pre-line;color:#4e5b6d;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
#projectMemoryPanel .pm-source-preview button{padding-left:0;margin-top:9px}
#projectMemoryPanel .pm-side{border-left:1px solid var(--pm-line);padding-left:26px;min-width:0}
#projectMemoryComposer>summary{display:flex;align-items:center;gap:7px;font-size:15px;font-weight:600;padding-bottom:12px;border-bottom:1px solid var(--pm-line)}
#projectMemoryComposer>summary>span{margin-left:auto;font-weight:400;font-size:12px;color:var(--pm-sub)}
#projectMemoryPanel .pm-composer-body{padding-top:17px}
#projectMemoryPanel .pm-muted{font-size:13px;color:var(--pm-sub);line-height:1.8}
#projectMemoryPanel .pm-input-label{display:block;font-size:12px;color:var(--pm-sub);margin:18px 0 7px}
#projectMemoryInput{display:block;width:100%;min-height:145px;resize:vertical;border:1px solid #cdd5e1;background:#fff;border-radius:8px;padding:12px;font:400 14px/1.85 var(--font-sans);color:var(--pm-ink)}
#projectMemoryInput::placeholder{color:#697689}
#projectMemoryInput:focus{border-color:#245bdb}
#projectMemoryPanel .pm-composer-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
#projectMemoryPanel .pm-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:35px;padding:7px 12px;border:1px solid #d7dde7;border-radius:6px;background:#fff;color:#42516a;text-decoration:none}
#projectMemoryPanel .pm-btn:hover{background:#f1f4f9}
#projectMemoryPanel .pm-btn.pm-primary{background:#2b5fcb;color:#fff;border-color:#2b5fcb}
#projectMemoryPanel .pm-btn.pm-primary:hover{background:#204daa}
#projectMemoryPanel .pm-btn.pm-text{border-color:transparent;background:transparent;color:#345f9e;padding:5px 6px}
#projectMemoryPanel .pm-btn.pm-text:hover{background:#eaf0fb}
#projectMemoryPanel .pm-small{font-size:12px;color:var(--pm-sub);margin-top:13px}
#projectMemoryPanel .pm-select-sources{font-size:12px;margin-top:18px;color:var(--pm-sub)}
#projectMemoryPanel .pm-select-sources label{display:flex;gap:8px;align-items:flex-start;padding-top:9px}
#projectMemoryPanel input[type=checkbox]{accent-color:#2b5fcb;margin-top:5px;flex-shrink:0}
#projectMemoryPanel .pm-side-note{margin-top:25px;display:flex;gap:9px;font-size:12px;line-height:1.9;color:var(--pm-sub)}
#projectMemoryPanel .pm-side-note svg{margin-top:3px;width:16px;height:16px;color:#627694}
#projectMemoryPanel .pm-fact{display:grid;grid-template-columns:19px minmax(0,1fr);gap:10px;padding:20px 0;border-bottom:1px solid var(--pm-line)}
#projectMemoryPanel .pm-fact:first-of-type{padding-top:6px}
#projectMemoryPanel .pm-fact-mark{color:#3b6c65;padding-top:4px}
#projectMemoryPanel .pm-fact-text{font-size:16px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}
#projectMemoryPanel .pm-evidence{margin-top:12px;font-size:12px;color:var(--pm-sub)}
#projectMemoryPanel .pm-evidence>summary{display:flex;gap:6px;align-items:center;color:#526780}
#projectMemoryPanel .pm-evidence>summary::before,#projectMemoryPanel .pm-history>summary::before,#projectMemoryPanel .pm-select-sources>summary::before{content:'›';display:inline-block;transition:transform .15s;margin-right:5px}
#projectMemoryPanel .pm-evidence[open]>summary::before,#projectMemoryPanel .pm-history[open]>summary::before{transform:rotate(90deg)}
#projectMemoryPanel .pm-citation{padding:12px 0 2px}
#projectMemoryPanel blockquote{padding:10px 14px;margin:5px 0 0;background:#f5f7fa;border-left:2px solid #ced8e6;font-size:13px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;color:#44516a}
#projectMemoryPanel .pm-proposal{padding:22px 0;border-bottom:1px solid var(--pm-line)}
#projectMemoryPanel .pm-proposal:first-of-type{padding-top:5px}
#projectMemoryPanel .pm-proposal-label{display:inline-block;padding:2px 7px;background:#f7f0e5;color:#855819;font-size:12px;font-weight:500;border-radius:4px;margin-bottom:12px}
#projectMemoryPanel .pm-reason{font-size:13px;color:var(--pm-sub);margin-top:10px}
#projectMemoryPanel .pm-before{margin-bottom:15px;padding:12px 15px;background:#f4f5f7;border-left:2px solid #c4cbd5;color:#616b7a;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
#projectMemoryPanel .pm-before>span,#projectMemoryPanel .pm-new-label{display:block;font-size:12px;color:var(--pm-sub);margin-bottom:5px}
#projectMemoryPanel .pm-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:19px}
#projectMemoryPanel .pm-review-prompt{display:flex;width:100%;justify-content:space-between;align-items:center;padding:13px 16px;border:1px solid #d7e1f1;background:#f3f6fc;border-radius:7px;color:#345a93;text-align:left;margin:18px 0}
#projectMemoryPanel .pm-review-prompt strong{font-weight:600;font-size:14px}
#projectMemoryPanel .pm-review-prompt small{display:block;font-size:12px;margin-top:4px;color:var(--pm-sub)}
#projectMemoryPanel .pm-asset{border-bottom:1px solid var(--pm-line)}
#projectMemoryPanel .pm-asset>summary{display:flex;align-items:center;gap:12px;padding:17px 0}
#projectMemoryPanel .pm-asset>summary>svg{color:#69819e}
#projectMemoryPanel .pm-asset-title{font-size:15px;font-weight:500;line-height:1.6;min-width:0;flex:1;overflow-wrap:anywhere}
#projectMemoryPanel .pm-asset-title>small{display:block;font-size:12px;font-weight:400;color:var(--pm-sub);margin-top:4px}
#projectMemoryPanel .pm-asset-state{font-size:11px;color:#58677c;white-space:nowrap}
#projectMemoryPanel .pm-asset>summary::after{content:'+';color:#64758d}
#projectMemoryPanel .pm-asset[open]>summary::after{content:'−'}
#projectMemoryPanel .pm-asset-body{padding:0 0 17px}
#projectMemoryPanel .pm-asset-body pre{font:400 14px/1.9 var(--font-reading,var(--font-sans));white-space:pre-wrap;overflow-wrap:anywhere;max-height:450px;overflow:auto;background:#f7f8fa;padding:16px;margin:10px 0 0;color:#344259}
#projectMemoryPanel .pm-history{font-size:13px;color:var(--pm-sub);margin-top:24px}
#projectMemoryPanel .pm-history>summary{padding:10px 0}
#projectMemoryPanel .pm-history-item{padding:14px 0;border-top:1px solid var(--pm-line);font-size:13px;overflow-wrap:anywhere}
#projectMemoryPanel .pm-status-label{font-size:11px;color:#5a6c85}
#projectMemoryPanel .pm-history-item p{margin:5px 0}
#projectMemoryPanel .pm-empty{padding:40px 12px;text-align:center;color:var(--pm-sub)}
#projectMemoryPanel .pm-empty>svg{width:32px;height:32px;color:#6a8a83;margin-bottom:16px}
#projectMemoryPanel .pm-empty h3{font-size:16px;color:var(--pm-ink)}
#projectMemoryPanel .pm-empty p{font-size:14px}
#projectMemoryPanel .pm-footer{padding:13px 30px;border-top:1px solid var(--pm-line);background:#fafbfd}
#projectMemoryPanel .pm-status{font-size:12px;line-height:1.75;color:var(--pm-sub);overflow-wrap:anywhere;white-space:pre-wrap}
#projectMemoryPanel .pm-status[data-state=working]::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#2b5fcb;box-shadow:0 0 0 3px #e2eafb;margin:0 9px 1px 3px}
#projectMemoryPanel .pm-status[data-state=error]{color:#9d362e}
#projectMemoryPanel.pm-loading{padding:38px 30px;min-height:320px}
#projectMemoryPanel.pm-loading p{color:#5c6879;font-size:14px;margin-bottom:22px}
#projectMemoryPanel.pm-loading>div{height:14px;max-width:80%;margin-top:14px;background:#eef1f6;border-radius:3px}
#projectMemoryPanel.pm-loading>div:nth-last-child(2){max-width:65%}
@container(max-width:779px){#projectMemoryPanel .pm-layout{grid-template-columns:minmax(0,1fr);gap:22px}#projectMemoryPanel .pm-side{border-left:0;border-top:1px solid var(--pm-line);padding:18px 0 0}#projectMemoryComposer>summary{border:0;padding:0}#projectMemoryComposer>summary::after{content:'+';font-size:18px;font-weight:400;margin-left:5px}#projectMemoryComposer[open]>summary::after{content:'−'}#projectMemoryPanel .pm-side-note{display:none}#projectMemoryPanel .pm-composer-body{padding-top:12px}#projectMemoryPanel .pm-source-preview>p{-webkit-line-clamp:4}}
@media(max-width:620px){#bigMask .big-modal:has(#projectMemoryPanel){max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 28px);border-radius:12px}#bigMask .big-modal:has(#projectMemoryPanel)>.modal-titlebar{padding:16px 22px 11px}#projectMemoryPanel .pm-heading{padding:21px 22px 18px;gap:12px}#projectMemoryPanel .pm-heading h2{font-size:21px;letter-spacing:0}#projectMemoryPanel .pm-layout{padding:0 22px 20px}#projectMemoryPanel .pm-summary{margin:0 22px 20px;padding:7px 10px}#projectMemoryPanel .pm-summary>.pm-btn{font-size:12px;white-space:nowrap}#projectMemoryPanel .pm-footer{padding:12px 22px}#projectMemoryPanel .pm-tabs{gap:20px}#projectMemoryPanel .pm-welcome{padding-top:4px}#projectMemoryPanel .pm-source-preview{padding:15px 17px}}
@media(max-width:390px){#projectMemoryPanel .pm-tabs{gap:12px}#projectMemoryPanel .pm-tabs button{font-size:13px;gap:4px}#projectMemoryPanel .pm-summary{align-items:flex-start}#projectMemoryPanel .pm-summary>span>svg{display:none}#projectMemoryPanel .pm-asset-state{display:none}}
@media(prefers-reduced-motion:reduce){#projectMemoryPanel *{transition:none!important}}

#projectMemoryPanel .pm-memory-kind{display:block;color:#666a66;font-size:12px;line-height:1.5;margin:9px 0 2px}
/* Reading hierarchy uses the existing neutral workspace and Chinese typeface. */
.pm-profile-actions,.pm-heading-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#projectMemoryPanel .pm-topic-group{margin:8px 0 32px}
#projectMemoryPanel .pm-topic-group>header{padding:12px 0 14px;border-bottom:1px solid var(--pm-line)}
#projectMemoryPanel .pm-topic-group h3{display:flex;align-items:center;gap:10px;margin:0 0 3px;font-size:17px;font-weight:600;line-height:1.6}
#projectMemoryPanel .pm-topic-group h3 span{font-size:12px;font-weight:400;color:var(--pm-sub)}
#projectMemoryPanel .pm-topic-group>header p{font-size:12px;color:var(--pm-sub)}
#projectMemoryPanel .pm-memory-meta{display:flex;gap:6px 14px;flex-wrap:wrap;margin-top:9px;font-size:12px;color:var(--pm-sub)}
#projectMemoryPanel .pm-memory-meta span+span{position:relative}
#projectMemoryPanel .pm-memory-meta span+span:before{content:'·';position:absolute;left:-9px}
#projectMemoryPanel .cm-layout{display:grid;grid-template-columns:178px minmax(0,1fr);gap:34px;padding:0 30px 30px}
#projectMemoryPanel .cm-domains{display:flex;flex-direction:column;gap:4px;align-self:start;position:sticky;top:0;padding-top:7px}
#projectMemoryPanel .cm-domains button{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 14px;border:0;border-radius:6px;background:transparent;text-align:left;color:#586374;font-size:14px}
#projectMemoryPanel .cm-domains button[aria-current=page]{background:#eef2f7;color:#203d67;font-weight:600}
#projectMemoryPanel .cm-domains button:hover{background:#f2f4f7}
#projectMemoryPanel .cm-domains small{font-size:11px;font-variant-numeric:tabular-nums;font-weight:400}
#projectMemoryPanel .cm-domains>p{margin:25px 14px 0;font-size:12px;line-height:1.8;color:#7d8591}
#projectMemoryPanel .cm-content{min-width:0;max-width:710px}
#projectMemoryPanel .cm-section-head{padding-top:8px;margin-bottom:18px}
#projectMemoryPanel .cm-section-head h2{font-size:22px;font-weight:600;line-height:1.5;margin:0 0 6px}
#projectMemoryPanel .cm-section-head p{font-size:14px;color:var(--pm-sub)}
#projectMemoryPanel .cm-boundary{padding:12px 15px;border-left:2px solid #b4bdca;background:#f6f7f9;color:#667182;font-size:12px;line-height:1.85;margin-bottom:25px}
#projectMemoryPanel .cm-group{margin-bottom:32px}
#projectMemoryPanel .cm-group>header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:7px 0 12px;border-bottom:1px solid var(--pm-line)}
#projectMemoryPanel .cm-group h3{font-size:16px;font-weight:600;margin:0}
#projectMemoryPanel .cm-group>header>span{font-size:12px;color:var(--pm-sub)}
#projectMemoryPanel .cm-memory-item{padding:17px 0 19px;border-bottom:1px solid #eef0f3}
#projectMemoryPanel .cm-memory-item>summary{display:flex;justify-content:space-between;gap:18px;align-items:start}
#projectMemoryPanel .cm-item-heading{min-width:0}
#projectMemoryPanel .cm-item-heading strong{display:block;font-size:15px;line-height:1.75;font-weight:500;overflow-wrap:anywhere}
#projectMemoryPanel .cm-item-heading small{display:block;color:#7b8593;font-size:11px;margin-top:3px}
#projectMemoryPanel .cm-expand{font-size:20px;font-weight:300;color:#8894a6;line-height:1.5}
#projectMemoryPanel .cm-memory-item[open] .cm-expand{transform:rotate(45deg)}
#projectMemoryPanel .cm-preview{font-size:14px;line-height:1.9;color:#586577;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:12px}
#projectMemoryPanel .cm-source-content{margin-top:16px;padding:14px 17px;background:#f6f7f9;border-radius:5px}
#projectMemoryPanel .cm-source-content pre{margin:12px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font:400 14px/1.95 var(--font-sans,"PingFang SC",sans-serif);color:#344256}
#projectMemoryPanel .cm-more{margin-top:12px}
#projectMemoryPanel .cm-empty{padding:44px 16px;text-align:center;color:var(--pm-sub)}
#projectMemoryPanel .cm-empty svg{width:26px;height:26px;margin-bottom:12px}
#projectMemoryPanel .cm-empty h3{font-size:17px;color:var(--pm-ink);font-weight:500}
#projectMemoryPanel .cm-empty p{font-size:14px;max-width:340px;margin:auto;line-height:1.9}
@container (max-width:700px){#projectMemoryPanel .cm-layout{grid-template-columns:1fr;gap:20px;padding:0 20px 24px}#projectMemoryPanel .cm-domains{display:flex;flex-direction:row;overflow-x:auto;position:static;gap:5px;padding-bottom:7px}#projectMemoryPanel .cm-domains button{flex:0 0 auto;padding:9px 11px;gap:9px}#projectMemoryPanel .cm-domains>p{display:none}#projectMemoryPanel .cm-content{max-width:none}#projectMemoryPanel .pm-heading-actions{gap:5px}#projectMemoryPanel .cm-boundary{font-size:12px}}
@media (prefers-reduced-motion:reduce){#projectMemoryPanel *{scroll-behavior:auto!important;transition:none!important}}

#projectMemoryPanel .cm-preview{display:block;max-width:54em;font-size:15px;line-height:1.8;color:#455161;margin:8px 0 0;white-space:pre-line;overflow-wrap:anywhere}
#projectMemoryPanel .cm-preview[hidden]{display:none}
