/* Bright accents carry identity; light surfaces keep long work sessions readable. */
:root {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #273248; background: #f7f8fc;
  --blue: #6842cc; --muted: #64748b; --line: #e7e9f2; --soft: #f0ebff;
  --tone: #7951dc; --tint: #f1ebff; --ink: #5a339f; --edge: #daccf9;
}
.tone-iris { --tone:#7951dc; --tint:#f1ebff; --ink:#5a339f; --edge:#daccf9; }
.tone-coral { --tone:#ed7254; --tint:#fff0e9; --ink:#a33b22; --edge:#f8cdbb; }
.tone-teal { --tone:#20a181; --tint:#e6f8f1; --ink:#136a55; --edge:#b6e8d7; }
.tone-blue { --tone:#4288e6; --tint:#eaf3ff; --ink:#225ba6; --edge:#c3dcff; }
.tone-rose { --tone:#df5e96; --tint:#fff0f6; --ink:#a12b60; --edge:#f4c5da; }
.tone-amber { --tone:#e9a52c; --tint:#fff5d9; --ink:#805910; --edge:#f1dfa4; }
.tone-lime { --tone:#80aa32; --tint:#f1f7df; --ink:#506b18; --edge:#d3e5ab; }
.tone-cyan { --tone:#239aac; --tint:#e5f7fa; --ink:#146475; --edge:#b7e3ea; }
.tone-grape { --tone:#ae61ca; --tint:#f8ecfc; --ink:#7a348f; --edge:#e9c9f3; }
.tone-peach { --tone:#e18a40; --tint:#fff2e5; --ink:#925016; --edge:#f2d5b5; }
.tone-independent { --tone:#8291aa; --tint:#eff3f8; --ink:#4a5f7b; --edge:#d5dfeb; }
.icon { width:17px; height:17px; display:inline-block; flex:0 0 auto; vertical-align:-3px; }
button { border-radius:9px; transition:background .15s, border-color .15s, box-shadow .15s; }
button:hover { border-color:#cfc8e7; background:#f5f1fe; }
button:disabled { cursor:not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline:3px solid #b7a1ef; outline-offset:3px; }
input, select, textarea { border-radius:9px; border-color:#dbe0ec; padding:10px 12px; font-size:14px; }
input:focus, select:focus, textarea:focus { outline:3px solid #eae2ff; border-color:#a084e2; }
label { color:#53627b; font-size:13px; }
.primary { background:#6842cc; border-color:#6842cc; box-shadow:0 3px 7px #6842cc18; }
.primary:hover { background:#5933b7; border-color:#5933b7; }
.primary .icon { color:inherit; }
.danger { background:#b63f4a; border-color:#b63f4a; color:#fff; box-shadow:0 3px 7px #b63f4a24; }
.danger:hover { background:#9d303c; border-color:#9d303c; }
.danger-quiet { color:#a93643; border-color:#edcbd0; background:#fff8f9; }
.danger-quiet:hover { color:#8f2733; border-color:#d99da6; background:#fff0f2; }
#confirm-dialog[data-danger=true] { border-color:#ecc8cd; }
#confirm-dialog[data-danger=true] #confirm-title { color:#9f303d; }
button .icon { margin-right:5px; }
.text-button { color:#6546b6; }
.actions button, .header-actions button, .dialog-actions button { display:inline-flex; gap:5px; align-items:center; justify-content:center; }
.actions button .icon, .header-actions button .icon, .dialog-actions button .icon { margin:0; }
.shell { grid-template-columns:218px minmax(0,1fr); }
.sidebar { padding:22px 14px 16px; border-right-color:#e8e8f1; }
.brand { margin:0 4px 25px; font-weight:700; font-size:16px; }
.brand-mark { background:#7046d5; box-shadow:4px 4px 0 #ead8ff; border-radius:12px; width:37px; height:37px; }
.brand-mark .icon { width:25px; height:25px; stroke-width:2.8; }
.brand small { letter-spacing:.5px; color:#728098; }
.sidebar nav { gap:4px; }
.sidebar nav button { padding:9px 12px; min-height:40px; border-radius:10px; color:#55647a; }
.sidebar nav button > span { display:grid; place-items:center; width:23px; height:23px; border-radius:7px; }
.sidebar nav button > span .icon { margin:0; width:18px; height:18px; }
.sidebar nav button[data-page=work] > span { color:#7450ce; }
.sidebar nav button[data-page=customers] > span { color:#d27434; }
.sidebar nav button[data-page=projects] > span { color:#258d7c; }
.sidebar nav button[data-page=independent] > span { color:#5682c2; }
.sidebar nav button[data-page=followup] > span { color:#cb5790; }
.sidebar nav button[data-page=calendar] > span { color:#478ed1; }
.sidebar nav button[data-page=timeline] > span { color:#9c5fbe; }
.sidebar nav button[data-page=personal] > span { color:#24876c; }
.sidebar nav button[data-page=notes] > span { color:#af801d; }
.sidebar nav button[aria-current=page] { background:#f0eaff; color:#643db9; }
.sidebar nav button[aria-current=page] > span { background:#e5d8ff; color:#6842cc; }
.sidebar nav i { color:#644bab; background:#e9e0fa; }
.sidebar-bottom { padding:18px 8px 0; gap:4px; }
.sidebar-bottom .icon { width:14px; height:14px; margin-right:7px; }
main { padding:28px 30px 22px; }
.page-header { margin-bottom:22px; }
h1 { display:flex; gap:11px; align-items:center; font-weight:700; font-size:27px; letter-spacing:0; }
.page-title-icon { width:39px; height:39px; display:grid; place-items:center; border-radius:12px; background:#eee6ff; color:#7346d0; }
.page-title-icon .icon { width:22px; height:22px; }
body[data-page=customers] .page-title-icon { background:#ffeddf; color:#b9682b; }
body[data-page=projects] .page-title-icon { background:#def5ec; color:#1e806a; }
body[data-page=followup] .page-title-icon { background:#fde8f1; color:#bb427c; }
.subtitle { color:#65758b; font-size:13px; }
.eyebrow { color:#687991; letter-spacing:.5px; }
.metrics { gap:14px; }
.metric { position:relative; border:1px solid var(--edge); background:var(--tint); padding:17px 19px; border-radius:14px; overflow:hidden; }
.metric .metric-label { color:var(--ink); font-size:12px; }
.metric .metric-symbol { position:absolute; top:14px; right:14px; width:32px; height:32px; display:grid; place-items:center; background:#ffffffb8; color:var(--ink); border-radius:10px; }
.metric-symbol .icon { width:18px; height:18px; }
.metric strong { font-size:31px; font-weight:700; color:#273248; line-height:1.2; padding-top:4px; }
.metric em { color:var(--ink); font-size:11px; }
.filters { gap:11px; }
.filters .search input { background:#fff; padding-left:15px; }
.chips { gap:5px; }
.chips button { display:inline-flex; align-items:center; color:#64748b; border:1px solid transparent; border-radius:9px; padding:7px 10px; }
.chips button .icon { width:13px; height:13px; margin-right:5px; }
.chips button.active { background:#eee6ff; color:#6236b6; border-color:#e0d3fb; }
.chips button[data-status=doing].active { background:#e7f1ff; color:#215da9; border-color:#c5dbf7; }
.chips button[data-status=waiting].active { background:#fff1cd; color:#805816; border-color:#edda9a; }
.chips button[data-status=done].active { background:#ddf5e9; color:#1a6c4f; border-color:#bce8d2; }
.chips button[data-status=paused].active { background:#efe8ff; color:#673ead; }
.task-grid { grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:16px; }
.task-card { border-radius:14px; padding:18px; border:1px solid var(--line); border-top:4px solid var(--tone); box-shadow:0 3px 12px #34426804; }
.task-card:hover { box-shadow:0 5px 20px #34426809; }
.card-top { font-size:11px; align-items:flex-start; }
.card-owner { display:flex; flex-wrap:wrap; align-items:center; gap:5px; color:#617089; }
.card-owner .icon { width:14px; height:14px; }
.shared-mark { color:#795b9e; border:1px solid #e6dcee; border-radius:5px; padding:0 4px; font-size:10px; }
.task-card > .task-name { font-size:15px; font-weight:650; }
.project-tags, .selected-projects { display:flex; flex-wrap:wrap; gap:6px; margin-top:11px; }
.project-tag { display:inline-flex; align-items:center; gap:4px; background:var(--tint); color:var(--ink); border:1px solid var(--edge); padding:3px 7px; border-radius:6px; font-size:11px; max-width:100%; overflow-wrap:anywhere; }
.project-tag .icon { width:12px; height:12px; }
.model-line { color:#64768f; font-size:11px; }
.card-note { color:#5f6d80; line-height:1.75; }
.card-progress { margin-top:12px; padding:10px 11px; border:1px solid #e5ddf7; border-radius:10px; background:#f8f5ff; }
.card-progress-head { display:flex; align-items:center; gap:5px; color:#79639c; font-size:10px; line-height:1.4; }
.card-progress-head .icon { width:13px; height:13px; flex:0 0 auto; }
.card-progress-head small { margin-left:auto; color:#9a8bab; font-size:10px; white-space:nowrap; }
.card-progress p { margin-top:6px; color:#46566e; font-size:12px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; max-height:3.4em; overflow:hidden; }
.followup-line { border-radius:7px; background:#fff5df; color:#825a20; padding:6px 8px; }
.followup-line .icon { width:13px; height:13px; margin-right:3px; }
.task-bottom > span { display:inline-flex; align-items:center; flex-wrap:wrap; gap:4px; color:#697a92; }
.task-bottom > span .icon { width:13px; height:13px; }
.badge { display:inline-flex; align-items:center; gap:4px; border-radius:6px; padding:3px 7px; font-size:11px; font-weight:500; color:#586b84; background:#eef2f8; }
.badge .icon { width:12px; height:12px; }
.state-backlog { background:#f0f2f7; color:#61718b; }
.state-todo { background:#eaf4ff; color:#326293; }
.state-doing { background:#e4efff; color:#245dae; }
.state-paused { background:#eee5ff; color:#7242b9; }
.state-waiting { background:#fff0c8; color:#875813; }
.state-done { background:#ddf5e8; color:#1e704f; }
.state-cancelled { background:#f0f1f4; color:#6b7280; }
.kind-tag { display:inline-flex; align-items:center; gap:4px; font-size:11px; padding:3px 7px; border-radius:6px; margin-top:9px; }
.kind-tag .icon { width:13px; height:13px; }
.kind-issue { color:#a03965; background:#fdebf3; }
.kind-milestone { color:#845819; background:#fff1d1; }
.tree > .branch { border-radius:14px; overflow:hidden; }
.branch > summary { align-items:center; }
.branch-symbol { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--tint); color:var(--ink); flex:0 0 auto; }
.customer-branch > summary .branch-symbol { color:#b9672d; background:#ffecdf; }
.project-branch { border-left:3px solid var(--tone); border-radius:9px; margin:7px 0; }
.project-branch > summary { background:var(--tint); border-radius:7px; }
.project-branch > summary:hover { background:var(--tint); }
.project-branch > summary .branch-symbol { background:#ffffffbc; }
.project-branch > .tree-body { margin-top:11px; }
.branch-title strong { font-size:15px; }
.branch-meta { color:#66758e; }
.tree-task .branch-title strong { font-weight:500; }
.task-description { color:#5f6f87; }
.independent-entry { border-radius:13px; background:#eff5ff; border-color:#d6e4f7; }
.independent-entry strong { color:#365d8c; }
.independent-entry p { color:#5d7593; }
.notice { background:#fff9e9; border-color:#f0e2ba; color:#7f642d; }
.form-help { color:#667891; }
dialog { border-radius:18px; border-color:#dfddeb; max-height:92vh; }
#editor { overflow-anchor:none; }
.dialog-head { padding:18px 23px; background:#fdfbff; }
.dialog-head h2 { font-weight:650; }
.editor-layout { grid-template-columns:minmax(0,1.85fr) minmax(245px,1fr); gap:24px; }
.editor-layout.single { max-width:770px; }
.field-label { display:inline-flex; align-items:center; gap:6px; }
.field-label .icon { width:14px; height:14px; color:#8a74b8; }
.form-grid { gap:15px; }
.field-details { border-radius:11px; background:#fcfdff; }
.scope-picker { padding:0; overflow:hidden; border-color:#ded8ec; background:#fff; }
.scope-picker > summary { display:flex; align-items:center; gap:8px; padding:13px 14px; color:#513879; font-weight:600; list-style:none; background:#f6f2ff; }
.scope-picker > summary::-webkit-details-marker { display:none; }
.scope-picker > summary small { margin-left:auto; font-size:10px; font-weight:400; color:#79688d; }
.scope-chevron { width:14px; height:14px; transition:transform .15s; }
.scope-picker[open] .scope-chevron { transform:rotate(90deg); }
#scope-browser { padding:14px; }
.scope-controls { display:grid; grid-template-columns:1fr 1.25fr; gap:10px; }
.scope-controls label { display:block; position:relative; font-size:12px; }
.scope-controls label > .icon { width:14px; height:14px; margin-right:4px; }
.scope-controls input, .scope-controls select { margin-top:6px; font-size:13px; padding:9px 10px; }
.scope-controls :disabled { background:#f5f6fa; color:#718098; opacity:1; cursor:not-allowed; }
.scope-selected { border:1px solid #e5ddf4; background:#faf7ff; padding:10px 11px; border-radius:9px; margin-top:12px; }
.scope-selected-head { display:flex; justify-content:space-between; align-items:center; gap:6px; flex-wrap:wrap; }
.scope-selected-head strong { font-size:11px; color:#674898; display:inline-flex; align-items:center; gap:4px; }
.scope-selected-head .icon { width:13px; height:13px; }
.scope-selected-head > span { font-size:11px; color:#7c6f90; }
.scope-selected-head button { font-size:11px; padding:1px 2px; }
.selected-projects { margin-top:8px; }
.selected-project { display:inline-flex; align-items:center; gap:5px; max-width:100%; background:var(--tint); border-color:var(--edge); color:var(--ink); border-radius:7px; padding:4px 7px; font-size:11px; text-align:left; }
.selected-project:hover { background:var(--tint); border-color:var(--tone); }
.selected-project span { overflow-wrap:anywhere; }
.selected-project .icon { width:12px; height:12px; margin:0; }
.selected-project .icon:last-child { width:11px; opacity:.7; }
.scope-list-head { display:flex; align-items:center; justify-content:space-between; gap:7px; margin:11px 0 7px; color:#617087; font-size:11px; }
.scope-list-head button { font-size:10px; padding:4px 7px; }
.scope-list-head .icon { width:12px; height:12px; }
.scope-results { max-height:238px; overflow:auto; scrollbar-gutter:stable; display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:2px; }
.scope-result-group { grid-column:1/-1; min-width:0; }
.scope-result-group + .scope-result-group { margin-top:7px; padding-top:10px; border-top:1px solid #ece8f3; }
.scope-result-group h4 { display:flex; align-items:center; gap:6px; margin:0 2px 7px; color:#60467f; font-size:11px; font-weight:650; }
.scope-result-group h4 .icon { width:13px; height:13px; }
.scope-result-group h4 span { margin-left:auto; color:#8792a4; font-size:10px; font-weight:400; }
.scope-group-options { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.scope-option { display:flex; align-items:center; gap:7px; padding:10px 8px; border:1px solid #e7eaf2; background:#fff; border-radius:9px; cursor:pointer; min-width:0; }
.scope-option:hover { border-color:var(--tone); background:var(--tint); }
.scope-option.is-selected { background:var(--tint); border-color:var(--tone); }
.scope-option input { width:16px; height:16px; flex:0 0 16px; margin:0; accent-color:var(--ink); cursor:pointer; }
.project-symbol { width:27px; height:29px; flex:0 0 auto; border-radius:8px; display:grid; place-items:center; color:var(--ink); background:var(--tint); }
.project-symbol .icon { width:16px; height:16px; }
.scope-option.is-selected .project-symbol { background:#ffffffb8; }
.scope-option-text { display:grid; gap:3px; min-width:0; }
.scope-option strong { color:#39465e; font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.scope-option small { font-size:10px; color:#64748b; display:flex; flex-wrap:wrap; gap:2px 4px; overflow-wrap:anywhere; }
.scope-option.is-disabled { opacity:.58; cursor:not-allowed; }
.scope-lock { padding:8px 10px; border:1px solid #f1dca9; background:#fff7e4; border-radius:8px; color:#815d23; font-size:11px; margin-bottom:8px; }
.scope-empty { display:grid; justify-items:center; text-align:center; gap:7px; padding:24px 13px; grid-column:1/-1; background:#f8f9fd; border-radius:9px; color:#63758f; }
.scope-empty > .icon { width:26px; height:26px; color:#a58acb; }
.scope-empty strong { font-size:12px; font-weight:500; }
.scope-empty span { font-size:11px; }
.scope-footnote { font-size:10px; color:#6b7b90; margin-top:11px; }
.scope-footnote .icon { width:12px; height:12px; margin-right:4px; }
.history { background:#fbfaff; border:1px solid #ebe5f5; border-radius:12px; padding:16px; }
.history h3 { color:#594177; font-weight:650; }
.history h3 .icon { width:15px; height:15px; margin-right:6px; }
.history-item { color:#52617b; border-color:#ece7f3; }
.history-item time { color:#727d91; }
.processing-log { position:relative; }
.processing-log[title] { cursor:help; }
.processing-log-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.processing-log-head time { margin:0; }
.processing-log-body { margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.log-edit-button { display:inline-flex; align-items:center; gap:3px; padding:3px 5px; opacity:.62; }
.log-edit-button .icon { width:12px; height:12px; margin:0; }
.processing-log:hover .log-edit-button, .log-edit-button:focus-visible { opacity:1; }
.log-edit-form { display:grid; gap:8px; }
.log-edit-form textarea { min-height:100px; }
.log-edit-actions { display:flex; justify-content:flex-end; gap:7px; }
.log-edit-error:empty { display:none; }
.session { border-left-color:#a085da; color:#63718a; }
.archive-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.dialog-actions { background:#fff; position:sticky; bottom:0; padding:12px 0; z-index:1; box-shadow:0 -8px 16px #ffffffed; }
.error { color:#a6303e; }
.calendar-item { background:var(--tint); color:var(--ink); border-left:2px solid var(--tone); }
.calendar-grid .day { min-width:0; cursor:pointer; }
.calendar-day-select { display:block; width:100%; padding:0; border:0; border-radius:4px; text-align:left; background:transparent; }
.calendar-day-select:hover { background:#ede7fa; }
.calendar-day-tasks .calendar-item { width:100%; text-align:left; font-size:10px; line-height:1.5; border:0; border-left:2px solid var(--tone); border-radius:3px; padding:2px 4px; background:var(--tint); color:var(--ink); }
.calendar-day-tasks .calendar-item:hover { background:var(--edge); }
.calendar-expand { display:inline-flex; align-items:center; gap:3px; padding:3px 5px; margin-top:4px; border:0; border-radius:5px; background:transparent; color:#78579f; font-size:11px; text-align:left; }
.calendar-expand:hover { background:#eee6fa; color:#543282; }
.calendar-expand .icon { width:12px; height:12px; margin:0; transform:rotate(-90deg); }
.calendar-expand-all { display:inline-flex; align-items:center; gap:5px; padding:7px 11px; border-color:#ded5ed; color:#684497; background:#fff; white-space:nowrap; }
.calendar-expand-all .icon { width:14px; height:14px; transform:rotate(90deg); }
.calendar-expand-all[aria-expanded=true] .icon { transform:rotate(-90deg); }
.calendar-weekend-options { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; padding:7px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.calendar-weekend-options label { display:flex; align-items:center; gap:6px; font-size:12px; cursor:pointer; white-space:nowrap; }
.calendar-weekend-options input { width:16px; height:16px; margin:0; accent-color:var(--blue); cursor:pointer; }
.calendar-days-5 .weekdays, .calendar-days-5 .calendar-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.calendar-days-6 .weekdays, .calendar-days-6 .calendar-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.calendar-visibility-hint { margin:8px 0; color:#766196; }
.day.selected { background:#f4f0ff; }
.day.today time { background:#eee5ff; color:#643dba; border-radius:5px; width:max-content; padding:0 4px; }
.personal-intro { display:flex; align-items:flex-start; gap:12px; margin-bottom:16px; padding:15px 17px; border:1px solid #ded4f1; border-radius:11px; background:#faf7ff; color:#4d3c6c; }
.personal-intro > .icon { width:23px; height:23px; margin-top:2px; color:#7650b5; }
.personal-intro strong { display:block; font-weight:600; }
.personal-intro p { margin:3px 0 0; color:#667187; }
.project-notes { margin:0 0 14px; padding:12px; border:1px solid #eadcb1; border-radius:10px; background:#fffbef; }
.project-notes-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; color:#725b23; }
.project-notes-head > span { display:inline-flex; align-items:center; gap:6px; font-weight:600; }
.project-notes-head small { color:#897a58; }
.project-note { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:9px 10px; border-top:1px solid #eee3c3; background:#fffdf7; }
.project-note:first-of-type { border-top:0; border-radius:8px 8px 0 0; }
.project-note:last-child { border-radius:0 0 8px 8px; }
.project-note.pinned { box-shadow:inset 3px 0 #e4a93f; }
.project-note > div:first-child { min-width:0; }
.project-note > div:first-child > span { color:#8b7957; }
.project-note p { margin:2px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; color:#3f4755; }
.project-note .actions { flex:0 0 auto; }
.note-project-picker { min-width:0; padding:12px; border:1px solid #e4ddf2; border-radius:10px; background:#fbf9ff; }
.note-project-picker > .form-help { margin:2px 0 10px; }
.note-project-picker .scope-results { max-height:280px; }
.note-project-selected { margin-top:10px; }
.selected-note-project { display:flex; align-items:center; gap:9px; margin-top:8px; padding:9px 10px; border:1px solid var(--edge); border-radius:8px; background:var(--tint); color:var(--ink); }
.selected-note-project > .icon { width:18px; height:18px; color:var(--tone); }
.selected-note-project span { display:grid; min-width:0; }
.selected-note-project strong { font-weight:600; overflow-wrap:anywhere; }
.selected-note-project small { color:#657187; }
@media (min-width:1550px) { .task-grid { grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); } }
@media (max-width:1050px) {
  .shell { grid-template-columns:185px minmax(0,1fr); }
  main { padding:23px 20px; }
  .editor-layout { grid-template-columns:1fr; }
  .history { padding:16px; }
  .metric { padding:14px; }
  .metric .metric-symbol { width:27px; height:27px; right:10px; top:10px; }
  .metric .metric-label { max-width:calc(100% - 27px); }
}
@media (max-width:700px) {
  .project-notes-head, .project-note { align-items:flex-start; flex-direction:column; }
  .project-note .actions { align-self:flex-end; }
}
@media (max-width:700px) {
  .shell { display:block; }
  .sidebar { padding:12px; }
  .brand { margin:0 4px 14px; }
  .sidebar nav button { min-height:38px; padding:7px 10px; }
  .sidebar nav button > span { display:grid; width:17px; height:19px; }
  .sidebar nav button > span .icon { width:16px; height:16px; }
  main { padding:18px 14px; }
  .page-title-icon { width:30px; height:30px; border-radius:9px; }
  .page-title-icon .icon { width:18px; height:18px; }
  h1 { font-size:22px; gap:7px; }
  .header-actions { flex-wrap:wrap; justify-content:flex-end; max-width:145px; }
  .header-actions button { font-size:11px; padding:7px 8px; }
  .header-actions .icon { width:13px; height:13px; }
  .subtitle { font-size:12px; }
  .metrics { gap:9px; }
  .metric { padding:12px; border-radius:12px; }
  .metric strong { font-size:27px; }
  .metric .metric-label { font-size:11px; }
  .task-grid { grid-template-columns:1fr; }
  .task-card { padding:15px; }
  .branch-symbol { width:26px; height:27px; border-radius:8px; }
  .branch-symbol .icon { width:15px; height:15px; }
  .branch-title strong { font-size:14px; }
  .scope-controls { grid-template-columns:1fr; }
  .scope-results, .scope-group-options { grid-template-columns:1fr; }
  .scope-results { max-height:240px; }
  .scope-picker > summary small { display:none; }
  .scope-picker > summary .scope-chevron { margin-left:auto; }
  #scope-browser { padding:11px; }
  .scope-option strong { font-size:13px; }
  .scope-option small { font-size:11px; }
  .scope-controls input, .scope-controls select { font-size:16px; }
  .scope-list-head { flex-wrap:wrap; }
  .scope-selected-head > span { font-size:10px; }
  .dialog-head { padding:15px; }
  .dialog-actions { bottom:0; }
}
@media (pointer:coarse) { input, select, textarea { font-size:16px; } .scope-option { min-height:50px; } .selected-project { min-height:36px; } }
@media (prefers-reduced-motion:reduce) { * { transition:none!important; } }

/* Task details: context first, daily actions next, secondary fields on demand. */
.task-detail-layout { align-items:start; }
.task-primary { display:grid; gap:14px; }
.dialog-head h2 { max-width:900px; overflow-wrap:anywhere; line-height:1.45; }
.dialog-head h2:focus { outline:none; }
.scope-overview > summary { display:block; padding:12px 14px; background:#f8f5ff; }
.scope-overview-top { display:flex; align-items:center; gap:7px; color:#6a5387; font-size:11px; font-weight:400; }
.scope-overview-top > .icon { width:15px; height:15px; }
.scope-edit-label { margin-left:auto; display:inline-flex; align-items:center; gap:3px; color:#704cac; font-size:11px; }
.scope-edit-label .icon { width:13px; height:13px; }
.scope-overview[open] .scope-edit-label .icon { transform:rotate(90deg); }
.scope-overview-models { display:block; margin-top:10px; }
.scope-model { display:grid; grid-template-columns:1.1fr 1fr 1fr; gap:9px; align-items:center; color:#35405a; }
.scope-model strong { font-size:16px; overflow-wrap:anywhere; line-height:1.4; }
.scope-model > span { display:grid; gap:2px; min-width:0; }
.scope-model em { font-size:10px; color:#75819a; font-style:normal; font-weight:400; }
.scope-model b { font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.scope-overview-models.multiple { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.multiple .scope-model { display:grid; grid-template-columns:1fr; gap:6px; padding:9px; border-radius:8px; border:1px solid var(--edge); background:var(--tint); }
.multiple .scope-model strong { font-size:13px; color:var(--ink); }
.multiple .scope-model > span { display:flex; flex-wrap:wrap; gap:2px 7px; }
.multiple .scope-model b { font-size:11px; }
.scope-extra { display:block; font-size:11px; font-weight:400; color:#7c6f90; margin-top:8px; }
.scope-overview > .form-help { padding:0 14px 10px; }
.scope-independent { padding:12px 14px; border-radius:10px; background:#edf4fc; color:#4b6b94; font-size:13px; }
.daily-status { grid-template-columns:1fr 1.2fr .8fr; gap:10px; }
.daily-followup { grid-template-columns:1.7fr 1fr; gap:10px; }
.task-primary label { font-size:12px; gap:5px; }
.task-primary input, .task-primary select { padding:8px 10px; font-size:13px; }
.waiting-panel { padding:12px 13px; border:1px solid #ecdfbf; background:#fffcf4; border-radius:12px; display:grid; gap:9px; }
.panel-title { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.panel-title h3 { font-size:13px; font-weight:650; color:#876322; }
.panel-title h3 .icon { width:15px; height:15px; margin-right:5px; }
.panel-title .text-button { font-size:10px; padding:2px; color:#8a7248; }
.panel-title .text-button .icon { width:12px; height:12px; }
.dependency-message, .dependency-card-hint { display:flex; align-items:flex-start; gap:6px; padding:8px 9px; border-radius:8px; font-size:11px; line-height:1.6; }
.dependency-message .icon, .dependency-card-hint .icon { width:14px; height:14px; margin-top:2px; }
.dependency-message.blocked, .dependency-card-hint.blocked { background:#fff0ce; color:#875d1b; }
.dependency-message.ready, .dependency-card-hint.ready { background:#e4f5eb; color:#277453; }
.dependency-card-hint { margin-top:10px; }
.dependency-card-hint span { overflow-wrap:anywhere; }
#dependency-selected { display:grid; gap:6px; }
#dependency-selected:empty { display:none; }
.prerequisite-row { display:flex; align-items:center; gap:8px; padding:9px; border:1px solid #e8dfc9; background:#fff; border-radius:9px; min-width:0; }
.dependency-marker { width:25px; height:25px; border-radius:7px; display:grid; place-items:center; flex:0 0 auto; background:#fff2d9; color:#a77923; }
.dependency-marker .icon { width:14px; height:14px; }
.dependency-marker.resolved { background:#e5f5eb; color:#318262; }
.prerequisite-row > div { min-width:0; flex:1; }
.prerequisite-row .task-name { font-size:12px; font-weight:600; color:#566a9b; }
.prerequisite-row small { display:block; font-size:10px; color:#75829a; margin-top:2px; overflow-wrap:anywhere; }
.prerequisite-row .badge { font-size:10px; flex-shrink:0; }
.dependency-remove { border:0; padding:3px; background:transparent; color:#8c93a2; }
.dependency-remove .icon { width:13px; height:13px; margin:0; }
.dependency-picker { border:1px dashed #dcd0b2; background:#fffefa; border-radius:8px; padding:8px 10px; }
.dependency-picker > summary { display:flex; align-items:center; gap:5px; list-style:none; cursor:pointer; font-size:11px; color:#8b692c; }
.dependency-picker > summary::-webkit-details-marker { display:none; }
.dependency-picker > summary .icon { width:13px; height:13px; }
.dependency-picker > summary span { margin-left:auto; font-size:10px; color:#998565; }
.dependency-filters { display:grid; grid-template-columns:1fr 1.3fr; gap:9px; margin:11px 0 7px; }
.dependency-filters label { font-size:11px; }
#dependency-result-count { font-size:10px; margin:6px 0; }
#dependency-results { max-height:240px; overflow:auto; display:grid; gap:5px; }
.dependency-option { display:flex; align-items:center; gap:8px; border:1px solid #e9e4d9; border-radius:8px; padding:8px; cursor:pointer; background:#fff; }
.dependency-option.selected { border-color:#bda465; background:#fff8e5; }
.dependency-option.disabled { opacity:.6; cursor:not-allowed; }
.dependency-option input { width:15px; height:15px; flex:0 0 auto; accent-color:#957228; }
.dependency-option > span { flex:1; min-width:0; }
.dependency-option strong { font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.dependency-option small { display:block; color:#7b8392; font-size:10px; margin-top:3px; }
.dependency-option .badge { flex:0 0 auto; font-size:10px; }
.editor-secondary { border:1px solid #e5e7ef; border-radius:10px; padding:11px 12px; background:#fcfdff; }
.editor-secondary > summary { display:flex; align-items:center; gap:6px; font-size:12px; color:#65718a; cursor:pointer; list-style:none; }
.editor-secondary > summary .icon { width:14px; height:14px; }
.editor-secondary > summary span { font-size:10px; color:#808ca0; margin-left:auto; max-width:55%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.editor-secondary > .form-grid { margin-top:12px; }
.editor-secondary[open] > summary { color:#694f95; }
.actual-details { margin-top:15px; font-size:11px; color:#7b8495; }
.actual-details > .form-grid { margin:9px 0; }
.history .processing-records h3 { font-size:14px; }
.processing-records .log-list { max-height:230px; overflow:auto; }
.history .empty-logs { padding:10px 0; font-size:11px; }
.history .history-section { margin-top:16px; padding-top:13px; border-top:1px solid #e9e2f2; }
.history-section > summary { display:flex; align-items:center; gap:6px; font-size:12px; color:#685085; font-weight:500; }
.history-section > summary .icon { width:14px; height:14px; }
.history-section > summary::before { content:'›'; font-size:16px; font-weight:400; }
.history-section[open] > summary::before { transform:rotate(90deg); }
.history-section .prerequisite-row { margin-top:8px; flex-wrap:wrap; }
@media(max-width:1050px) { .task-detail-layout .history { margin-top:0; } }
@media(max-width:700px) {
  .daily-status { grid-template-columns:1fr 1fr; }
  .daily-status > label:last-child { grid-column:1/-1; }
  .daily-followup { grid-template-columns:1fr; }
  .scope-model { grid-template-columns:1fr 1fr; }
  .scope-model > strong { grid-column:1/-1; }
  .scope-overview-models.multiple { grid-template-columns:1fr; }
  .multiple .scope-model { grid-template-columns:1fr 1fr; }
  .multiple .scope-model > span { display:grid; }
  .dependency-filters { grid-template-columns:1fr; }
  .prerequisite-row { flex-wrap:wrap; }
  .prerequisite-row > div { flex-basis:60%; }
  .task-primary input, .task-primary select { font-size:16px; }
  .editor-secondary > summary span { display:none; }
}
