.work-space{min-width:0}.work-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}.work-heading h1{margin:7px 0 9px;font-size:30px;font-weight:500;line-height:1.2;overflow-wrap:anywhere}.work-heading p{font-size:12px;color:var(--muted);margin:0}.work-header-actions{display:flex;gap:8px;flex-wrap:wrap}.work-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.work-section-title h2{font-size:19px;font-weight:500;margin:0;overflow-wrap:anywhere}.work-count{font-size:12px;font-weight:400;color:#7d8c70;margin-left:5px}.work-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:20px;align-items:start}.work-plan-panel,.work-tasks-panel,.work-editor,.work-photos-panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;min-width:0}.work-plan-tools{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.work-plan-tools .button{font-size:11px;padding-inline:10px}.work-plan-caption{font-size:11px;color:#7a886e;line-height:1.5;margin:0 0 14px}.work-plan-viewport{overflow:auto;border:1px solid #dbe2d3;border-radius:8px;max-height:65vh;overscroll-behavior:contain;background:#f9faf6}.work-plan{display:block;width:100%;height:auto;touch-action:pan-x pan-y;outline-offset:-4px}.work-zoom-2{width:200%;max-width:none}.work-plan.is-placing{cursor:crosshair}.work-plan-floor{fill:#f4f6ef;stroke:#b7c5aa;stroke-width:8}.work-plan-door{fill:none;stroke:#c2ceba;stroke-width:7}.work-plan-room-name{fill:#9cab91;font-family:Arial,Helvetica,sans-serif}.work-plan-room-id{fill:#b3bea8;font-family:Arial,Helvetica,sans-serif}.work-pin{cursor:pointer}.work-pin-hit{fill:transparent}.work-pin-dot{fill:#2c704e;stroke:#fff;stroke-width:6}.work-pin text{fill:#fff;font-family:Arial,Helvetica,sans-serif;font-weight:600;pointer-events:none}.work-pin.is-done{opacity:.28}.work-pin.is-selected{opacity:1}.work-pin.is-selected .work-pin-dot,.work-pin:focus .work-pin-dot{fill:#a1682c;stroke:#f0c477;stroke-width:10}.work-pin:focus{outline:none}.work-crosshair{pointer-events:none;fill:#fff8;stroke:#af7b36;stroke-width:4}.work-placement-note{border-radius:7px;background:#f7eedc;color:#876530;padding:12px;font-size:12px;line-height:1.5}.work-filters{display:flex;gap:5px;margin:0 0 12px}.work-filters button{flex:1;background:#f4f7ed;color:#677e56;border:1px solid #e0e7d5;min-height:48px;border-radius:7px;font-size:11px;padding:8px}.work-filters button[aria-pressed=true]{background:#dfead3;border-color:#bdcfae;color:#315c3c;font-weight:600}.work-task-list{display:grid;gap:7px;max-height:510px;overflow-y:auto}.work-task{display:flex;align-items:center;gap:11px;min-height:62px;width:100%;text-align:left;padding:10px 12px;border-radius:8px;border:1px solid #e0e6d8;background:#fbfcf9;color:var(--ink)}.work-task.is-selected{background:#edf4e4;border-color:#a8c38e}.work-task-number{flex:none;min-width:28px;min-height:28px;border-radius:50%;display:grid;place-items:center;background:#e5eddc;color:#527347;font-size:11px}.work-task-copy{flex:1;min-width:0}.work-task-copy strong{display:block;font-size:12px;line-height:1.4;overflow-wrap:anywhere;font-weight:500;margin-bottom:4px}.work-status{display:inline-block;font-size:10px;color:#74855f;line-height:1.5;border:1px solid #d9e3cb;background:#f3f7ec;padding:3px 7px;border-radius:5px}.work-status-in_arbeit{background:#fff1d8;border-color:#e7d1a8;color:#976b32}.work-status-erledigt,.work-status-abgenommen{background:#e8f1df;color:#4a7248;border-color:#c9dbb9}.work-readonly,.work-notice{font-size:12px;line-height:1.6;border:1px solid #ceddc0;background:#edf5e5;color:#4c7245;border-radius:8px;padding:14px;margin:0 0 20px}.work-notice.is-error{background:#fff2e7;border-color:#e6c9ae;color:#89582c}.work-notice .button{display:block;margin-top:10px}.work-editor,.work-photos-panel{margin-top:20px}.work-editor{scroll-margin-top:15px}.work-editor .work-status{margin-bottom:12px}.work-editor form{display:grid;gap:17px}.work-editor textarea{width:100%;border:1px solid #c9d7be;border-radius:7px;background:#fcfdf9;color:var(--ink);font-family:inherit;font-size:14px;padding:12px;resize:vertical;min-height:95px}.work-form-actions{display:flex;gap:10px;align-items:center}.work-form-actions>.button{min-width:140px}.work-original{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.work-muted{font-size:12px;color:#7b886c;line-height:1.5}.work-current{border-left:3px solid #d7b575;background:#fff8ed;padding:14px;margin-bottom:17px;font-size:12px;line-height:1.5}.work-current>p{margin:7px 0}.work-current .work-status{margin:0}.work-photo-form{display:grid;grid-template-columns:1fr 1fr;gap:17px;background:#f6f9f0;border:1px solid #e0e8d5;border-radius:8px;padding:18px;margin-bottom:20px}.work-photo-form>.field:first-child,.work-photo-form>.work-file-name,.work-photo-form>.work-form-actions{grid-column:1/-1}.work-file-name{font-size:12px;color:#5f7a50;overflow-wrap:anywhere;margin:0}.work-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.work-photo{border:1px solid #dfe6d5;border-radius:9px;overflow:hidden;background:#fafcf6;min-width:0}.work-photo-thumbnail{display:block;width:100%;padding:0;border:0;background:#ecf0e5;cursor:pointer}.work-photo-thumbnail:focus-visible{outline:3px solid #24694b;outline-offset:-4px}.work-photo img{display:block;width:100%;height:150px;object-fit:cover}.work-photo>div{padding:13px}.work-photo strong{display:block;overflow-wrap:anywhere;font-size:12px;font-weight:500;line-height:1.4}.work-photo p{font-size:12px;margin:7px 0}.work-photo small{display:block;font-size:10px;color:#829173;margin:7px 0}.work-original-link{font-size:12px;display:inline-flex;align-items:center;min-height:48px;color:#3e734b}.work-empty{font-size:12px;color:#7f8e70;line-height:1.6;padding:22px 8px;margin:0}.work-history{margin-top:20px;border:1px solid var(--line);border-radius:9px;background:#f9fbf5}.work-history summary{font-size:13px;cursor:pointer;padding:17px;min-height:48px}.work-history ol{list-style:none;padding:0 17px 15px;margin:0;display:grid;gap:10px}.work-history li{display:flex;flex-wrap:wrap;gap:8px;font-size:11px;line-height:1.5;color:#748468}.work-history li strong{font-weight:500;overflow-wrap:anywhere}.work-history time{margin-left:auto;font-size:10px;color:#8a967d}
@media(max-width:900px){.work-grid{grid-template-columns:1fr}.work-task-list{max-height:350px}.work-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.work-plan-viewport{max-height:70vh}}
@media(max-width:650px){.work-heading{display:block;margin-bottom:19px}.work-heading h1{font-size:27px}.work-header-actions{margin-top:15px}.work-header-actions>.button{flex:1}.work-plan-panel,.work-tasks-panel,.work-editor,.work-photos-panel{padding:17px}.work-section-title{align-items:flex-start;flex-wrap:wrap}.work-section-title h2{font-size:18px;line-height:1.35}.work-plan-tools{gap:3px}.work-plan-tools .button{font-size:11px;min-height:48px;padding:9px}.work-task-list{max-height:330px}.work-grid{gap:16px}.work-editor textarea,.work-editor input,.work-editor select,.work-photo-form input,.work-photo-form select{font-size:16px}.work-form-actions .button{flex:1;min-width:0}.work-photo-form{grid-template-columns:1fr;padding:14px}.work-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.work-photo img{height:115px}.work-photo>div{padding:10px}.work-original{font-size:13px}.work-task{min-height:62px}.work-notice,.work-readonly{font-size:12px}.work-history time{margin-left:0;flex-basis:100%}}

.work-plan{min-width:320px}.work-review-note{font-size:12px;color:#8b632e;background:#fff2da;border:1px solid #e7d1a8;border-radius:7px;padding:12px;line-height:1.5}.work-source{font-size:11px;line-height:1.6;color:#728164;overflow-wrap:anywhere}

.work-photo-choices{display:flex;gap:10px;flex-wrap:wrap}.work-photo-choices>label{position:relative;overflow:hidden;flex:1;min-width:130px;cursor:pointer}.work-file-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.work-photo-choices>label:focus-within{outline:3px solid #589a6f;outline-offset:3px}.work-photo-form>.field:first-child{grid-column:1/-1}

body.work-photo-dialog-open{overflow:hidden}
.work-photo-dialog{box-sizing:border-box;width:min(860px,calc(100% - 24px));max-width:none;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--line,#dfe6d5);border-radius:12px;background:#fff;color:var(--ink,#253c32);overflow:auto;overscroll-behavior:contain}
.work-photo-dialog::backdrop{background:rgba(22,32,27,.72)}
.work-photo-dialog.is-fallback{display:block;position:fixed;inset:0;z-index:1001;width:100%;height:100%;height:100dvh;max-height:none;margin:0;border:0;border-radius:0}
.work-photo-dialog-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;background:#fff;border-bottom:1px solid var(--line,#dfe6d5)}
.work-photo-dialog-head h2{margin:0;font-size:18px;line-height:1.35}
.work-photo-dialog-head button{flex:none;min-height:44px;min-width:44px}
.work-photo-dialog img{display:block;width:100%;max-height:64vh;max-height:64dvh;object-fit:contain;background:#f5f7f2}
.work-photo-dialog-details{padding:12px 14px;overflow-wrap:anywhere}
.work-photo-dialog-details p{margin:4px 0}
.work-photo-dialog-details>[data-photo-remove]{margin-inline-start:12px}
.work-photo-remove-confirmation{margin-top:10px;padding:12px;border:1px solid #e4c9b7;border-radius:8px;background:#fff5ed}
.work-photo-remove-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.work-photo-remove-confirmation [hidden]{display:none}
.work-photo-remove-confirmation [role=status]:empty{display:none}

/* Compact work surfaces retain the paper and graphite company palette. */
.work-heading { gap: 14px; margin-bottom: 15px; }
.work-heading h1 { margin: 4px 0 6px; font-size: 27px; }
.work-section-title { gap: 9px; margin-bottom: 11px; }
.work-section-title h2 { font-size: 18px; }
.work-count, .work-plan-caption, .work-muted, .work-file-name,
.work-photo small, .work-empty, .work-source, .work-history li, .work-history time {
  color: var(--muted);
}
.work-grid { gap: 14px; }
.work-plan-panel, .work-tasks-panel, .work-editor, .work-photos-panel {
  padding: 16px;
  border-radius: 9px;
}
.work-plan-viewport { border-color: var(--line); background: var(--field-surface); }
.work-plan-floor { fill: var(--paper); stroke: #8f9699; }
.work-plan-door { stroke: #bfc1bd; }
.work-plan-room-name { fill: #747b7f; }
.work-plan-room-id { fill: #8f9699; }
.work-pin-dot { fill: var(--accent); }
.work-pin.is-selected .work-pin-dot, .work-pin:focus .work-pin-dot {
  fill: var(--accent-deep);
  stroke: #e4a4aa;
}
.work-filters { gap: 5px; margin-bottom: 9px; }
.work-filters button {
  min-height: 44px;
  background: var(--soft);
  color: var(--muted);
  border-color: var(--line);
}
.work-filters button[aria-pressed=true] {
  background: var(--brand-tint);
  color: var(--accent-deep);
  border-color: #c9878d;
}
.work-task-list { gap: 6px; }
.work-task { min-height: 56px; padding: 9px 11px; border-color: #d6d8d5; background: var(--field-surface); }
.work-task.is-selected { background: var(--brand-tint); border-color: #c9878d; }
.work-task-number { background: var(--soft); color: var(--ink); }
.work-status { color: var(--muted); border-color: var(--line); background: var(--soft); }
.work-status-in_arbeit { color: #7c521f; border-color: #d6bd92; background: #fff1d8; }
.work-status-erledigt, .work-status-abgenommen { color: #2d673e; border-color: #b8cdbb; background: #e9f3e9; }
.work-readonly, .work-notice {
  color: var(--ink);
  border-color: var(--line);
  background: var(--soft);
  padding: 11px 12px;
  margin-bottom: 14px;
}
.work-notice.is-error { color: var(--accent-deep); border-color: #cf8e93; background: var(--brand-tint); }
.work-editor, .work-photos-panel { margin-top: 14px; }
.work-editor form { gap: 13px; }
.work-editor textarea { border-color: var(--line); background: var(--field-surface); min-height: 88px; }
.work-photo-form { gap: 13px; padding: 14px; margin-bottom: 14px; border-color: var(--line); background: var(--soft); }
.work-photo-grid { gap: 10px; }
.work-photo { border-color: var(--line); background: #fff; }
.work-photo-thumbnail { background: var(--soft); }
.work-photo-thumbnail:focus-visible, .work-photo-choices > label:focus-within { outline-color: var(--accent); }
.work-original-link { color: var(--accent); min-height: 44px; }
.work-history { margin-top: 14px; background: var(--field-surface); }
.work-history summary { min-height: 44px; padding: 12px 14px; }
.work-photo-dialog::backdrop { background: #0b0d0eb8; }
.work-photo-dialog img { background: var(--paper); }
@media (max-width: 650px) {
  .work-heading { margin-bottom: 13px; }
  .work-heading h1 { font-size: 25px; }
  .work-header-actions { margin-top: 10px; }
  .work-plan-panel, .work-tasks-panel, .work-editor, .work-photos-panel { padding: 12px; }
  .work-plan-tools .button { min-height: 44px; padding: 7px 8px; }
  .work-grid { gap: 12px; }
  .work-task { min-height: 56px; }
  .work-photo-form { padding: 11px; gap: 11px; }
  .work-photo-grid { gap: 8px; }
  .work-history summary { padding: 11px 12px; }
}

#room-ai-assistant{margin-top:1rem}#room-ai-assistant summary{cursor:pointer;min-height:44px;font-weight:700}#room-ai-assistant input{max-width:100%}#room-ai-assistant small{overflow-wrap:anywhere}.ai-source-excerpt{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}

.work-grid.without-room-plan{grid-template-columns:minmax(0,1fr)}.without-room-plan .work-task-list{max-height:none}

.work-plan-edit { cursor: pointer; }

.work-plan-device rect { fill: #1e5b890a; stroke: #1e5b89; stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.work-plan-device:hover rect, .work-plan-device:focus-visible rect { fill: #1e5b8922; stroke-width: 2; stroke-dasharray: none; }

/* A local pending change is intentionally distinct from confirmed completion. */
.work-sync{border:1px solid #d8b16a;background:#fff8e9;border-radius:9px;padding:14px;margin:16px 0;color:var(--ink)}
.work-sync h2{font-size:16px;margin:0 0 6px}.work-sync p,.work-sync small{font-size:12px;line-height:1.5}.work-sync ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}.work-sync li{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e8d7b5;padding-top:9px}.work-sync strong,.work-sync small{display:block;overflow-wrap:anywhere}.work-sync li>div{display:flex;flex-wrap:wrap;gap:6px}.work-sync .is-conflict{color:#843b1d}.work-checklist-row.is-pending{border-color:#c88a26;background:#fff8e9}.work-checklist-row.is-pending small{color:#815609}
@media(max-width:600px){.work-sync li{align-items:flex-start;flex-direction:column}.work-sync .button{min-height:44px}}

.work-pin.is-pending{pointer-events:none}.work-pin.is-pending .work-pin-dot{fill:#b7771b;stroke:#68480f;stroke-dasharray:8 6}
