/* ---------- раздел «Проекты» (2.4) */
.pj { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.pj .grow { flex: 1; }
.pj .faint, .pj-drawer .faint { color: var(--faint); }
.pj kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); }
.nav-btn .count.pj-soft { background: var(--border-strong); color: var(--text); }
.nav-btn .count.pj-red { background: var(--danger); color: #fff; }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 7px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.avatar.pj-av { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.pj-av.xs { width: 20px; height: 20px; font-size: 8.5px; }
.avatar.pj-bot svg { width: 60%; height: 60%; stroke: #fff; }
.avatar.pj-nobody { background: transparent; border: 1.5px dashed var(--border-strong); color: var(--faint); }
.pj-num { font-family: var(--mono); font-size: 11.5px; color: var(--faint); flex: none; }
button.pj-num.big { font-size: 13px; padding: 2px 8px; border-radius: 7px; background: var(--hover); color: var(--muted); }
button.pj-num.big:hover { color: var(--text); }
.pj-ref { text-decoration: none; font-weight: 500; }
.pj-ref:hover { text-decoration: underline; }
.pj-ref.del { text-decoration: line-through; opacity: .7; }
.pj-h2 { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 19px; margin: 22px 0 10px; }
.pj-h2 svg { color: var(--accent); }
.pj-h2 .btn { margin-left: auto; font-family: var(--sans); }
.pj-prog { height: 6px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.pj-prog i { display: block; height: 100%; background: var(--pc, var(--ok)); border-radius: 4px; transition: width .3s; }
.pj-prog.sm { height: 4px; width: 90px; display: inline-block; vertical-align: middle; }
.pj-check .pj-prog.sm { width: 100%; display: block; margin: 2px 0 8px; }
.pj-check .pj-prog i { background: var(--ok); }

/* статусы, сроки, приоритеты */
.pj-st { font-size: 11.5px; padding: 1px 8px; border-radius: 20px; white-space: nowrap; background: var(--hover); color: var(--muted); flex: none; }
.pj-st.st-work, .pj-to.st-work { background: color-mix(in srgb, #4f86c6 18%, transparent); color: #4f86c6; }
.pj-st.st-review, .pj-to.st-review { background: color-mix(in srgb, #d9a21b 20%, transparent); color: #b8860b; }
.pj-st.st-done, .pj-to.st-done { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pj-st.st-cancel { text-decoration: line-through; }
.pj-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.pj-dot.st-work { background: #4f86c6; } .pj-dot.st-review { background: #d9a21b; } .pj-dot.st-done { background: var(--ok); }
.pj-due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; padding: 1px 7px; border-radius: 20px; background: var(--hover); }
.pj-due svg { width: 12px; height: 12px; }
.pj-due.soon { color: #b8860b; background: color-mix(in srgb, #d9a21b 16%, transparent); }
.pj-due.today { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 600; }
.pj-due.over { color: #fff; background: var(--danger); font-weight: 600; }
.pj-due.past { opacity: .6; }
.pj-prio { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pj-prio svg { width: 12px; height: 12px; }
.pj-prio.high { color: #d97706; } .pj-prio.urgent { color: var(--danger); font-weight: 600; } .pj-prio.low { color: var(--faint); }
.pj-tag { font-size: 11.5px; color: var(--muted); background: var(--hover); border-radius: 6px; padding: 0 6px; cursor: pointer; white-space: nowrap; margin-left: 4px; }
.pj-tag:hover { color: var(--text); }
.pj-tag.big { font-size: 12.5px; padding: 2px 4px 2px 8px; display: inline-flex; align-items: center; gap: 2px; margin: 0; cursor: default; }
.pj-tag.big button { width: 18px; height: 18px; border-radius: 5px; color: var(--faint); }
.pj-tag.big button:hover { color: var(--danger); }
.pj-meta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--faint); }
.pj-meta svg { width: 13px; height: 13px; }
.pj-meta.ok { color: var(--ok); }
.pj-meta .spinner { width: 11px; height: 11px; }

/* сегментированные кнопки */
.pj-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 9px; background: var(--hover); }
.pj-sbtn { padding: 3px 10px; border-radius: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.pj-sbtn:hover { color: var(--text); }
.pj-sbtn.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.1); font-weight: 500; }
.pj-sbtn.on.st-work { color: #4f86c6; } .pj-sbtn.on.st-review { color: #b8860b; } .pj-sbtn.on.st-done { color: var(--ok); }
.pj-sbtn.on.pr-high { color: #d97706; } .pj-sbtn.on.pr-urgent { color: var(--danger); }
.pj-seg.sm .pj-sbtn { font-size: 12px; padding: 2px 8px; }
.pj-whocell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* главная */
.pj-home { flex: 1; overflow-y: auto; padding: 8px 22px 40px; }
.pj-home-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 1400px; margin: 0 auto; }
.pj-home-head h1 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0; letter-spacing: -.01em; }
.pj-sub { color: var(--muted); font-size: 14px; }
.pj-home-cols { display: grid; grid-template-columns: 1fr 340px; gap: 26px; max-width: 1400px; margin: 0 auto; }
.pj-home-main { min-width: 0; }
.pj-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.pj-fcol { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.pj-fcol.over { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.pj-fcol.today { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pj-fhead { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 2px 6px 4px; }
.pj-fhead .n { margin-left: auto; font-weight: 600; color: var(--text); background: var(--hover); border-radius: 10px; padding: 0 7px; }
.pj-fcol.over .pj-fhead { color: var(--danger); }
.pj-trow { display: flex; align-items: center; gap: 7px; padding: 5px 6px; border-radius: 8px; text-align: left; font-size: 13.5px; min-width: 0; border-left: 3px solid transparent; }
.pj-trow:hover { background: var(--hover); }
.pj-trow.prio-urgent { border-left-color: var(--danger); } .pj-trow.prio-high { border-left-color: #d97706; }
.pj-trow .pj-tt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-more { font-size: 12px; color: var(--faint); padding: 2px 8px; }
.pj-calm { border: 1px dashed var(--border-strong); border-radius: 14px; padding: 16px; color: var(--muted); text-align: center; }
.pj-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pj-pcard {
  text-align: left; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .12s, border-color .12s; min-height: 150px;
}
.pj-pcard::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--pc, var(--accent)); }
.pj-pcard:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.pj-pcard.arch { opacity: .65; }
.pj-pcard.pj-new { align-items: center; justify-content: center; border-style: dashed; box-shadow: none; color: var(--muted); flex-direction: row; gap: 8px; }
.pj-pcard.pj-new::before { display: none; }
.pj-pc-top { display: flex; align-items: center; gap: 10px; }
.pj-emoji { font-size: 22px; line-height: 1; }
button.pj-emoji.big { font-size: 26px; padding: 4px; border-radius: 10px; }
button.pj-emoji.big:hover { background: var(--hover); }
.pj-pc-name { font-weight: 600; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-pc-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.pj-pc-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.pj-pc-stats .red { color: var(--danger); font-weight: 600; }
.pj-pc-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); margin-top: auto; }
.pj-feed .pj-evs { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); padding: 4px 10px; }
.pj-empty { max-width: 560px; margin: 40px auto; text-align: center; color: var(--muted); }
.pj-empty .big { font-size: 46px; }
.pj-empty h2 { font-family: var(--serif); font-weight: 400; color: var(--text); margin: 6px 0; }
.pj-empty.sm { margin: 30px auto; font-size: 14px; }
.pj-empty.sm .big { font-size: 34px; }

/* проект */
.pj-project { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 4px 18px 0; }
.pj-phead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pj-ptitle { display: flex; flex-direction: column; min-width: 0; }
.pj-pname { font-family: var(--serif); font-size: 24px; text-align: left; padding: 0 6px; border-radius: 8px; display: inline-flex; gap: 8px; align-items: center; }
.pj-pname:hover { background: var(--hover); }
.pj-pmeta { font-size: 12.5px; color: var(--muted); padding: 0 6px; display: flex; align-items: center; gap: 8px; }
.pj-pdesc { font-size: 13.5px; color: var(--muted); margin: 4px 6px 0 50px; max-height: 66px; overflow: hidden; cursor: text; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.pj-pdesc:hover { color: var(--text); }
.pj-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.pj-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pj-tab svg { width: 16px; height: 16px; }
.pj-tab:hover { color: var(--text); }
.pj-tab.on { color: var(--text); border-bottom-color: var(--pc, var(--accent)); font-weight: 500; }
.pj-project .pj-tab.on { border-bottom-color: var(--accent); }
.pj-tab .n { font-size: 11px; background: var(--hover); color: var(--text); border-radius: 9px; padding: 0 6px; }
.pj-tab .n.hot { background: var(--accent); color: var(--accent-text); }
.pj-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0 4px; }
.pj-search { width: 170px; }
.pj-quick { flex: 1 1 280px; max-width: 520px; }
.pj-tagf.on { border-color: var(--accent); color: var(--accent); cursor: pointer; }
.pj-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pj-hint { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 9px 12px; font-size: 13px; color: var(--muted); margin: 6px 0; }

/* доска */
.pj-boardwrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pj-board { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 12px; min-height: 0; overflow-x: auto; padding: 8px 0 14px; }
.pj-col { display: flex; flex-direction: column; min-height: 0; background: var(--sidebar); border: 1px solid var(--border); border-radius: 14px; transition: border-color .12s, background .12s; }
.pj-col.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--sidebar)); }
.pj-colhead { display: flex; align-items: center; gap: 8px; padding: 9px 10px 6px 12px; font-weight: 600; font-size: 13.5px; }
.pj-colhead .n { font-weight: 500; color: var(--faint); }
.pj-cards { flex: 1; overflow-y: auto; padding: 2px 8px 8px; display: flex; flex-direction: column; gap: 7px; min-height: 60px; }
.pj-colempty { font-size: 12.5px; color: var(--faint); text-align: center; padding: 18px 8px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.pj-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 8px 10px 8px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); border-left: 3px solid transparent; transition: border-color .12s, box-shadow .12s, opacity .12s;
}
.pj-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.pj-card.prio-urgent { border-left-color: var(--danger); } .pj-card.prio-high { border-left-color: #d97706; }
.pj-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.pj-card.done .pj-ctitle { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.pj-card.dragging { opacity: .4; }
.pj-ctop { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 16px; }
.pj-ctop .pj-tag { margin-left: 0; }
.pj-ctitle { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.pj-cbot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pj-cadd { padding: 0 8px 8px; }
.pj-cadd textarea { width: 100%; resize: none; }
.pj-addbtn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--faint); }
.pj-addbtn:hover { background: var(--hover); color: var(--text); }
.pj-addbtn svg { width: 15px; height: 15px; }
.pj-foot-note { font-size: 12px; color: var(--faint); padding: 0 0 10px; }

/* список */
.pj-listwrap { flex: 1; overflow: auto; padding: 6px 0 20px; }
.pj-closed { margin: 4px 0 8px; }
.pj-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pj-table th { text-align: left; font-size: 12px; color: var(--faint); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; background: var(--bg); }
.pj-table th.sortable { cursor: pointer; user-select: none; }
.pj-table th.on { color: var(--text); }
.pj-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pj-table tr { cursor: pointer; }
.pj-table tbody tr:hover { background: var(--hover); }
.pj-table tr.sel { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pj-table td.ttl { min-width: 240px; }
.pj-table tr.st-done td.ttl, .pj-table tr.st-cancel td.ttl { color: var(--muted); text-decoration: line-through; }

/* идеи */
.pj-ideas { flex: 1; overflow-y: auto; padding: 10px 0 20px; }
.pj-ideabar { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--border-strong); background: var(--panel); border-radius: 14px; padding: 10px 12px; max-width: 800px; }
.pj-ideabar svg { color: #d9a21b; margin-top: 3px; }
.pj-ideaadd { border: 0; padding: 0; resize: none; box-shadow: none !important; background: transparent; }
.pj-itabs { margin: 12px 0 10px; display: inline-flex; }
.pj-igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pj-idea { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); padding: 11px 13px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.pj-idea:hover { border-color: var(--border-strong); }
.pj-idea.sel { border-color: var(--accent); }
.pj-ititle { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.pj-idesc { font-size: 13px; color: var(--muted); }
.pj-ifoot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; margin-top: auto; }
.pj-vote { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.pj-vote svg { width: 14px; height: 14px; }
.pj-vote:hover { border-color: var(--border-strong); color: var(--text); }
.pj-vote.on { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.pj-vote.big { padding: 5px 12px; font-size: 13px; }

/* календарь */
.pj-calwrap { flex: 1; display: grid; grid-template-columns: 1fr 250px; gap: 14px; min-height: 0; padding: 8px 0 14px; overflow-y: auto; }
.pj-calhead { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.pj-month { font-family: var(--serif); font-size: 20px; min-width: 170px; text-align: center; }
.pj-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pj-cwd { font-size: 12px; color: var(--faint); text-align: center; padding: 2px 0; }
.pj-cday { min-height: 96px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pj-cday.other { opacity: .5; }
.pj-cday.wknd { background: color-mix(in srgb, var(--panel) 80%, var(--sidebar)); }
.pj-cday.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pj-cday.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.pj-cnum { font-size: 12px; color: var(--muted); padding: 0 3px; }
.pj-cday.today .pj-cnum { color: var(--accent); font-weight: 700; }
.pj-chip { font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--hover); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid var(--border-strong); display: flex; align-items: center; gap: 4px; }
.pj-chip .pj-num { font-size: 10.5px; }
.pj-chip:hover { background: var(--active); }
.pj-chip.prio-urgent { border-left-color: var(--danger); } .pj-chip.prio-high { border-left-color: #d97706; }
.pj-chip.st-done { opacity: .55; text-decoration: line-through; }
.pj-chip.over { background: var(--danger-bg); color: var(--danger); }
.pj-chip.wide { white-space: normal; padding: 5px 8px; }
.pj-cdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pj-cmore { font-size: 11.5px; color: var(--faint); text-align: left; padding: 0 4px; }
.pj-calside { border: 1px solid var(--border); border-radius: 14px; background: var(--sidebar); padding: 10px; display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.pj-calnodue { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.pj-calnodue > * { flex: none; }
.pj-chip.wide { align-items: flex-start; }

/* чат проекта */
.pj-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; max-width: 900px; width: 100%; margin: 0 auto; }
.pj-chatbar { display: flex; justify-content: flex-end; padding: 6px 0; font-size: 13px; }
.pj-chatlist { flex: 1; overflow-y: auto; padding: 4px 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.pj-day { text-align: center; font-size: 12px; color: var(--faint); margin: 14px 0 6px; display: flex; align-items: center; gap: 10px; }
.pj-day::before, .pj-day::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pj-msg { display: flex; gap: 10px; padding: 5px 8px; border-radius: 10px; }
.pj-msg:hover { background: var(--hover); }
.pj-msg:not(.cont) { margin-top: 6px; }
.pj-msg.cont .pj-mtime { width: 26px; flex: none; font-size: 10.5px; color: transparent; text-align: right; padding-top: 3px; }
.pj-msg.cont:hover .pj-mtime { color: var(--faint); }
.pj-mbody { flex: 1; min-width: 0; font-size: 14.5px; }
.pj-mhead { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.pj-ccompose { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 12px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 14px; margin: 6px 0 14px; }
.pj-ccompose:focus-within { border-color: color-mix(in srgb, var(--text) 30%, var(--border-strong)); }
.pj-cinput { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; line-height: 1.45; padding: 5px 0; }

/* история */
.pj-history { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pj-hbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0 6px; }
.pj-hbar .comm-tabs { flex-wrap: wrap; }
.pj-hlist { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.pj-hlist .pj-evs { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); padding: 2px 12px; }
.pj-loadmore { display: block; margin: 12px auto; }
.pj-ev { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.pj-ev:last-child { border-bottom: 0; }
.pj-evtime { width: 44px; flex: none; color: var(--faint); font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.pj-ev.compact .pj-evtime { width: auto; min-width: 54px; order: 3; margin-left: auto; text-align: right; }
.pj-evmain { flex: 1; min-width: 0; }
.pj-evline { line-height: 1.5; overflow-wrap: anywhere; }
.pj-evic { display: inline-flex; vertical-align: -3px; margin-right: 4px; color: var(--faint); }
.pj-evic svg { width: 14px; height: 14px; }
.pj-evwho { font-weight: 600; }
.pj-from { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.pj-to { font-weight: 600; border-radius: 5px; padding: 0 4px; }
.pj-evbody { margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 14px; }
.pj-ev.compact .pj-evbody { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; }
.pj-evdet { margin-top: 4px; font-size: 13px; }
.pj-evdet summary { cursor: pointer; color: var(--muted); }
.pj-evdet .md { padding: 6px 10px; border-left: 3px solid var(--border-strong); margin-top: 4px; }

/* панель задачи */
.pj-dwrap { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.pj-dov { display: none; }
.pj-drawer {
  pointer-events: auto; position: absolute; top: 0; right: 0; bottom: 0; width: min(600px, 100%); background: var(--bg); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-pop); display: flex; flex-direction: column; animation: pj-slide .16s ease-out;
}
.pj-drawer::before { content: ""; height: 3px; background: var(--pc); flex: none; }
@keyframes pj-slide { from { transform: translateX(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pj-drawer { animation: none; } }
.pj-dhead { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px 16px; border-bottom: 1px solid var(--border); }
.pj-dhead .chip { white-space: nowrap; }
.pj-dproj { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-dscroll { flex: 1; overflow-y: auto; padding: 10px 18px 20px; }
.pj-dtitle { width: 100%; border: 1px solid transparent; border-radius: 9px; background: transparent; resize: none; font-family: var(--serif); font-size: 22px; line-height: 1.3; padding: 4px 6px; margin-left: -7px; outline: 0; color: var(--text); }
.pj-dtitle:hover { border-color: var(--border); }
.pj-dtitle:focus { border-color: var(--accent); background: var(--panel); }
.pj-acts { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.pj-props { display: grid; grid-template-columns: 120px 1fr; gap: 8px 10px; align-items: center; font-size: 13.5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.pj-plabel { color: var(--muted); font-size: 13px; }
.pj-props .pj-sbtn { padding: 3px 8px; font-size: 12.5px; }
.pj-pval { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pj-duebox { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pj-qd { font-size: 12px; padding: 3px 8px; border-radius: 7px; border: 1px solid var(--border); color: var(--muted); }
.pj-qd:hover { color: var(--text); border-color: var(--border-strong); }
.pj-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pj-tagin { border: 0; outline: 0; background: transparent; font-size: 13px; width: 90px; color: var(--text); }
.pj-sec { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 6px; }
.pj-desctext { padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; cursor: text; font-size: 14.5px; }
.pj-desctext:hover { border-color: var(--border); background: var(--panel); }
.pj-descta { resize: vertical; font-size: 14px; }
.pj-check { display: flex; flex-direction: column; gap: 1px; }
.pj-citem { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 14px; }
.pj-citem:hover { background: var(--hover); }
.pj-citem input { width: 16px; height: 16px; accent-color: var(--ok); flex: none; }
.pj-citem .pj-cnum { color: var(--faint); font-size: 12px; width: 20px; text-align: right; }
.pj-citem .pj-ctext { flex: 1; overflow-wrap: anywhere; }
.pj-citem.done .pj-ctext { color: var(--faint); text-decoration: line-through; }
.pj-citem .icon-btn { opacity: 0; }
.pj-citem:hover .icon-btn { opacity: 1; }
.pj-chkadd { padding: 4px 0 0 30px; }
.pj-chkadd .field { width: 100%; }
.pj-links { display: flex; flex-direction: column; gap: 4px; }
.pj-link { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); text-align: left; font-size: 13.5px; }
.pj-link:hover { border-color: var(--border-strong); }
.pj-link .agent-dot { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }
.pj-feedlist { display: flex; flex-direction: column; }
.pj-feedlist .pj-ev { font-size: 13px; padding: 5px 0; border-bottom: 0; }
.pj-feedlist .pj-evtime { order: 3; margin-left: auto; width: auto; text-align: right; }
.pj-comment { display: flex; gap: 10px; padding: 8px 0; }
.pj-comment .pj-mbody { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 7px 11px; }
.pj-comment.mine .pj-mbody { background: var(--user-bubble); }
.pj-facts { margin-top: 10px; font-size: 12px; color: var(--faint); }
.pj-chattask { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px; max-width: 320px; white-space: nowrap; }
.pj-chattask:hover { border-color: var(--accent); color: var(--text); }
.pj-chattask svg { width: 14px; height: 14px; color: var(--accent); }
.pj-chattask span:first-of-type { overflow: hidden; text-overflow: ellipsis; }

/* формы и быстрый поиск */
.pj-form { display: flex; flex-direction: column; gap: 6px; }
.pj-form label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.pj-emopick, .pj-colpick { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pj-emopick button { font-size: 20px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; }
.pj-emopick button:hover { background: var(--hover); }
.pj-emopick button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pj-colpick button { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; }
.pj-colpick button.on { border-color: var(--text); }
.modal.pj-palette { max-width: 640px; align-self: start; margin-top: 10vh; }
.pj-palin { font-size: 16px; }
.pj-palres { display: flex; flex-direction: column; margin-top: 8px; max-height: 50vh; overflow-y: auto; }
.pj-palitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; text-align: left; font-size: 14px; }
.pj-palitem .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-palitem.on { background: var(--active); }
.pj-palitem .agent-dot { width: 20px; height: 20px; font-size: 10px; }

@media (max-width: 1100px) {
  .pj-home-cols { grid-template-columns: 1fr; }
  .pj-calwrap { grid-template-columns: 1fr; }
  .pj-calside { max-height: none; }
}
@media (max-width: 820px) {
  .pj-home { padding: 6px 12px 30px; }
  .pj-project { padding: 2px 10px 0; }
  .pj-board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .pj-col { scroll-snap-align: start; }
  .pj-pdesc { margin-left: 6px; }
  .pj-quick { width: 100%; order: 10; }
  .pj-search { flex: 1; width: auto; }
  .pj-who { width: 100%; }
  .pj-toolbar select { max-width: 130px; }
  .pj-toolbar { gap: 6px; padding-top: 8px; }
  .pj-phead .btn.primary { margin-left: auto; }
  .pj-dwrap { position: fixed; z-index: 45; pointer-events: auto; }
  .pj-drawer { width: 100%; border-left: 0; }
  .pj-props { grid-template-columns: 1fr; gap: 4px; }
  .pj-plabel { margin-top: 6px; }
  .pj-cday { min-height: 64px; }
  .pj-cday .pj-chip { font-size: 0; padding: 0; height: 6px; border-left-width: 0; background: var(--accent); }
  .pj-cday .pj-chip > * { display: none; }
  .pj-chattask span { display: none; }
  .pj-table td.ttl { min-width: 180px; }
}

.pj-prop { border: 1px solid var(--border, #444); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: rgba(127,127,127,.07); }
.pj-prop-h { display: flex; gap: 6px; align-items: center; font-weight: 600; margin-bottom: 6px; }
.pj-prop-row { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.pj-prop-kind { font-size: 11px; padding: 1px 6px; border-radius: 10px; background: rgba(127,127,127,.2); flex: none; margin-top: 2px; }
.pj-prop-body { flex: 1; min-width: 0; }
.pj-prop-desc { opacity: .8; font-size: 13px; }
.pj-prop-acts { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* выбор нескольких задач в списке → «Поручить одному агенту» (Hub 2.5) */
.pj-selcol { width: 30px; text-align: center; }
.pj-selcol input { cursor: pointer; }
.pj-selbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 8px;
  border: 1px solid var(--accent); border-radius: 11px; background: var(--panel); font-size: 13.5px; }
.pj-selbar > span { font-weight: 600; }
.pj-tst { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
