/* One quiet surface with consistent field spacing and a distinct action footer. */
#taskDialog{width:min(calc(100vw - 28px),500px);padding:20px;max-height:calc(100dvh - 28px);border:1px solid #e7e1ed;border-radius:24px;background:#fcfbff;overflow-y:auto}
#taskForm{display:flex;flex-direction:column;gap:0}
#taskForm .task-dialog-header{margin:0 0 14px;min-height:32px}
#taskForm .task-dialog-header h2{font-size:18px;font-weight:600;letter-spacing:-.3px}
#taskForm #cancelTask{background:#f0ecf7;width:32px;height:32px;min-width:32px;min-height:32px;padding:8px}
#taskForm>label[for=taskName]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#taskForm #taskName{height:44px;min-height:44px;padding:8px 0;border:0;border-bottom:1px solid #e5dfee;border-radius:0;background:transparent;font-size:18px;font-weight:500;box-shadow:none;margin:0 0 12px}
#taskForm label,#taskForm legend{font-size:11px;font-weight:500;color:#81758f;letter-spacing:.1px}
#taskForm>label{margin:14px 0 6px}
#taskForm #showDescription{align-self:flex-start;margin:0 0 2px;padding:4px 0;background:transparent;color:#81758f;min-height:30px;font-size:12px}
#taskForm #showDescription .ui-icon{width:14px;height:14px;opacity:.6}
#taskForm #descriptionField{margin:0 0 2px}
#taskForm .description-heading{margin-bottom:6px}
#taskForm #taskDescription{height:84px;min-height:84px;max-height:120px;padding:12px;border:1px solid #e8e2ee;border-radius:12px;background:#f5f2f9;font-size:13px;line-height:1.6;box-shadow:none;resize:vertical}
#taskForm #viewDescription{background:transparent;padding:3px 0;color:#7964b1}
#taskForm .tag-choices-scroller{margin:0;gap:4px}
#taskForm #tagChoices{grid-template-rows:32px;padding:2px 0}
#taskForm #tagChoices label{height:32px;margin:0;font-size:11px;border-radius:10px;padding:4px 7px}
#taskForm .tag-scroll-button{width:24px;min-width:24px;min-height:32px;padding:4px;background:transparent}
#taskForm #tagScrollHint{margin:3px 0 0;font-size:10px}
#taskForm .date-time-fields{margin-top:14px;gap:12px}
#taskForm .date-time-fields label{margin:0 0 6px;min-height:15px}
#taskForm #dateTrigger,#taskForm #timeTrigger{height:40px;min-height:40px;padding:8px 10px;border:1px solid #e8e2ee;border-radius:11px;background:#f5f2f9;font-size:12px;justify-content:flex-start;box-shadow:none}
#taskForm #dateTrigger .ui-icon,#taskForm #timeTrigger .ui-icon{width:16px;height:16px;opacity:.6}
#taskForm>.date-time-fields+p.muted{display:none}
#taskForm .matrix-options,#taskForm .repeat-options{margin:16px 0 0;padding:0;border:0;gap:6px}
#taskForm .matrix-options legend,#taskForm .repeat-options legend{margin:0 0 7px}
#taskForm .matrix-options label,#taskForm .repeat-options label{margin:0;height:34px;min-height:34px;padding:5px 9px;border-radius:10px;border:1px solid #e7e0ef;background:#f5f2f9;color:#776982;font-size:11px;font-weight:400}
#taskForm .matrix-options label:has(input:checked),#taskForm .repeat-options label:has(input:checked),#taskForm .repeat-options label.is-selected{background:#eae3fb;border-color:#b8a7e6;color:#5943a0;font-weight:500}
#taskForm .formactions{margin:20px 0 0;padding-top:12px;border-top:1px solid #ebe5f1;gap:8px;min-height:40px}
#taskForm .formactions .icon{background:transparent;opacity:.75}
#taskForm .formactions .primary{margin-left:auto;min-height:36px;height:36px;padding:6px 15px;border-radius:11px;font-size:13px}
@media(max-height:700px){#taskDialog{padding:16px}#taskForm .task-dialog-header{margin-bottom:9px}#taskForm #taskDescription{height:68px;min-height:68px}#taskForm .matrix-options,#taskForm .repeat-options{margin-top:12px}#taskForm .formactions{margin-top:14px}}
/* Keep long task forms scrollable without a visible scroll track. */
#taskDialog,#taskForm{scrollbar-width:none}
#taskDialog::-webkit-scrollbar,#taskForm::-webkit-scrollbar{display:none;width:0;height:0}
/* Header and action footer remain outside the scrolling field area. */
#taskDialog{overflow:hidden;max-height:calc(100dvh - 28px)}
#taskDialog[open]{display:flex;flex-direction:column}
#taskForm{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;width:100%;max-height:calc(100dvh - 70px)}
#taskForm .task-dialog-header{flex-shrink:0;margin-bottom:10px}
#taskEditorFields{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:0 3px 3px;scrollbar-width:none}
#taskEditorFields::-webkit-scrollbar{display:none;width:0;height:0}
#taskForm .formactions{flex-shrink:0;margin-top:10px;padding-top:10px;background:#fcfbff}
#taskEditorFields>label[for=taskName]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#taskEditorFields>label{display:block;margin:14px 0 6px}
#taskEditorFields>.date-time-fields+p.muted{display:none}
