/* MAV.Space · client-only workspace, isolated from internal MAV.OS layouts. */
body:has(.space-app){min-width:320px;overflow-x:hidden;overflow-y:auto;background:#f6f7f5}
.space-app{font-family:var(--font-body);min-height:100dvh;background:#f6f7f5;color:#303831}
.space-app button,.space-app input,.space-app textarea,.space-app select{font:inherit}
.space-header{height:75px;padding:0 clamp(22px,4vw,76px);display:flex;align-items:center;justify-content:space-between;gap:22px;border-bottom:1px solid #e4e8e2;background:#fff}
.space-brand{font:800 27px/1 var(--font-display);letter-spacing:-.075em;color:#232923;white-space:nowrap}
.space-brand span{color:var(--accent)}
.space-header-right{display:flex;align-items:center;gap:18px;min-width:0}
.space-actor-chooser{display:flex;align-items:center;gap:9px;font-size:11px;color:#869087;font-weight:600}
.space-actor-chooser select{min-width:230px;max-width:340px;border:1px solid #e2e7e0;border-radius:8px;padding:9px 12px;font-size:12px;background:#f9faf8;color:#3f4840}
.space-current-role{font-size:12px;color:#626d62}
.space-header-avatar,.space-mini-avatar{background:#e5e9e3;color:#3b493d;border-radius:50%;display:grid;place-items:center;font-weight:700;flex:none}
.space-header-avatar{width:34px;height:34px}
.space-mini-avatar{width:30px;height:30px;font-size:12px}
.space-exit{font-size:12px;font-weight:700;color:#6c796e;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.space-main{width:min(1370px,calc(100% - 88px));margin:0 auto;padding:32px 0 90px}
.space-demo-note,.space-readonly-note{padding:11px 15px;border-radius:9px;margin-bottom:20px;background:#f1f3ee;color:#768173;font-size:11px;border:1px solid #e3e9e1}
.space-readonly-note{background:#fff2df;color:#926934}
.space-list-intro{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:25px}
.space-overline{display:block;color:#919b91;font-size:11px;font-weight:650;margin-bottom:10px}
.space-list-intro h1{font-family:var(--font-display);font-size:36px;letter-spacing:-.065em;margin:0 0 5px;font-weight:750}
.space-list-intro p{font-size:13px;color:#8c958b;margin:0}
.space-summary{font-size:13px;color:#657164;font-weight:650;white-space:nowrap}
.space-summary span{padding:0 7px;color:#bac1b9}
.space-filters{display:flex;align-items:center;gap:15px;justify-content:space-between;margin-bottom:16px}
.space-search{display:flex;align-items:center;gap:9px;flex:1;max-width:450px;padding:0 14px;border:1px solid #e3e8e2;border-radius:10px;background:#fff;height:44px}
.space-search span{font-size:24px;color:#9da99e;line-height:1}
.space-search input{border:none;background:none;outline:none;min-width:0;flex:1;color:#3e473e;font-size:13px}
.space-filter-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.space-filter-actions select{border:1px solid #e4e9e2;background:#fff;color:#495248;border-radius:9px;padding:12px 30px 12px 12px;font-size:12px;height:44px}
.space-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #dfe6de;border-radius:9px;padding:10px 14px;background:#fff;color:#485549;font-size:11px;font-weight:750;line-height:1.1;text-decoration:none;white-space:nowrap;cursor:pointer}
.space-btn:hover{background:#f2f5f0}
.space-btn.primary{border-color:var(--accent-strong);background:var(--accent);color:var(--accent-ink)}
.space-btn.primary:hover{background:var(--accent-strong)}
.space-btn.neutral{background:#f8faf7}
.space-task-list{background:#fff;border:1px solid #e6eae5;border-radius:15px;overflow:hidden}
.space-task-item{min-height:76px;display:flex;align-items:center;gap:13px;border-bottom:1px solid #edf0ec;padding:12px 19px}
.space-task-item:last-child{border-bottom:0}
.space-task-item:hover{background:#fbfcfb}
.space-status-dot{height:9px;width:9px;border-radius:50%;flex:none;background:#bbc4bb}
.space-status-dot.in_progress{background:#3a9971}
.space-status-dot.review{background:#d49e48}
.space-status-dot.done{background:#849289}
.space-item-main{min-width:0;flex:1;display:grid;gap:6px}
.space-item-line{display:flex;align-items:baseline;gap:12px;min-width:0}
.space-item-id{font-family:var(--font-display);font-size:11px;white-space:nowrap;color:#9ba49a;font-weight:500}
.space-item-line strong{font-size:13px;font-weight:700;white-space:normal;overflow-wrap:anywhere;color:#323b34}
.space-item-sub{font-size:10px;color:#9ba49b}
.space-item-metrics{display:flex;align-items:center;gap:12px;font-size:10px;color:#8f998f;white-space:nowrap}
.space-item-metrics b{font-weight:700;color:#4c9676}
.space-pin{border:0;background:transparent;color:#adb7ab;font-size:22px;padding:6px 7px;flex:none}
.space-pin.is-pinned{color:var(--accent-strong)}
.space-page-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:24px;font-size:11px;color:#a0a8a0}
.space-back{color:#5e6a60;font-weight:700}
.space-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:28px;margin-bottom:25px}
.space-detail-heading>div:first-child{min-width:0}
.space-detail-heading h1{font-family:var(--font-display);font-size:clamp(23px,2.2vw,32px);font-weight:750;letter-spacing:-.065em;line-height:1.24;margin:0 0 9px;overflow-wrap:anywhere}
.space-stamp{font-size:10px;color:#a1a8a0}
.space-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.space-badge{font-size:10px;font-weight:750;white-space:nowrap;padding:7px 10px;border-radius:7px;background:#f3f5f2;color:#728074}
.space-badge.in_progress{background:#e9f4ee;color:#38775a}
.space-badge.review{background:#fff3d9;color:#9b752f}
.space-badge.done{background:#edf0ec;color:#5d705c}
.space-detail-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr);align-items:start;gap:18px}
.space-primary-content{min-width:0;display:grid;gap:16px}
.space-task-side{min-width:0}
.space-surface{border:1px solid #e7ebe5;border-radius:14px;background:#fff;padding:22px}
.space-section-title{display:flex;align-items:baseline;gap:10px;margin:0 0 16px}
.space-section-title h2{font:750 16px/1.3 var(--font-display);letter-spacing:-.03em;margin:0}
.space-section-title>span{font-size:11px;color:#a1aba1}
.space-task-description{font-size:13px;line-height:1.75;color:#626c63;white-space:pre-wrap;margin:0}
.space-empty-inline{font-size:12px;color:#a2aba1;margin:10px 0}
.space-task-corrections>.space-section-title{margin-bottom:18px}
.space-correction-group{margin-top:20px}
.space-correction-group h3{font:700 12px var(--font-body);color:#5f6b60;margin:0 0 9px}
.space-correction-group h3 span{color:#a2aca2;margin-left:6px;font-size:11px}
.space-correction-list{display:grid;gap:7px}
.space-correction-card{border:1px solid #e8ede7;border-radius:10px;padding:13px;display:flex;justify-content:space-between;align-items:center;gap:15px;background:#fcfdfb}
.space-correction-card[draggable="true"]{cursor:grab}
.space-correction-card.space-drag-over{outline:2px solid var(--accent)}
.space-correction-link{flex:1;min-width:0;display:grid;gap:6px}
.space-correction-id{font-size:10px;color:#9aa49a}
.space-correction-link strong{font-size:12px;line-height:1.45;font-weight:650;overflow-wrap:anywhere;color:#3b463c}
.space-correction-link small{font-size:10px;color:#97a097}
.space-correction-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.space-move-actions{display:flex;gap:2px}
.space-move-actions .space-btn{padding:6px 7px}
.space-correction-form{margin-top:22px;border-top:1px solid #ecefeb;padding-top:17px;display:grid;gap:10px}
.space-correction-form label{font-size:11px;color:#6e796f;font-weight:750;display:grid;gap:8px}
.space-correction-form textarea,.space-comment-form textarea,.space-modal textarea,.space-modal input,.space-modal select{width:100%;background:#fff;border:1px solid #e0e6de;border-radius:9px;padding:11px 12px;outline-color:var(--accent);font-size:12px;color:#39453b;resize:vertical}
.space-correction-form .space-btn{justify-self:start}
.space-comments{min-width:0}
.space-comments-list{display:grid}
.space-comment{display:flex;gap:10px;padding:16px 0;border-bottom:1px solid #edf1eb}
.space-comment:first-child{padding-top:0}
.space-comment-content{min-width:0;flex:1}
.space-comment-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.space-comment-head strong{font-size:12px;color:#425044}
.space-comment-head time{font-size:9px;color:#a1aaa0}
.space-comment-content p{font-size:12px;color:#606b61;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:9px 0}
.space-comment-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.space-comment-actions .space-btn{font-size:10px;padding:6px 7px}
.space-comment-form{display:grid;gap:8px;margin-top:20px}
.space-form-bottom{display:flex;gap:12px;justify-content:space-between;align-items:center}
.space-form-bottom span{color:#acb3aa;font-size:10px;line-height:1.5}
.space-attachment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.space-attachment{min-width:0;border:1px solid #e6eae5;border-radius:10px;overflow:hidden;background:#fafbf9}
.space-attachment>a,.space-file-no-source{display:grid;place-items:center;height:106px;background:#edf1ed;overflow:hidden}
.space-attachment img{width:100%;height:100%;object-fit:contain}
.space-file-icon{font-size:13px;font-weight:850;letter-spacing:.03em;color:#83948a}
.space-attachment-info{padding:9px;display:grid;gap:4px;min-width:0}
.space-attachment-info strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.space-attachment-info small{font-size:9px;line-height:1.4;color:#9aa69a;overflow-wrap:anywhere}
.space-file-actions{display:flex;gap:5px;padding:0 9px 9px}
.space-file-actions .space-btn{font-size:9px;padding:6px 7px}
.space-file-input{display:none}
.space-upload-wrap{display:inline-flex}
.space-approval-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:9px;padding-top:18px;margin-top:18px;border-top:1px solid #eef0eb}
.space-correction-heading{margin-bottom:22px}
.space-history summary{font-weight:700;color:#677468;font-size:12px;cursor:pointer}
.space-history-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #eef0ed;padding:12px 0;font-size:11px}
.space-history-row:first-of-type{margin-top:12px}
.space-history-row small{color:#a0a9a0}
.space-blank{text-align:center;border:1px dashed #dfe6dc;border-radius:14px;background:#fff;padding:55px 20px;color:#657265}
.space-blank strong{font-size:16px}
.space-blank p{font-size:12px;color:#99a199}
.space-blank .space-btn{margin-top:12px}
.space-modal-backdrop{position:fixed;inset:0;display:grid;place-items:center;padding:20px;z-index:60;background:rgba(24,31,25,.38)}
.space-modal{width:min(560px,100%);max-height:92dvh;overflow-y:auto;background:#fff;border-radius:17px;padding:24px;box-shadow:0 30px 80px rgba(0,0,0,.15)}
.space-modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.space-modal-head h2{font-size:20px;font-weight:750;margin:0;letter-spacing:-.04em}
.space-close{font-size:28px;color:#849087;border:0;background:none;line-height:1}
.space-modal form{display:grid;gap:15px}
.space-modal form label{display:grid;gap:7px;font-size:11px;font-weight:700;color:#8a958a}
.space-modal-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
.space-toast{position:fixed;bottom:20px;right:25px;background:#263029;color:#fff;border-radius:9px;padding:11px 16px;font-size:11px;z-index:90;box-shadow:0 8px 25px rgba(0,0,0,.15)}
@media(max-width:1100px){
 .space-main{width:calc(100% - 48px)}
 .space-detail-layout{grid-template-columns:minmax(0,1fr) 310px}
 .space-attachment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:780px){
 .space-header{height:auto;min-height:64px;flex-wrap:wrap;padding:14px 20px}
 .space-header-right{flex:1;justify-content:flex-end}
 .space-actor-chooser select{min-width:140px;max-width:220px}
 .space-main{width:calc(100% - 32px);padding-top:20px}
 .space-detail-layout{grid-template-columns:1fr}
 .space-filters{align-items:stretch;flex-direction:column}
 .space-search{max-width:none}
 .space-filter-actions{justify-content:flex-start}
 .space-list-intro h1{font-size:30px}
 .space-detail-heading{flex-direction:column;gap:14px}
 .space-heading-actions{justify-content:flex-start}
 .space-attachment-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:520px){
 .space-brand{font-size:22px}
 .space-actor-chooser{flex:1;min-width:0}
 .space-actor-chooser>span{display:none}
 .space-actor-chooser select{min-width:0;max-width:none;width:100%}
 .space-header-right{gap:8px}
 .space-header-avatar{width:28px;height:28px}
 .space-exit{font-size:10px}
 .space-list-intro{align-items:flex-start;flex-direction:column;gap:9px}
 .space-list-intro h1{font-size:29px}
 .space-summary{font-size:11px}
 .space-filter-actions select{flex:1;min-width:0;font-size:10px;padding:9px}
 .space-filter-actions .space-btn{width:100%}
 .space-task-item{padding:12px 11px;gap:8px;flex-wrap:wrap}
 .space-item-main{flex-basis:calc(100% - 52px)}
 .space-item-metrics{margin-left:18px}
 .space-pin{margin-left:auto}
 .space-item-line{gap:7px}
 .space-item-line strong{font-size:12px}
 .space-surface{padding:16px}
 .space-detail-heading h1{font-size:24px}
 .space-attachment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .space-correction-card{align-items:flex-start;flex-direction:column;gap:9px}
 .space-correction-actions{width:100%;justify-content:space-between}
 .space-form-bottom{align-items:stretch;flex-direction:column}
 .space-modal{padding:18px}
}

.space-staff-status{height:35px;border:1px solid #e0e5df;padding:6px;border-radius:9px;color:#526153;background:#fff;font-size:11px}

.space-comment-upload{display:inline-flex;align-items:center;gap:9px;font-size:10px;color:#819082}
.space-comment-upload input{max-width:170px;font-size:9px}
