/* 星枢多人项目：沿用主题令牌，弹层与表单动效始终启用。 */
.pw-modal .modal-body { min-height: 160px; }
.pw-modal .modal-foot { gap: 10px; }
.pw-foot-note { margin-right: auto; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.5; }
.pw-state { min-height: 170px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--text-2); text-align: center; }
.pw-state p { margin: 0; }
.pw-state strong { color: var(--text-1); font-size: var(--fs-lg); }
.pw-error .btn { margin-top: 4px; }
.pw-loading-dot { width: 24px; height: 24px; border: 2px solid var(--line-strong); border-top-color: var(--info); border-radius: 50%; animation: pw-spin 850ms linear infinite; }
@keyframes pw-spin { to { transform: rotate(360deg); } }
.pw-form-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 20px; }
.pw-form-grid .field { margin: 0; }
.pw-form-grid .field small { display: block; color: var(--text-3); font-size: var(--fs-xs); margin-top: 6px; line-height: 1.5; }
.pw-form-grid textarea { min-height: 106px; resize: vertical; }
.pw-member-picker { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.pw-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.pw-section-head h4 { color: var(--text-1); font-size: var(--fs-base); font-weight: 650; margin: 0; }
.pw-section-head h4 > span { color: var(--brand-text); font-variant-numeric: tabular-nums; margin-left: 6px; }
.pw-section-head p { color: var(--text-3); font-size: var(--fs-xs); margin: 3px 0 0; }
.pw-count { flex: 0 0 auto; padding: 3px 10px; color: var(--brand-text); border-radius: var(--r-pill); background: var(--brand-soft); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.pw-member-search { margin-bottom: 10px; }
.pw-member-options { max-height: 256px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 2px; }
.pw-member-option { min-width: 0; position: relative; display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised); cursor: pointer; transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease); animation: pw-arrive 260ms var(--ease-out) both; }
.pw-member-option:hover { transform: translateY(-2px); border-color: var(--brand-2); box-shadow: var(--shadow-1); }
.pw-member-option.selected { border-color: var(--brand); background: var(--brand-soft); }
.pw-member-option:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.pw-member-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pw-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: inline-grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--avatar-grad-a), var(--avatar-grad-b)); border: 1px solid var(--line); color: var(--brand-text); font-size: var(--fs-xs); font-weight: 700; }
.pw-member-copy, .pw-project-member > span:not(.pw-avatar), .pw-file-copy { min-width: 0; display: flex; flex-direction: column; }
.pw-member-copy strong, .pw-project-member strong, .pw-file-copy strong { overflow: hidden; color: var(--text-1); font-size: var(--fs-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pw-member-copy small, .pw-project-member small, .pw-file-copy small { overflow: hidden; color: var(--text-3); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.pw-check { width: 20px; height: 20px; margin-left: auto; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); color: transparent; font-size: 12px; transition: color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease); }
.pw-member-option.selected .pw-check { border-color: var(--brand); background: var(--brand); color: var(--onbrand); transform: scale(1.06); }
.pw-inline-empty { padding: 24px 14px; color: var(--text-3); font-size: var(--fs-sm); line-height: 1.8; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--bg-raised); }
.pw-project { display: grid; gap: 22px; }
.pw-project-head { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 24px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(120deg, var(--brand-soft), var(--bg-panel) 55%, var(--purple-soft)); animation: pw-arrive 360ms var(--ease-out) both; }
.pw-project-head::after { content: ""; pointer-events: none; position: absolute; width: 260px; height: 140px; right: -40px; top: -90px; border-radius: 50%; background: radial-gradient(ellipse, var(--aurora-2), transparent 70%); animation: pw-ambient 7s ease-in-out infinite alternate; }
.pw-eyebrow { color: var(--brand-text); font-size: 10px; font-weight: 650; letter-spacing: 0.13em; }
.pw-project-head h4 { margin: 5px 0 6px; color: var(--text-1); font-size: var(--fs-xl); line-height: 1.4; }
.pw-project-head p { max-width: 700px; margin: 0; color: var(--text-2); font-size: var(--fs-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.pw-project-stats { display: flex; align-items: flex-end; flex: 0 0 auto; gap: 16px; z-index: 1; }
.pw-project-stats > span { color: var(--text-3); font-size: var(--fs-xs); text-align: right; }
.pw-project-stats b { display: block; color: var(--brand-text); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; line-height: 1.35; }
.pw-project-section { min-width: 0; }
.pw-project-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 8px; }
.pw-project-member { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pw-role { margin-left: auto; flex: 0 0 auto; color: var(--brand-text); font-size: 10px; }
.pw-muted { color: var(--text-3); font-size: var(--fs-xs); text-align: right; }
.pw-file-list { display: grid; gap: 8px; }
.pw-file { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color 160ms var(--ease), background 160ms var(--ease); }
.pw-file:hover { border-color: var(--line-hover); background: var(--bg-panel-2); }
.pw-file-icon { width: 40px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; background: var(--info-soft); color: var(--info-text); border-radius: 9px; font-size: 9px; font-weight: 750; letter-spacing: 0.08em; }
.pw-file-copy { flex: 1; }
.pw-file-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pw-file-actions .btn { min-height: 32px; padding: 5px 10px; font-size: var(--fs-xs); }
.pw-message-list { max-height: 350px; overflow-y: auto; display: grid; gap: 9px; padding-right: 3px; }
.pw-message { padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised); animation: pw-arrive 260ms var(--ease-out) both; }
.pw-message.member { border-left: 2px solid var(--brand-2); }
.pw-message.assistant { border-left: 2px solid var(--purple); }
.pw-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--text-3); font-size: var(--fs-xs); }
.pw-message-meta strong { color: var(--text-1); font-size: var(--fs-sm); }
.pw-message-meta time { margin-left: auto; font-variant-numeric: tabular-nums; }
.pw-message p { margin: 7px 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.pw-project-list { display: grid; gap: 10px; }
.pw-project-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised); transition: border-color 160ms var(--ease), transform 160ms var(--ease); }
.pw-project-card:hover { border-color: var(--brand-2); transform: translateY(-1px); }
.pw-project-card.active { border-color: var(--brand); background: var(--brand-soft); }
.pw-project-card h4 { margin: 3px 0; font-size: var(--fs-lg); }
.pw-project-card p { margin: 0 0 5px; color: var(--text-2); font-size: var(--fs-sm); }
.pw-project-card small { color: var(--text-3); font-size: var(--fs-xs); }
.pw-project-card-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.pw-confirm-text { margin: 0; color: var(--text-2); line-height: 1.8; }
[data-theme="dark"] .pw-member-option.selected,
[data-theme="dark"] .pw-project-card.active { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-glow); }
[data-theme="dark"] .pw-project-head { background: linear-gradient(120deg, var(--brand-soft), var(--bg-panel-2) 55%, var(--purple-soft)); }
@keyframes pw-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pw-ambient { from { transform: translate(-12px, 0) scale(0.94); opacity: 0.7; } to { transform: translate(18px, 10px) scale(1.08); opacity: 1; } }
@media (max-width: 760px) {
  .pw-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .pw-member-options { grid-template-columns: 1fr; max-height: 230px; }
  .pw-project-head { flex-direction: column; padding: 17px; gap: 14px; }
  .pw-project-stats { align-items: center; }
  .pw-project-stats > span { text-align: left; }
  .pw-project-stats b { display: inline; margin-right: 3px; font-size: var(--fs-base); }
  .pw-section-head { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .pw-muted { text-align: left; }
  .pw-file { align-items: flex-start; flex-wrap: wrap; }
  .pw-file-actions { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .pw-project-card { align-items: flex-start; flex-direction: column; }
  .pw-project-card-actions { flex-wrap: wrap; }
  .pw-modal .modal-foot { flex-wrap: wrap; }
  .pw-foot-note { width: 100%; margin: 0 0 2px; }
}
