/* Task surfaces scroll within their own regions; the page keeps its normal vertical flow. */
.kanban-help {margin:0 0 10px;font-size:12px;color:var(--muted);}
.kanban-help>summary {cursor:pointer;min-height:36px;display:flex;align-items:center;gap:6px;}
.kanban-help>summary>.icon {width:15px;height:15px;transform:rotate(-90deg);}
.kanban-help[open]>summary>.icon {transform:none;}
[data-task-scale],.task-main,.task-materials,.task-tables,.typed-table-block {min-width:0;max-width:100%;}
[data-task-scale] .kanban-board,[data-task-scale] .task-table-wrap,.task-materials .typed-table-scroll {width:100%;max-width:100%;min-width:0;box-sizing:border-box;overscroll-behavior-inline:contain;}
[data-task-scale] .kanban-column {min-width:0;}
.task-selectable .task-card {height:auto;min-height:166px;padding-top:18px;}
.task-selectable.has-task-selection .card-tags {padding-inline-end:42px;min-height:28px;align-items:flex-start;}
.task-selectable .task-select {top:7px;right:9px;min-width:44px;min-height:44px;}
.task-selectable .task-select input {width:18px;height:18px;}
.task-selectable .task-card h2 {margin-top:2px;}
.kanban-column .task-selectable .task-card {padding-top:14px;}
.kanban-column .task-selectable .priority-pill {margin-inline-start:0;}
.kanban-column .kanban-status {margin-top:8px;}
.kanban-column .kanban-status select {width:100%;min-width:0;}
.task-main .assignee-menu {left:auto;right:0;}
.task-main .workspace-menu-panel,.task-main .assignee-menu {transform:translateX(var(--task-popup-shift,0px));}
.task-main .workspace-menu-panel {max-height:min(65dvh,420px);overflow:auto;overscroll-behavior:contain;}
.task-main .section-heading {min-width:0;}
.task-main .section-heading>h3,.task-main .section-heading>h4 {min-width:0;overflow-wrap:anywhere;}
.task-materials .typed-table .typed-row-actions,.task-materials .typed-table .typed-row-menu-heading {min-width:46px;width:46px;}
.task-materials .typed-table th[data-column] {min-width:150px;}
.task-materials .typed-table td [data-table-cell] {max-width:100%;}
.task-main .assignee-names {display:block;min-width:0;line-height:1.45;}
.task-main .work-form label.assignee-option {display:flex;align-items:center;flex-wrap:nowrap;gap:10px;margin:0;padding:8px;min-height:44px;}
.task-main .work-form label.assignee-option[hidden] {display:none;}

@media(max-width:850px) {
  .task-summary {min-width:0;gap:10px;}
  .task-summary .task-reminder {margin:4px 0;min-width:0;}
  .task-summary .task-personal-tools {display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
  .task-summary .task-personal-tools>details,.task-summary .task-personal-tools>form {min-width:0;width:100%;}
  .task-summary .reminder-panel>summary {width:100%;box-sizing:border-box;}
  .task-summary .reminder-settings {width:100%;max-width:100%;box-sizing:border-box;}
  .task-summary .reminder-settings .work-form {min-width:0;}
  .task-summary .reminder-presets {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .task-summary .reminder-presets .button {width:100%;white-space:normal;}
  .task-summary .task-personal-tools .button {min-height:44px;}
}

@media(max-width:700px) {
  [data-task-scale] .task-toolbar {gap:10px;align-items:flex-start;}
  [data-task-scale] .task-toolbar-left {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;flex-basis:100%;}
  [data-task-scale] .task-toolbar-left>.filter-disclosure {position:static;min-width:0;max-width:100%;}
  [data-task-scale] .task-toolbar-left>.filter-disclosure[open] {grid-column:1/-1;}
  [data-task-scale] .filter-disclosure>summary {width:100%;min-height:44px;box-sizing:border-box;justify-content:center;gap:7px;}
  [data-task-scale] .filter-disclosure .task-filters,[data-task-scale] .saved-views-panel {position:static;width:100%;max-width:none;box-sizing:border-box;margin-top:8px;max-height:min(70dvh,620px);padding:14px;border-radius:14px;}
  [data-task-scale] .filter-disclosure .task-filters {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:14px 10px;}
  [data-task-scale] .task-filters>.filter-search,[data-task-scale] .task-filters>.checkbox {grid-column:1/-1;}
  [data-task-scale] .task-filters .filter-search {min-width:0;}
  [data-task-scale] .task-filters label {font-size:12px;line-height:1.45;}
  [data-task-scale] .task-filters>.checkbox {display:flex;align-items:center;gap:8px;min-height:38px;}
  [data-task-scale] .task-filters>.button,[data-task-scale] .task-filters>.filter-reset {min-height:44px;display:flex;align-items:center;justify-content:center;margin:0;}
  [data-task-scale] .task-toolbar-left>.count-label {grid-column:1/-1;padding:0 2px;font-size:12px;}
  [data-task-scale] .view-switch {margin-left:auto;max-width:100%;}
  [data-task-scale] .view-switch>a {min-height:44px;}
  [data-task-scale] .saved-view-row {align-items:flex-start;gap:10px;flex-wrap:wrap;}
  [data-task-scale] .saved-view-row>a {min-width:0;flex:1 1 150px;}
  [data-task-scale] .saved-view-row>form {flex:0 0 auto;}
  [data-task-scale] .bulk-controls .bulk-selection {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:center;}
  [data-task-scale] .bulk-selection [data-selection-count] {grid-column:1/-1;white-space:normal;}
  [data-task-scale] .bulk-controls .button,[data-task-scale] .bulk-controls .text-button {min-height:44px;white-space:normal;}
  [data-task-scale] .bulk-hint {line-height:1.55;margin-top:14px;}
  .task-main .assignee-field {grid-column:1/-1;}
  .task-main .assignee-menu {position:static;width:100%;max-width:100%;min-width:0;box-sizing:border-box;transform:none;margin-top:8px;box-shadow:none;}
  .task-main .assignee-options {max-height:min(35dvh,260px);overscroll-behavior:contain;}
  .task-main .assignee-menu [data-assignee-search] {min-height:44px;}
  .task-main .assignee-option {min-height:44px;}
  .task-main .assignee-option [data-person-name] {min-width:0;flex:1;}
  .task-main .assignee-option input {flex:none;}
  .task-main .task-materials>.section-heading {display:flex;align-items:center;flex-wrap:wrap;gap:12px;}
  .task-main .material-actions {gap:8px;flex-wrap:wrap;}
  .task-main .material-actions .button,.task-main .material-actions summary.button {min-height:44px;}
  .task-main .checklist-block>.section-heading,.task-main .typed-table-block>.section-heading {display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;}
  .task-main .checklist-block>.section-heading>h4,.task-main .typed-table-block>.section-heading>h4 {flex:1 1 130px;}
  .task-main .table-view-toolbar {display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
  .task-main .table-view-toolbar>button,.task-main .table-view-toolbar .workspace-menu>summary {min-height:44px;}
  .task-main .table-view-toolbar .workspace-menu[open] {flex:1 1 100%;}
  .task-main .table-view-toolbar .workspace-menu-panel {position:static;transform:none;width:100%;max-width:none;box-sizing:border-box;margin-top:8px;box-shadow:none;}
  .task-main .table-view-toolbar .table-reset {margin-left:0;}
  .task-materials .typed-table-scroll {max-height:min(62dvh,480px);}
  .task-materials .typed-table th[data-column] {min-width:160px;}
  .task-materials .typed-table [data-table-cell] {min-height:44px;}
  .task-materials .table-editor-feedback {gap:6px 12px;line-height:1.5;}
  .task-materials .table-editor-hint {line-height:1.55;}
  .task-summary-card {min-width:0;box-sizing:border-box;}
  .task-summary-card>span {overflow-wrap:anywhere;line-height:1.4;}
  .task-main .task-choice-entry {gap:10px;align-items:flex-start;flex-wrap:wrap;}
  .task-main .task-choice-entry>span {min-width:0;flex:1 1 160px;overflow-wrap:anywhere;}
  .task-main .task-choice-entry>form {margin:0;}
  .task-main .restore-material {gap:10px;flex-wrap:wrap;}
}

@media(max-width:640px) {
  [data-task-scale] .kanban-board {grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:min(300px,calc(100vw - 56px));gap:12px;padding:3px 3px 16px;}
  [data-task-scale] .kanban-column {padding:10px;min-width:0;}
  [data-task-scale] .kanban-column-header {min-height:32px;padding-bottom:10px;}
  [data-task-scale] .kanban-column-header h2 {font-size:14px;overflow-wrap:anywhere;}
  [data-task-scale] .kanban-column-tasks {gap:12px;}
  [data-task-scale] .task-selectable .task-card {min-height:0;gap:9px;}
  [data-task-scale] .task-card h2 {font-size:16px;line-height:1.5;}
  [data-task-scale] .task-card .task-context {font-size:13px;line-height:1.5;}
  [data-task-scale] .task-card .card-assignees {margin-bottom:3px;}
  [data-task-scale] .task-card .card-foot {margin-top:4px;gap:12px;align-items:center;}
  [data-task-scale] .task-card .priority-pill,[data-task-scale] .task-card .status-pill {font-size:11px;}
  [data-task-scale] .task-table {min-width:850px;}
  [data-task-scale] .task-table-wrap {border-radius:16px;}
  [data-task-scale] .task-table .quick-status {max-width:210px;}
  .task-main .work-form input:not([type=checkbox]):not([type=radio]),.task-main .work-form select,.task-main .work-form textarea,[data-task-scale] .task-filters input:not([type=checkbox]),[data-task-scale] .task-filters select,.task-materials .typed-table [data-table-cell],.workspace-dialog .work-form input:not([type=checkbox]),.workspace-dialog .work-form textarea,.workspace-dialog .work-form select {font-size:16px;}
  .task-main .checklist-row {align-items:flex-start;gap:10px;}
  .task-main .checklist-row>span {padding-top:9px;line-height:1.6;min-width:0;}
  .task-main .checklist-row>.check-button {padding-top:0;}
  .task-main .add-item {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;}
  .task-main .add-item>.button {width:100%;margin:0;min-height:44px;}
  .workspace-dialog .dialog-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;}
  .workspace-dialog .dialog-actions>.button {width:100%;min-height:44px;white-space:normal;margin:0;}
}

@media(max-width:360px) {
  [data-task-scale] .filter-disclosure .task-filters {grid-template-columns:minmax(0,1fr);}
  [data-task-scale] .task-filters>* {grid-column:1;}
  [data-task-scale] .filter-disclosure>summary {padding:8px;font-size:12px;}
  [data-task-scale] .view-switch {width:100%;box-sizing:border-box;}
  [data-task-scale] .view-switch>a {flex:1;padding-inline:6px;}
  .task-summary {grid-template-columns:minmax(0,1fr);}
  .task-summary-card {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
  .task-summary-card>span {font-size:12px;margin:0;}
  .task-summary-card>strong {font-size:21px;}
  .task-summary-card>progress {flex-basis:100%;margin-top:0;}
  .task-summary .reminder-presets {grid-template-columns:minmax(0,1fr);}
}

@media(max-width:440px) {
  .task-list-heading {grid-template-columns:minmax(0,1fr);gap:10px;}
  .task-list-heading h1 {grid-column:1;grid-row:1;}
  .task-list-heading p {grid-column:1;grid-row:2;}
  .task-list-heading .heading-actions {grid-column:1;grid-row:3;margin:0;justify-content:flex-start;flex-wrap:wrap;}
}
