/* A shared, quiet focus treatment for every text-entry control. */
:root { --field-focus-edge: #b2b2ac; --field-focus-ring: #25252508; --text-selection: #e8e8e3; }
:root[data-theme="dark"] { --field-focus-edge: #696d69; --field-focus-ring: #ffffff0a; --text-selection: #343735; }
:root { --priority-high: #c44d52; --priority-medium: #b67c1c; --priority-normal: #858580; }
:root[data-theme='dark'] { --priority-high: #f08b8f; --priority-medium: #e4b05b; --priority-normal: #a0a39e; }
.priority-mark.priority-2 { color: var(--priority-high); }
.priority-mark.priority-1 { color: var(--priority-medium); }
.week-preview-meta .priority-badge { background: color-mix(in srgb, var(--priority-color) 10%, var(--surface)); color: var(--priority-color); }
.priority-badge-0 { --priority-color: var(--priority-normal); }
.priority-badge-1 { --priority-color: var(--priority-medium); }
.priority-badge-2 { --priority-color: var(--priority-high); }
.task-state-choices .schedule-mode-choice:has(input[name='priority'][value='0']) .choice-icon { color: var(--priority-normal); }
.task-state-choices .schedule-mode-choice:has(input[name='priority'][value='1']) .choice-icon { color: var(--priority-medium); }
.task-state-choices .schedule-mode-choice:has(input[name='priority'][value='2']) .choice-icon { color: var(--priority-high); }
::selection { background: var(--text-selection); color: var(--ink); }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select {
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  caret-color: var(--ink);
}
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])):focus,
textarea:focus, select:focus,
.task-form :is(input, textarea, select):focus,
.category-form > input:focus,
.plan-options select:focus {
  outline: none;
  outline-offset: 0;
  border-color: var(--field-focus-edge);
  background-color: var(--bg);
  box-shadow: 0 0 0 2px var(--field-focus-ring);
}
.search-field { border: 1px solid transparent; border-radius: 5px; padding: 0 8px; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.search-field:focus-within { border-color: var(--field-focus-edge); background: var(--bg); box-shadow: 0 0 0 2px var(--field-focus-ring); }
.quick-add { transition: border-color 160ms ease, box-shadow 160ms ease; }
.quick-add:focus-within { border-color: var(--field-focus-edge); box-shadow: 0 0 0 2px var(--field-focus-ring); }
.search-field input:focus, .quick-add input:focus { outline: none; box-shadow: none; background: transparent; }
.task-form input[name="title"]:focus, .task-form input[name="title"]:focus-visible {
  outline: none;
  border-bottom-color: var(--field-focus-edge);
  background: transparent;
  box-shadow: none;
}
.task-check:focus-visible { outline: 2px solid var(--field-focus-edge); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  input, textarea, select, .search-field, .quick-add { transition: none; }
}
/* Theme-aware dropdown menus replace platform blue selection colors. */
.select-control { display: block; position: relative; width: 100%; min-width: 0; }
.select-native { display: none !important; }
.select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 11px; font: inherit; font-size: 12px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.select-trigger > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.select-trigger .icon { width: 15px; height: 15px; color: var(--muted); }
.select-trigger:hover { border-color: var(--art-edge); background: var(--bg); }
.select-trigger:focus, .select-trigger:focus-visible { outline: none; border-color: var(--field-focus-edge); background: var(--bg); box-shadow: 0 0 0 2px var(--field-focus-ring); }
.select-popover { position: fixed; inset: auto; margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 5px 22px #00000012; overflow: auto; box-sizing: border-box; }
.select-popover [role='option'] { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; padding: 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font: inherit; font-size: 12px; }
.select-popover [role='option']:hover, .select-popover [role='option'].highlighted { background: var(--soft); }
.select-popover [aria-selected='true'] { font-weight: 500; }
.select-popover { overflow-x:hidden; overflow-y:auto; scrollbar-width:thin; }
.select-popover [role='option'] > span { min-width:0; }
.select-popover [role='option'] > span:not(.select-option-copy) { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.select-popover [role='option'] > .icon { flex-shrink:0; }
.select-popover [role='option'] .icon { width: 15px; height: 15px; color: var(--muted); }
input[type='date'] { color-scheme: light; }
:root[data-theme='dark'] input[type='date'] { color-scheme: dark; }
input[type='date']::-webkit-datetime-edit { color: var(--ink); }
input[type='date']::-webkit-datetime-edit-fields-wrapper { padding: 1px 0; }
input[type='date']::-webkit-datetime-edit-year-field:focus,
input[type='date']::-webkit-datetime-edit-month-field:focus,
input[type='date']::-webkit-datetime-edit-day-field:focus { background: var(--text-selection); color: var(--ink); border-radius: 3px; outline: none; }
input[type='date']::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
input[type='date']::-webkit-calendar-picker-indicator:hover { opacity: .9; }
.date-control { position: relative; display: flex; min-width: 0; }
.task-form .date-display { padding-right: 35px; }
.date-trigger { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 5px; display: flex; }
.date-trigger .icon { width: 16px; height: 16px; }
.date-trigger:hover { color: var(--ink); }
.date-popover { position: fixed; inset: auto; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); box-shadow: 0 5px 22px #00000012; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; font-size: 12px; }
.calendar-heading button { background: none; border: 0; padding: 5px; color: var(--muted); }
.calendar-heading .icon { width: 16px; height: 16px; }
.calendar-prev { transform: rotate(90deg); }
.calendar-next { transform: rotate(-90deg); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.calendar-weekday { font-size: 10px; color: var(--muted); padding-bottom: 7px; }
.calendar-grid button { border: 1px solid transparent; border-radius: 5px; background: none; color: var(--ink); padding: 8px 0; font: inherit; font-size: 11px; }
.calendar-grid button:hover { background: var(--soft); }
.calendar-grid .calendar-today { border-color: var(--art-edge); }
.calendar-grid .chosen { background: var(--ink); color: var(--surface); }
.calendar-actions { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.calendar-actions button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; padding: 4px; }
.schedule-times[hidden], .schedule-times label[hidden] { display: none; }
.task-form input[data-time] { padding-right: 35px; }
.time-popover { position: fixed; inset: auto; margin: 0; width: 230px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 5px 22px #00000012; }
.time-columns { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.time-columns > span { padding-bottom: 10px; }
.time-columns label { display: grid; gap: 8px; font-size: 11px; color: var(--muted); }
.task-row-date { max-width: 140px; white-space: normal; text-align: right; line-height: 1.7; }
.schedule-fields { display: grid; gap: 15px; }
.schedule-mode-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.schedule-mode-field legend { padding: 0; margin-bottom: 9px; font-size: 11px; color: var(--muted); }
.schedule-mode-options { display: grid; grid-template-columns: repeat(var(--choice-count, 3), minmax(0, 1fr)); gap: 4px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.task-state-choices { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr); gap: 14px; }
.choice-current { margin-left: 8px; font-size: 10px; color: var(--muted); }
.task-state-choices .schedule-mode-options { gap: 2px; }
.task-state-choices .schedule-mode-choice > span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 2px; }
.task-schedule-choices .schedule-mode-choice > span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 2px; }
.task-schedule-choices .schedule-mode-choice > span { gap: 7px; }
.choice-option-text { font-size: 12px; white-space: nowrap; }
@media (max-width: 380px) { .task-schedule-choices .schedule-mode-choice > span { gap: 4px; } .task-schedule-choices .choice-icon { width: 18px; height: 18px; } }
.choice-time-dot { transform-origin: 12px 12px; }
.choice-time-link, .choice-free-slash { stroke-dasharray: 1; stroke-dashoffset: 0; }
.task-schedule-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-free-ticks { animation: choice-ticks-fade 450ms ease; }
.task-schedule-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-free-slash { animation: choice-draw-check 350ms ease-out; }
.task-schedule-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-time-dot { animation: choice-dot-locate 450ms cubic-bezier(.2,.8,.2,1); }
.task-schedule-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-time-link { animation: choice-draw-check 450ms ease-out; }
.task-schedule-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-range-start { animation: choice-start-open 450ms cubic-bezier(.2,.8,.2,1); }
.task-schedule-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-range-end { animation: choice-end-open 450ms cubic-bezier(.2,.8,.2,1); }
@keyframes choice-ticks-fade { 0% { opacity: 1; } 50% { opacity: .15; } 100% { opacity: 1; } }
@keyframes choice-dot-locate { 0% { transform: scale(.25); } 65% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes choice-start-open { from { transform: translateX(5px); } to { transform: translateX(0); } }
@keyframes choice-end-open { from { transform: translateX(-5px); } to { transform: translateX(0); } }
.choice-icon { width: 22px; height: 22px; }
.choice-level { opacity: .2; transform-origin: 12px 19px; }
.choice-level.raised { opacity: 1; }
.choice-clock-hands, .choice-progress-ring, .choice-cancel-line { transform-origin: 12px 12px; }
.choice-check-stroke { stroke-dasharray: 1; stroke-dashoffset: 0; }
.task-state-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-level.raised { animation: choice-bar-rise 420ms cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--level) * 65ms); }
.task-state-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-clock-hands { animation: choice-clock-turn 500ms cubic-bezier(.2,.8,.2,1); }
.task-state-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-progress-ring { animation: choice-progress-turn 650ms cubic-bezier(.2,.8,.2,1); }
.task-state-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-check-stroke { animation: choice-draw-check 400ms ease-out; }
.task-state-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-cancel-line { animation: choice-line-open 350ms cubic-bezier(.2,.8,.2,1); }
@keyframes choice-bar-rise { from { transform: scaleY(.35); opacity: .25; } to { transform: scaleY(1); opacity: 1; } }
@keyframes choice-clock-turn { from { transform: rotate(-90deg); } to { transform: rotate(0); } }
@keyframes choice-progress-turn { 0% { transform: rotate(-130deg); } 75% { transform: rotate(12deg); } 100% { transform: rotate(0); } }
@keyframes choice-draw-check { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes choice-line-open { from { transform: scaleX(.1); opacity: .3; } to { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .task-state-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-icon * { animation: none; }
  .task-schedule-choices .schedule-mode-choice:is(:hover,:focus-within,:has(input:checked)) .choice-icon * { animation: none; }
}
.task-form .schedule-mode-choice { display: block; position: relative; cursor: pointer; }
.task-form .schedule-mode-choice input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.schedule-mode-choice > span { display: block; padding: 9px 4px; border: 1px solid transparent; border-radius: 4px; text-align: center; color: var(--muted); font-size: 12px; }
.schedule-mode-choice:hover > span { color: var(--ink); }
.schedule-mode-choice:has(input:checked) > span { background: var(--surface); border-color: var(--line); color: var(--ink); }
.schedule-mode-choice:has(input:focus-visible) > span { border-color: var(--field-focus-edge); box-shadow: 0 0 0 2px var(--field-focus-ring); }
.schedule-mode-choice:has(input:disabled) { opacity: .5; cursor: wait; }
.schedule-fields[hidden], .schedule-row[hidden] { display: none; }
.schedule-row { display: grid; gap: 8px; }
.schedule-row-label { font-size: 11px; color: var(--muted); }
.schedule-row-controls { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 9px; }
.task-form .schedule-row-controls label { display: block; min-width: 0; }
.schedule-row .date-display { font-size: 11px; }
.schedule-row input[data-time]::placeholder { font-size: 10px; }
.task-form { --form-error-color: #c04444; }
:root[data-theme='dark'] .task-form { --form-error-color: #f08b8b; }
.task-form .form-error { color: var(--form-error-color); }
.task-form input[data-time][aria-invalid='true'] { border-color: var(--form-error-color); }
.select-option-copy { display: flex; align-items: center; gap: 8px; min-width: 0; }
.select-option-copy > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.select-option-icon { display: inline-flex; flex-shrink: 0; }
.select-trigger .select-option-icon .icon, .select-popover .select-option-icon .icon { color: inherit; }

.subtasks-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; }
.subtasks-heading small { margin-left:6px; }
.subtask-edit-row { display:grid; grid-template-columns:20px minmax(0,1fr) 26px; align-items:start; gap:8px; padding:10px; margin-top:8px; border:1px solid var(--line); border-radius:6px; }
.subtask-leading { display:grid; justify-items:center; gap:9px; padding-top:7px; }
.subtask-leading button, .subtask-controls button { display:grid; place-items:center; width:24px; height:24px; border:0; border-radius:4px; background:transparent; color:var(--muted); padding:4px; }
.subtask-leading button:hover, .subtask-controls button:hover { background:var(--soft); color:var(--ink); }
.subtask-leading .subtask-drag { cursor:grab; }
.subtask-controls { display:grid; gap:2px; padding-top:3px; }
.subtask-controls [data-subtask-remove]:hover { color:var(--priority-high); }
.subtask-leading .icon, .subtask-controls .icon { width:14px; height:14px; pointer-events:none; }
.subtask-up-icon { transform:rotate(180deg); }
.task-form .subtask-edit-row .subtask-copy :is(input[data-subtask-title],textarea) { width:100%; min-height:32px; height:32px; margin:0; padding:6px 8px; font:inherit; font-size:12px; line-height:18px; }
.task-form .subtask-edit-row .subtask-copy textarea { resize:vertical; }
.subtask-copy { display:grid; gap:5px; min-width:0; }
.subtask-copy > label { display:block; min-width:0; }
.task-form input.subtask-completion { padding:0; width:15px; height:15px; margin:0; accent-color:var(--ink); }
.subtask-copy .person-mention-controls { margin:0; }
.subtask-copy .person-mention-hint, .subtask-copy .person-mention-links { display:none; }
.task-subtasks > .field-hint { margin:10px 0 0; line-height:1.6; }
.task-description-heading { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:6px 12px; }
.task-description-heading .person-mention-hint { margin:0; font-size:10px; }
.task-description-field .person-mention-links:empty { display:none; }
.task-form input.mention-styled { position:relative; z-index:1; display:block; color:transparent; caret-color:var(--ink); background:transparent; }
.task-form input.mention-styled::placeholder { color:var(--muted); }
.task-form input.mention-styled:focus { background:transparent; }
.subtask-edit-row.is-dragging { opacity:.45; }

.task-row > .task-check { align-self: flex-start; margin-top: 3px; }
.task-occasion > .occasion-symbol { align-self: flex-start; width: 16px; height: 16px; margin: 3px 3px 0; }
.task-occasion > .occasion-symbol .icon { width: 16px; height: 16px; }
.task-occasion .task-open { text-decoration: none; color: inherit; }
.task-row > .task-actions-placeholder { flex: 0 0 51px; width: 51px; height: 24px; }
.task-row > .task-category { align-self: flex-start; flex: 0 0 64px; width: 64px; min-width: 0; padding-top: 2px; font-size: 10px; line-height: 1.7; color: var(--muted); }
.task-row > .task-category > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta:empty { display: none; }
.task-row > .task-row-date { align-self: flex-start; padding-top: 2px; }
.task-title-line { display:flex; align-items:flex-start; gap:5px; min-width:0; }
.task-title-line .priority-mark { flex:0 0 18px; width:18px; height:21px; display:flex; align-items:center; justify-content:center; }
.task-title-line .task-title { min-width:0; }
.task-row { --task-title-indent: 0px; }
.task-row:has(.task-title-line > .priority-mark) { --task-title-indent: 23px; }
.task-copy { flex:1; min-width:0; }
.task-copy > .task-open { display:block; width:100%; }
.task-row .task-meta:not(:empty) { padding-left:0; align-items:center; }
.task-row > .task-row-actions { align-self: flex-start; margin-top: -2px; }
.task-row > .task-row-actions .text-button { width: 24px; height: 24px; padding: 4px; }
.task-meta > .task-subtask-list { display:contents; color:var(--muted); font-size:10px; }
.task-row:has(.task-subtask-list) { flex-wrap:wrap; }
.task-row > .task-subtask-panel { display:none; flex-basis:calc(100% - 33px); min-width:0; margin:0 0 0 33px; }
.task-row:has(.task-subtask-list[open]) > .task-subtask-panel { display:grid; }
.task-row .task-category-icon { width:18px; height:16px; justify-content:center; }
.task-row .task-category-icon .icon { width:15px; height:15px; }
.task-subtask-list > summary { display:flex; align-items:center; gap:5px; width:fit-content; padding:2px 0; cursor:pointer; list-style:none; background:transparent; line-height:16px; user-select:none; }
.task-subtask-list > summary::-webkit-details-marker { display:none; }
.task-subtask-list > summary:hover { color:var(--ink); }
.task-subtask-list > summary .icon { width:12px; height:12px; transform:rotate(-90deg); transition:transform 140ms ease; }
.task-subtask-list[open] > summary .icon { transform:rotate(0); }
.subtask-progress-count { color:inherit; font-variant-numeric:tabular-nums; }
.subtask-progress-count > span { color:var(--muted); }
.task-subtask-items { margin-top:10px; padding:0 0 0 12px; border-left:1px solid var(--line); display:grid; gap:2px; }
.task-subtask-item { display:flex; align-items:flex-start; gap:9px; padding:7px 6px; border-radius:4px; cursor:pointer; }
.task-subtask-item:hover { background:var(--soft); }
.task-subtask-item > span { min-width:0; color:var(--ink); font-size:12px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.task-subtask-item small { display:block; color:var(--muted); font-size:11px; line-height:1.6; margin-top:2px; }
.task-subtask-item input { width:14px; height:14px; margin:3px 0 0; accent-color:var(--ink); flex-shrink:0; cursor:pointer; }
.task-subtask-item input:checked + span .subtask-list-title { color:var(--muted); text-decoration:line-through; }


.plan-date-filter-range { display:grid; gap:10px; }
.plan-date-filter-range[hidden] { display:none; }
.plan-date-filter-range label { min-width:0; }
.plan-date-filter-range .field-hint { margin:0; font-size:10px; line-height:1.6; }
.plan-options-popover { max-height:calc(100dvh - 140px); overflow-y:auto; }

.task-form .recurrence-toggle { display:flex; align-items:center; gap:8px; }
.task-form .recurrence-toggle input { width:15px; height:15px; padding:0; accent-color:var(--ink); }
.recurrence-fields { margin-top:14px; }
.recurrence-fields[hidden], .recurrence-grid label[hidden], .task-schedule-choices[hidden] { display:none; }
.recurrence-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.recurrence-fields .field-hint { margin:12px 0 0; line-height:1.7; }
@media(max-width:540px) { .recurrence-grid { grid-template-columns:minmax(0,1fr); } }
.recurrence-position { display:grid; gap:8px; margin-top:14px; }
.recurrence-position-controls { display:flex; gap:12px; }
.recurrence-position-controls > label { flex:1; min-width:0; }
.recurrence-fields [hidden] { display:none !important; }
.recurrence-options .schedule-mode-choice > span { font-size:13px; }
/* Keep the task editor on one spacing and control-size rhythm. */
.task-modal-dialog .task-form { gap:20px; }
.task-modal-dialog .task-form label { gap:8px; line-height:1.5; }
.task-modal-dialog .task-form :is(input,select):not([type='hidden']):not([type='checkbox']):not([type='radio']):not([name='title']),
.task-modal-dialog .task-form .select-trigger { height:36px; box-sizing:border-box; padding-top:8px; padding-bottom:8px; font-size:12px; }
.task-modal-dialog .task-form .select-trigger { width:100%; }
.task-modal-dialog .schedule-mode-field legend { margin-bottom:8px; font-size:11px; line-height:1.5; }
.task-modal-dialog .schedule-mode-options { padding:3px; gap:4px; }
.task-modal-dialog .schedule-mode-choice > span { display:flex; align-items:center; justify-content:center; height:36px; min-height:36px; box-sizing:border-box; padding:6px 4px; font-size:12px; }
.task-modal-dialog .choice-current { font-size:10px; margin-left:8px; }
.task-modal-dialog .task-state-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.task-modal-dialog .task-recurrence { display:grid; gap:20px; min-width:0; }
.task-modal-dialog .recurrence-fields { display:grid; gap:16px; margin:0; }
.task-modal-dialog .recurrence-fields[hidden] { display:none; }
.task-modal-dialog .recurrence-grid { gap:12px; }
.task-modal-dialog [data-recur-position] { display:grid; gap:16px; }
.task-modal-dialog .recurrence-position { margin:0; gap:8px; }
.task-modal-dialog .recurrence-position > span { color:var(--muted); font-size:11px; line-height:1.5; }
.task-modal-dialog .recurrence-position-controls { gap:12px; align-items:start; }
.task-modal-dialog .recurrence-position-controls > label { flex:1 1 0; }
.task-modal-dialog .recurrence-fields .field-hint { margin:0; }
.task-modal-dialog .field-hint { font-size:10px; line-height:1.7; color:var(--muted); }
.task-modal-dialog .task-subtasks { display:grid; gap:10px; }
.task-modal-dialog .subtasks-heading { min-height:24px; font-size:11px; }
.task-modal-dialog .subtasks-heading .text-button { padding:4px 0 4px 6px; margin:0; font-size:11px; }
.task-modal-dialog .task-subtasks > .field-hint { margin:0; }
.task-modal-dialog .task-subtasks:not(:has(.subtask-edit-row)) > :is(.field-hint,[data-subtask-list]) { display:none; }
.task-modal-dialog .task-description-heading { min-height:17px; align-items:center; }
.task-modal-dialog .task-description-heading .person-mention-hint { line-height:1.5; }
.task-modal-dialog .task-description-field .person-mention-controls:empty { display:none; }
.task-modal-dialog .form-error:empty { display:none; }
.task-modal-dialog .editor-actions { padding-top:16px; }
@media(max-width:540px) {
  .task-modal-dialog .recurrence-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .task-modal-dialog .recurrence-position-controls { flex-wrap:wrap; }
  .task-modal-dialog .recurrence-position-controls > label { flex-basis:calc(50% - 6px); }
  .task-modal-dialog .recurrence-position-controls > label:last-child { flex-basis:100%; }
}
.task-modal-dialog .task-editor-section { display:grid; gap:18px; min-width:0; }
.task-modal-dialog .task-editor-section + .task-editor-section { border-top:1px solid var(--line); padding-top:20px; }
.task-modal-dialog .task-editor-section-title { margin:0; color:var(--ink); font-size:12px; line-height:1.5; font-weight:600; }
.task-modal-dialog .task-editor-section .task-recurrence { gap:18px; }
.task-modal-dialog .recurrence-fields { padding:0; border:0; background:transparent; }
.task-modal-dialog .recurrence-position > span { color:var(--ink); font-weight:500; }

.task-cycle-symbol { display:flex; flex:0 0 22px; width:22px; height:22px; align-items:center; justify-content:center; color:var(--muted); }
.task-cycle-symbol .icon { width:16px; height:16px; }
.task-cancelled .task-title { text-decoration:line-through; color:var(--muted); }
.task-cancelled-mark { flex:0 0 16px; width:16px; height:16px; margin:3px 3px 0; padding:0; border:0; background:transparent; color:var(--muted); display:flex; align-items:center; justify-content:center; cursor:pointer; align-self:flex-start; }
.task-cancelled-mark .icon { width:16px; height:16px; }
.task-cancelled-mark:hover { color:var(--ink); }
.task-project-link.project-priority-0 { color:var(--priority-normal); }
.task-project-link.project-priority-1 { color:var(--priority-medium); }
.task-project-link.project-priority-2 { color:var(--priority-high); }

.sync-conflict { margin:16px 0; padding:16px; border:1px solid var(--line); border-radius:12px; }
.sync-conflict h4 { margin:0; }
.sync-conflict label { display:grid; gap:8px; max-width:320px; }
[data-storage-form] select { width:100%; min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; }
.select-described .select-trigger { min-height:44px; padding:11px 13px; }
.select-described .select-option-copy, .select-popover-described .select-option-copy { display:flex; align-items:center; gap:10px; min-width:0; }
.select-described .select-option-icon, .select-popover-described .select-option-icon { display:flex; flex-shrink:0; }
.select-described .select-trigger > .icon { flex-shrink:0; transition:transform .15s; }
.select-described .select-trigger[aria-expanded='true'] > .icon { transform:rotate(180deg); }
.select-popover-described { padding:6px; border-radius:10px; }
.select-popover-described [role='option'] { min-height:64px; padding:11px 12px; border-radius:6px; }
.select-popover-described .select-option-text { display:grid; gap:5px; min-width:0; line-height:1.45; }
.select-popover-described .select-option-text small { color:var(--muted); font-size:11px; font-weight:400; white-space:normal; }
[data-storage-form] [data-remote]:not([hidden]), [data-storage-form] [data-local]:not([hidden]) { display:grid; gap:16px; }
[data-storage-form] [data-remote] label, [data-storage-form] [data-local] label { display:grid; gap:8px; }
.sync-versions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.sync-versions pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:260px; overflow:auto; font-size:12px; }
@media(max-width:540px) { .sync-versions { grid-template-columns:1fr; } }

.storage-settings { display:grid; gap:20px; width:100%; max-width:none; min-width:0; padding-bottom:32px; }
.storage-settings [hidden] { display:none !important; }
.storage-settings .storage-card { min-width:0; padding:24px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.storage-card-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.storage-settings .storage-card h2 { margin:0; font-size:14px; font-weight:500; line-height:1.5; }
.storage-card-heading p { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.storage-mode-badge { padding:4px 9px; border-radius:5px; background:var(--soft); color:var(--muted); font-size:11px; line-height:1.6; }
.storage-status-line { display:flex; align-items:flex-start; gap:12px; margin-top:22px; }
.storage-status-icon { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:9px; background:var(--soft); color:var(--muted); }
.storage-status-icon .icon { width:19px; height:19px; }
.storage-status-line.needs-attention .storage-status-icon { color:var(--priority-medium); }
.storage-status-line h3 { margin:0; font-size:14px; font-weight:500; line-height:1.6; }
.storage-status-line p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.storage-facts { display:grid; gap:12px; margin:20px 0 0; padding-top:18px; border-top:1px solid var(--line); font-size:12px; line-height:1.7; }
.storage-facts:empty { display:none; }
.storage-facts > div { display:grid; grid-template-columns:80px minmax(0,1fr); gap:12px; }
.storage-facts dt { color:var(--muted); }
.storage-facts dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.storage-path { font-family:ui-monospace,Consolas,monospace; font-size:11px; }
.storage-status-error { margin:16px 0 0; padding:10px 12px; border-radius:5px; background:var(--bg); color:var(--priority-high); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.storage-status-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; margin-top:20px; }
.storage-sync-notice { margin:14px 0 0; font-size:12px; line-height:1.7; color:var(--muted); overflow-wrap:anywhere; }
.storage-sync-notice:empty { display:none; }
.storage-settings .storage-config { gap:24px; }
.storage-settings .storage-field { display:grid; gap:8px; min-width:0; }
.storage-settings .storage-config [data-local]:not([hidden]) { gap:8px; }
.storage-settings .storage-field > label { display:grid; gap:9px; color:var(--ink); font-size:12px; line-height:1.5; }
.storage-settings .storage-field-hint { margin:0; color:var(--muted); font-size:11px; line-height:1.8; }
.storage-settings .storage-field input { box-sizing:border-box; font-size:12px; }
.storage-form-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding-top:18px; border-top:1px solid var(--line); }
.storage-notice { flex:1 1 220px; margin:0; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.storage-notice:empty { display:none; }
.storage-form-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; margin-left:auto; }
.storage-settings :is(.storage-status-actions,.storage-form-actions) button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:36px; font-size:12px; }
.storage-status-actions .icon { width:14px; height:14px; }
.storage-preview { padding:20px; border:1px solid var(--line); border-radius:7px; background:var(--bg); min-width:0; }
.storage-preview h3 { margin:0; font-size:13px; font-weight:500; }
.storage-preview-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0; }
.storage-preview-counts dt { color:var(--muted); font-size:11px; line-height:1.6; }
.storage-preview-counts dd { margin:6px 0 0; font-size:20px; font-variant-numeric:tabular-nums; }
.storage-settings .sync-conflict { background:var(--surface); border-radius:6px; margin-bottom:0; }
.storage-settings .sync-conflict h4 { font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.storage-settings .sync-conflict .field-hint { color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.storage-settings .sync-conflict label, .storage-settings .sync-versions { font-size:12px; }
.storage-settings .sync-versions summary { cursor:pointer; color:var(--muted); }
@media(max-width:540px) {
  .storage-settings { gap:16px; }
  .storage-settings .storage-card { padding:18px; }
  .storage-card-heading { gap:8px; }
  .storage-mode-badge { font-size:10px; }
  .storage-facts > div { grid-template-columns:64px minmax(0,1fr); gap:8px; }
  .storage-preview { padding:14px; }
  .storage-notice { flex-basis:100%; }
  .storage-preview-counts { gap:8px; }
}
