.task-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.task-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) repeat(3, minmax(150px, 0.42fr));
  gap: 12px;
  align-items: center;
}
.task-toolbar select,
.task-toolbar input,
.task-editor input,
.task-editor textarea,
.task-editor select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #f8f9fa;
  outline: none;
}
.task-toolbar select,
.task-toolbar input,
.task-editor input,
.task-editor select {
  height: 42px;
  padding: 0 12px;
}
.task-date-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.task-date-nav button {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #59615c;
  background: #fff;
  cursor: pointer;
}
.task-date-nav input {
  min-width: 0;
  width: 160px;
}
.task-board {
  padding-top: 8px;
}
.web-task-list {
  display: flex;
  flex-direction: column;
}
.web-task-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px minmax(190px, auto);
  gap: 22px;
  padding: 18px 2px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.web-task-row:first-child {
  border-top: 0;
}
.web-task-main {
  min-width: 0;
}
.web-task-main .data-meta {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-labels {
  display: flex;
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 6px;
}
.task-label {
  padding: 3px 8px;
  border-radius: 999px;
  color: #477060;
  background: #eaf7f0;
  font-size: 11px;
}
.task-label.tag {
  color: #6f6780;
  background: #f2eff7;
}
.web-task-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.web-task-time strong {
  color: var(--green);
}
.web-task-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.web-task-actions button {
  height: 32px;
  padding: 0 11px;
  border: 1px solid #cfe9db;
  border-radius: 10px;
  color: var(--action-secondary-text, #168e57);
  background: var(--action-secondary-bg, #f2fbf6);
  cursor: pointer;
}
.web-task-actions .danger-text {
  border-color: #f0d6d4;
  color: var(--danger);
  background: #fff7f6;
}
.task-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  padding: 30px;
  place-items: center;
  background: #16211c73;
  backdrop-filter: blur(4px);
}
.task-editor {
  width: min(720px, 100%);
  max-height: calc(100vh - 60px);
  padding: 26px;
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px #15241d45;
}
.task-editor > label {
  display: block;
  margin-top: 15px;
  color: #59615d;
  font-size: 12px;
}
.task-editor textarea {
  height: 92px;
  margin-top: 7px;
  padding: 11px;
  resize: vertical;
}
.task-editor > label > input {
  margin-top: 7px;
}
.task-editor-grid {
  display: grid;
  margin-top: 15px;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}
.task-editor-grid label {
  color: #59615d;
  font-size: 12px;
}
.task-editor-grid input,
.task-editor-grid select {
  margin-top: 7px;
}
.task-editor fieldset {
  margin: 17px 0 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.task-editor legend {
  padding: 0 6px;
  color: #59615d;
  font-size: 12px;
}
.task-editor .task-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-editor .task-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.task-editor-actions {
  display: flex;
  margin-top: 22px;
  justify-content: flex-end;
  gap: 10px;
}
.task-editor-actions .secondary-button {
  display: inline-block;
  margin: 0;
}
.task-editor-actions .primary-button {
  min-width: 130px;
}
@media (max-width: 1100px) {
  .task-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .web-task-row {
    grid-template-columns: minmax(220px, 1fr) 150px;
  }
  .web-task-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
}
@media (max-width: 760px) {
  .task-toolbar,
  .task-editor-grid {
    grid-template-columns: 1fr;
  }
  .web-task-row {
    grid-template-columns: 1fr;
  }
  .web-task-actions {
    grid-column: auto;
  }
  .task-date-nav {
    display: grid;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .task-date-nav input {
    width: 100%;
  }
  .task-date-nav #webTaskToday {
    width: 100%;
    grid-column: 1/-1;
  }
  .task-editor-backdrop {
    padding: 12px;
  }
}
.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.web-subtask-summary {
  display: flex;
  margin-top: 12px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.web-subtask-summary progress {
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  overflow: hidden;
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: var(--line);
}
.web-subtask-summary progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--line);
}
.web-subtask-summary progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--green);
}
.web-subtask-summary progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--green);
}
.web-subtask-list {
  display: grid;
  margin-top: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.web-subtask {
  display: flex;
  min-height: 34px;
  padding: 6px 9px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--card);
  text-align: left;
  cursor: pointer;
}
.web-subtask-indicator {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1.5px solid #bfc8c3;
  border-radius: 50%;
  color: #fff;
}
.web-subtask-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.web-subtask.completed { color: var(--muted); }
.web-subtask.completed .web-subtask-indicator { border-color: var(--action-primary-bg); background: var(--action-primary-bg); }
.web-subtask.completed .web-subtask-indicator::after {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: '';
  transform: rotate(45deg);
}
.web-subtask.completed .web-subtask-title { text-decoration: line-through; }
.web-subtask:disabled { cursor: default; opacity: 0.7; }
.web-task-actions button:disabled { cursor: not-allowed; opacity: 0.55; }
@media (max-width: 760px) {
  .web-subtask-list { grid-template-columns: 1fr; }
}

.task-editor-rich { width: min(1120px,calc(100vw - 64px)); max-height: calc(100dvh - 48px); padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; column-gap: 0; }
.task-editor-rich [hidden] { display: none!important; }
.task-editor-rich>.task-editor-head,.task-editor-rich>.task-upload-progress,.task-editor-rich>.task-editor-actions { grid-column: 1/-1; }
.task-editor-rich .task-editor-head { position: sticky; top: 0; z-index: 2; margin: 0; padding: 22px 26px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.task-editor-head h3,.task-editor-head p { margin: 0; }
.task-editor-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.task-form-section { margin: 16px 12px 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.task-editor-rich>.task-form-section:nth-of-type(odd) { margin-left: 26px; }
.task-editor-rich>.task-form-section:nth-of-type(even) { margin-right: 26px; }
.task-form-section>label { display: flex; margin-top: 14px; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; }
.task-form-section>label:first-child { margin-top: 0; }
.task-form-section summary { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-weight: 650; cursor: pointer; list-style: none; }
.task-form-section summary::-webkit-details-marker { display: none; }
.task-form-section summary span { color: var(--muted); font-size: 11px; font-weight: 400; }
.task-form-section[open] summary { margin-bottom: 14px; }
.task-section-title { margin-bottom: 12px; color: var(--ink); font-weight: 650; }
.task-segmented,.task-choice-row { display: flex; gap: 8px; }
.task-segmented label,.task-choice-row label { flex: 1; cursor: pointer; }
.task-segmented input,.task-choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.task-segmented span,.task-choice-row span { display: grid; min-height: 38px; padding: 0 12px; place-items: center; border-radius: 11px; color: var(--muted); background: var(--input-bg,#f6f8f7); }
.task-segmented input:checked+span,.task-choice-row input:checked+span { color: var(--green); background: var(--soft-green,#eaf7f0); font-weight: 650; box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--green) 35%,transparent); }
.task-member-grid { display: grid; margin-top: 14px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.task-member-card { position: relative; display: flex; min-width: 0; min-height: 70px; padding: 10px 34px 10px 10px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--input-bg,#f8f9fa); cursor: pointer; transition: border-color .15s,background .15s,transform .15s; }
.task-member-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb,var(--green) 45%,var(--line)); }
.task-member-card:has(input:checked) { border-color: var(--green); background: var(--soft-green,#eaf7f0); }
.task-member-card>input { position: absolute; opacity: 0; }
.task-member-avatar { display: grid; width: 42px; height: 42px; overflow: hidden; flex: 0 0 42px; place-items: center; border-radius: 50%; color: var(--green); background: var(--card); font-weight: 700; box-shadow: 0 0 0 2px var(--card); }
.task-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.task-member-copy { min-width: 0; }
.task-member-copy strong,.task-member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-member-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.task-member-check { position: absolute; right: 11px; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--card); }
.task-member-card:has(input:checked) .task-member-check { border-color: var(--green); background: var(--green); }
.task-member-card:has(input:checked) .task-member-check::after { position: absolute; top: 3px; left: 6px; width: 4px; height: 7px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; content: ''; transform: rotate(45deg); }
.task-weekdays { display: flex; margin-top: 14px!important; justify-content: space-between; }
.task-weekdays label { cursor: pointer; }
.task-weekdays input { position: absolute; opacity: 0; }
.task-weekdays span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--muted); background: var(--input-bg,#f6f8f7); }
.task-weekdays input:checked+span { color: #fff; background: var(--green); }
.task-attachment-head,.task-attachment-row,.task-rule-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-attachment-head small,.task-attachment-row small,.task-rule-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.task-file-button { display: inline-flex!important; height: 36px; margin: 0!important; padding: 0 14px; align-items: center; border-radius: 18px; color: var(--green)!important; background: var(--soft-green,#eaf7f0); cursor: pointer; }
.task-file-button input { display: none; }
.task-attachment-row { min-height: 58px; margin-top: 8px; padding-top: 8px; justify-content: flex-start; border-top: 1px solid var(--line); }
.task-attachment-row>span:nth-child(2) { min-width: 0; flex: 1; }
.task-attachment-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-attachment-row button { border: 0; color: var(--danger); background: transparent; font-size: 22px; cursor: pointer; }
.task-attachment-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 10px; color: var(--green); background: var(--soft-green,#eaf7f0); font-size: 11px; font-weight: 700; }
.task-rule-row { min-height: 62px; border-top: 1px solid var(--line); color: var(--ink)!important; cursor: pointer; }
.task-form-section>label.task-rule-row { margin-top: 0; flex-direction: row; align-items: center; }
.task-rule-row:first-of-type { border-top: 0; }
.task-rule-row>input[type=number],.task-rule-row>select { width: 160px; }
.task-switch { appearance: none; width: 44px!important; height: 24px!important; padding: 0!important; border: 0!important; border-radius: 999px!important; background: var(--line)!important; cursor: pointer; transition: background .15s; }
.task-switch::after { display: block; width: 20px; height: 20px; margin: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0002; content: ''; transition: transform .15s; }
.task-switch:checked { background: var(--green)!important; }
.task-switch:checked::after { transform: translateX(20px); }
.task-upload-progress { min-height: 20px; margin: 14px 26px 0; color: var(--muted); text-align: center; font-size: 12px; }
.task-editor-rich .task-editor-actions { position: sticky; bottom: 0; z-index: 2; margin-top: 8px; padding: 16px 26px 22px; background: linear-gradient(transparent,var(--card) 16px); }
@media (max-width: 900px) { .task-editor-rich { width: min(780px,100%); display: block; } .task-member-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .task-choice-row { display: grid; grid-template-columns: repeat(3,1fr); } .task-editor-rich>.task-form-section { margin-right: 14px; margin-left: 14px; } }
.task-view-tabs{display:flex;gap:8px;margin:18px 0 14px;padding:5px;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.task-view-tabs button{min-height:42px;padding:0 18px;border:0;border-radius:12px;background:transparent;color:var(--muted);font-weight:700;cursor:pointer}
.task-view-tabs button.active{background:var(--soft-green,#eaf7f0);color:var(--green);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--green) 18%,transparent)}
.task-history-groups{display:grid;gap:14px}.task-history-day{padding:18px}.task-template-grid{align-items:stretch}
.task-view-tabs+.task-toolbar:has(>label){grid-template-columns:minmax(220px,1.15fr) repeat(2,minmax(180px,.7fr)) auto;align-items:end}
.task-view-tabs+.task-toolbar:has(>label)>label{display:grid;gap:7px;color:var(--muted);font-size:12px}
.task-view-tabs+.task-toolbar:has(>label)>button{width:108px;margin:0;justify-self:end}
.task-view-tabs+.task-toolbar+.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:14px}
.task-history-day .web-task-row{grid-template-columns:minmax(0,1fr) 128px auto;gap:16px;padding:14px 0;align-items:start}
.task-history-day .web-task-main .data-meta{max-width:860px}
.task-history-day .web-subtask-list{gap:6px 10px}.task-history-day .web-subtask{min-height:32px;padding:5px 10px;background:var(--soft-bg)}
.task-history-day .web-task-actions{align-self:start}
.interaction-member-grid{margin-top:10px}
.interaction-card{display:grid;gap:12px;padding:20px 0;border-bottom:1px solid var(--line)}.interaction-card:last-child{border-bottom:0}
.interaction-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.interaction-card p{margin:0;color:var(--text);line-height:1.7}.interaction-amount{white-space:nowrap;color:var(--primary);font-size:18px}
.interaction-poll{display:grid;gap:8px;max-width:720px}.interaction-poll-option{display:flex;justify-content:space-between;gap:16px;width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);cursor:pointer}.interaction-poll-option.selected{border-color:var(--green);background:var(--soft-green,#eaf7f0)}
.interaction-replies{display:grid;gap:8px;padding:14px;border-radius:14px;background:var(--soft-bg)}.interaction-replies>div{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start}.interaction-replies span{color:var(--muted)}
.timetable-wrap{overflow:auto;padding:0}.school-table{width:100%;min-width:900px;border-collapse:separate;border-spacing:0}.school-table th,.school-table td{min-width:112px;padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);vertical-align:top}.school-table thead th{position:sticky;top:0;z-index:1;background:var(--card);color:var(--muted)}.school-table tbody th{background:var(--soft-bg);color:var(--muted);font-weight:600}.school-course{display:grid;gap:4px;width:100%;min-height:62px;padding:10px;border:1px solid color-mix(in srgb,var(--green) 20%,var(--line));border-radius:11px;background:var(--soft-green,#eaf7f0);color:var(--ink);text-align:left;cursor:pointer}.school-course small{color:var(--muted);line-height:1.35}.school-course.temporary{border-style:dashed}.school-course.empty{place-items:center;border-style:dashed;background:transparent;color:var(--muted);text-align:center}
@media(max-width:900px){.task-view-tabs+.task-toolbar:has(>label){grid-template-columns:repeat(2,minmax(0,1fr))}.task-view-tabs+.task-toolbar:has(>label)>button{width:100%;justify-self:stretch}.task-history-day .web-task-row{grid-template-columns:1fr}}
@media(max-width:720px){.task-view-tabs{overflow:auto}.task-view-tabs button{white-space:nowrap}.task-view-tabs+.task-toolbar:has(>label),.task-view-tabs+.task-toolbar+.stat-grid{grid-template-columns:1fr}.interaction-card-head{display:grid}.interaction-replies>div{grid-template-columns:1fr}.task-history-day{padding:14px}}
.family-summary{display:flex;align-items:baseline;gap:8px;padding:14px 20px;border:1px solid var(--line);border-radius:18px;background:var(--panel)}.family-summary strong{font-size:32px;color:var(--accent)}.family-summary span,.family-member-copy small{color:var(--muted)}.family-pending-panel{border-color:color-mix(in srgb,var(--accent) 35%,var(--line));background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 8%,var(--panel)),var(--panel))}.family-member-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.family-member-list{display:grid;gap:10px}.family-member-card{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:14px;min-height:86px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--soft-bg)}.family-member-card.pending{background:var(--panel)}.family-member-copy{min-width:0}.family-member-copy>div{display:flex;align-items:center;gap:8px}.family-member-copy strong{font-size:15px}.family-member-copy small{display:block;margin-top:7px}.family-member-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.family-member-actions select{width:auto;min-width:112px}.family-point-toggle{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px}.family-point-toggle input{width:18px;height:18px;accent-color:var(--accent)}@media(max-width:1100px){.family-member-grid{grid-template-columns:1fr}}@media(max-width:720px){.family-summary{display:none}.family-member-card{grid-template-columns:44px minmax(0,1fr)}.family-member-actions{grid-column:1/-1;justify-content:flex-start;padding-left:58px}}
