:root{--fg:#1a1a1a;--bg:#fff;--muted:#666;--card:#f7f7f8;--accent:#2f6df6;--left-w:320px;--nav-h:48px}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;color:var(--fg);background:var(--bg);font-size:16px;line-height:1.6}.app-shell{display:flex;height:100vh;overflow:hidden}.left-panel{width:var(--left-w);min-width:var(--left-w);border-right:1px solid #e2e8f0;display:flex;flex-direction:column;background:#fafbfc}.left-header{display:flex;align-items:baseline;gap:.35rem;padding:.75rem 1rem;border-bottom:1px solid #e2e8f0}.left-header .logo{font-weight:700;color:var(--accent);text-decoration:none;font-size:1.1rem}.left-header .logo-sub{font-size:.75rem;color:var(--muted)}.left-legend{display:flex;flex-wrap:wrap;gap:.4rem .7rem;padding:.45rem 1rem;font-size:.7rem;color:var(--muted);border-bottom:1px solid #e2e8f0}.legend-item{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:2px;vertical-align:middle}.dot-source{background:#4a5568}.dot-expert{background:#2b6cb0}.dot-domain{background:#38a169}.dot-tg{background:#d69e2e}.dot-topic{background:#805ad5}.dot-lecture{background:#e53e3e}.left-graph{flex:1 1;position:relative;overflow:hidden}.graph-wrap{position:relative}.graph-canvas,.graph-wrap{width:100%;height:100%}.graph-loading{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:.85rem}.graph-err{padding:1rem;color:#a33;font-size:.8rem}.right-panel{flex:1 1;display:flex;flex-direction:column;overflow:hidden}.right-nav{display:flex;gap:.25rem;padding:0 1rem;height:var(--nav-h);align-items:center;border-bottom:1px solid #e2e8f0;background:#fff;flex-shrink:0}.right-nav a{text-decoration:none;color:var(--muted);padding:.35rem .7rem;border-radius:6px;font-size:.9rem;transition:background .15s,color .15s}.right-nav a:hover{color:var(--fg);background:var(--card)}.right-content{flex:1 1;overflow-y:auto;padding:0}.container{max-width:720px;margin:0 auto;padding:1rem}.cards{display:grid;grid-template-columns:repeat(4,1fr);grid-gap:.75rem;gap:.75rem}.card{background:var(--card);border-radius:12px;padding:.75rem}.card .label{font-size:.8rem;color:var(--muted)}.card .value{font-size:1.25rem;font-weight:600}.card .delta{font-size:.75rem;color:var(--muted)}.tip{margin-top:1rem;padding:.75rem 1rem;background:#eef4ff;border-radius:12px;color:#1f3a6b}.tip.err{background:#fdecec;color:#a33}.row{display:flex;align-items:center;gap:.75rem}.row.between{justify-content:space-between}.btn{border:1px solid var(--accent);background:var(--accent);color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.9rem;cursor:pointer}.btn:disabled{opacity:.5;cursor:not-allowed}.unit{font-size:.7rem;margin-left:.2rem}.muted,.unit{color:var(--muted)}.muted{font-size:.85rem}.day h3{margin:1rem 0 .25rem;color:var(--muted);font-size:.9rem}.rec{list-style:none;padding:0;margin:0}.rec li{display:flex;gap:.75rem;padding:.4rem 0;border-bottom:1px solid #f0f0f0;font-size:.92rem}.rec .m{width:5rem;color:var(--muted)}.rec .v{font-weight:600}.rec .src{margin-left:auto}.rec .src,.rec .t{font-size:.75rem;color:#9aa}.chat{display:flex;flex-direction:column;min-height:80vh}.msg-list{flex:1 1}.msg,.msg-list{margin:.75rem 0}.msg{display:flex;gap:.5rem}.msg.user{flex-direction:row-reverse}.msg .role{width:1.75rem;height:1.75rem;border-radius:50%;background:var(--card);display:grid;place-items:center;font-size:.75rem;color:var(--muted);flex-shrink:0}.msg .bubble{background:var(--card);border-radius:12px;padding:.6rem .85rem;max-width:80%;white-space:pre-wrap}.msg.user .bubble{background:#e7f0ff}.advice-card{margin-top:.5rem;padding:.5rem .75rem;border-left:3px solid var(--accent);background:#fff;border-radius:6px;font-size:.85rem}.advice-card.kind-care_nav{border-left-color:#d33;background:#fff5f5}.advice-card.kind-refusal{border-left-color:#d97706;background:#fffbf0}.advice-card .kind{display:inline-block;font-size:.7rem;color:var(--muted);margin-bottom:.25rem}.advice-card ul{margin:.25rem 0;padding-left:1.1rem}.careref{margin-top:.35rem;font-size:.82rem}.careref em{color:var(--muted)}.composer{display:flex;gap:.5rem;margin-top:auto}.composer input{flex:1 1;padding:.6rem .8rem;border:1px solid #ddd;border-radius:8px;font-size:.95rem}