.monthly-area { margin: 24px 0; }
#monthly-entry { flex-shrink:0; }
.monthly-area [hidden], .monthly-dialog [hidden] { display:none !important; }
.m-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin:0 0 24px; }
.m-heading h2 { margin:0 0 5px; font-size:27px; }
.m-heading p { margin:0; }
.m-month { width:185px; margin:0; }
.m-tools { display:flex; align-items:end; gap:14px; flex-wrap:wrap; margin:16px 0; }
.m-tools .field { margin:0; flex:1; min-width:160px; }
.m-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.m-resident-card { min-width:0; min-height:124px; text-align:left; padding:20px; border:1px solid #d7e2d8; background:#fff; display:flex; flex-direction:column; align-items:flex-start; border-radius:7px; }
.m-resident-card strong { font-size:23px; font-weight:600; }
.m-resident-card span { margin-top:7px; overflow-wrap:anywhere; }
.m-small { font-size:13px; color:#77867e; }
.m-section { background:#fff; border:1px solid #d5e1d7; border-radius:7px; margin:0 0 23px; overflow:hidden; }
.m-section-head { padding:16px 21px; background:#eef4ef; display:flex; justify-content:space-between; gap:15px; align-items:start; }
.m-section-head h3 { margin:0; font-size:17px; font-weight:500; color:#567562; }
.m-section-head p { margin:4px 0 0; }
.m-badge { font-size:12px; background:#f5f7f3; padding:3px 8px; border:1px solid #e0e7df; border-radius:4px; white-space:nowrap; }
.m-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 14px; margin:0 21px; padding:16px 0; border-bottom:1px solid #e3eae1; }
.m-check { min-height:44px; display:flex; align-items:center; gap:13px; cursor:pointer; font-size:18px; font-weight:550; min-width:0; overflow-wrap:anywhere; }
.m-check input[type=checkbox] { width:21px; height:21px; min-height:21px; padding:0; margin:0; flex:0 0 21px; accent-color:#326a5d; }
.m-row.is-done .m-check { color:#708776; }
.m-row-meta { grid-column:1; margin:0 0 0 34px; font-size:12px; color:#809080; overflow-wrap:anywhere; white-space:pre-wrap; }
.m-row-actions { grid-column:2; grid-row:1/3; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.m-row-actions button { font-size:13px; }
.m-unconfirmed { padding:13px 21px; background:#fafbf7; display:flex; align-items:center; flex-wrap:wrap; gap:7px 12px; }
.m-unconfirmed p { margin:0; flex-basis:100%; }
.m-note { padding:16px 21px; background:#fbfcfa; border-top:1px solid #e5ebe2; }
.m-note .field { margin:0 0 9px; }
.m-note textarea { min-height:70px; }
.m-note details { margin-top:7px; }
.m-note summary { min-height:44px; padding:10px 0; cursor:pointer; font-size:13px; }
.m-history-entry { padding:2px 0 9px 13px; margin:10px 0; border-left:1px solid #cfddcf; }
.m-history-entry p { margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.m-group-actions { padding:8px 21px 13px; display:flex; justify-content:flex-end; }
.m-message:not(:empty) { margin:10px 0; padding:11px 13px; background:#fbf5e9; color:#856432; border:1px solid #e9ddbd; border-radius:5px; white-space:pre-wrap; }
.m-notice { padding:13px 16px; background:#f1f5ee; border:1px solid #dbe5d7; margin:12px 0; font-size:14px; }
.m-operation { margin:10px 21px; padding:12px; background:#fbf5e9; border:1px solid #e9ddbd; border-radius:5px; }
.m-operation p { margin:0 0 9px; white-space:pre-wrap; }
.m-operation button { margin-right:8px; margin-bottom:6px; }
.monthly-card { overflow-wrap:anywhere; }
.monthly-card .group-item-list { min-width:0; }
.monthly-card .group-item-list .task-tags { margin:3px 0 7px; }
.monthly-card .group-item-list .routine-assignees { margin-top:3px; }
.monthly-card .monthly-latest { margin-top:12px; }
.monthly-resident-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:18px; margin:17px 0; }
.monthly-resident-cards .m-resident-task-card { margin:0; }
.m-resident-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 18px; }
.m-applicable-rules { margin:16px 0; border:1px solid #d7e2d8; border-radius:9px; overflow:hidden; background:#fff; }
.m-applicable-rules-head { padding:18px 20px; background:#f3f7f1; border-bottom:1px solid #dce6dc; }
.m-applicable-rules-head h3,.m-applicable-rules-head p { margin:0; }
.m-applicable-rules-head h3 { font-size:21px; }
.m-applicable-rules-head p { margin-top:6px; }
.m-applicable-rule-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.m-applicable-rule-group { min-width:0; padding:17px 20px 9px; border-bottom:1px solid #e3eae3; }
.m-applicable-rule-group:nth-child(odd) { border-right:1px solid #e3eae3; }
.m-applicable-rule-group h4 { margin:0 0 7px; color:#536f5a; font-size:15px; font-weight:600; }
.m-applicable-rule { width:100%; min-height:48px; padding:10px 0; border:0; border-top:1px solid #edf1ec; border-radius:0; background:transparent; display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; box-shadow:none; }
.m-applicable-rule:first-child { border-top:0; }
.m-applicable-rule:hover,.m-applicable-rule:focus-visible { background:#f6f9f4; }
.m-applicable-rule strong { min-width:0; overflow-wrap:anywhere; color:#183f3e; font-size:16px; font-weight:550; }
.m-applicable-rule span { flex:0 0 auto; }
#monthly-detail-dialog { max-width:820px; }
#monthly-detail-body>.m-section { margin-top:16px; }
#monthly-detail-title { margin:7px 0 10px; font-size:26px; }
.monthly-history { padding:20px 21px 10px; }
.monthly-history .history-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.monthly-dialog { max-width:730px; }
.m-people { display:flex; gap:8px; flex-wrap:wrap; }
.m-person { flex:1; min-width:90px; }
.m-person[aria-pressed=true] { background:#e5f0e7; border-color:#77a287; box-shadow:inset 0 -3px #77a287; color:#315f43; font-weight:600; }
.m-dialog-steps { margin:13px 0; border-block:1px solid #dbe5de; padding:10px 0; }
.m-dialog-step { margin:5px 0; }
.m-rule { padding:12px 0; border-top:1px solid #e0e7df; }
.m-rule .field { margin:8px 0; }
.m-settings-status { margin:0 0 16px; }
.m-pending-label { color:#967443; }
.m-auto-note { margin:-10px 0 18px; color:#627a68; }
.m-settings-lead { margin:0 0 18px; color:#6e8174; line-height:1.7; }
.m-settings-identity { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:12px; margin-bottom:18px; }
.m-settings-identity .field { margin:0; }
.m-settings-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.m-settings-group { border:1px solid #d8e3da; border-radius:8px; overflow:hidden; min-width:0; }
.m-settings-group h3 { margin:0; padding:13px 15px; font-size:16px; background:#f4f7f2; border-bottom:1px solid #dfe7df; }
.m-setting-row { display:grid; grid-template-columns:minmax(0,1fr) 108px; gap:8px 12px; align-items:center; padding:11px 13px; border-top:1px solid #e5ebe3; }
.m-settings-group h3 + .m-setting-row { border-top:0; }
.m-setting-title { min-width:0; display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
.m-setting-title strong { overflow-wrap:anywhere; font-weight:500; }
.m-setting-title .m-pending-label { font-size:11px; }
.m-setting-row select { min-height:40px; margin:0; }
.m-setting-reason { grid-column:1/-1; margin:0; font-size:12px; }
.m-setting-reason input { margin-top:4px; }
.m-current-sync { margin:18px 0 0; padding:16px 18px; background:#fff8ea; border:1px solid #ead8aa; border-radius:8px; }
.m-current-sync h3 { margin:0 0 8px; font-size:18px; }
.m-current-sync p { margin:6px 0; }
.m-sync-choice { display:flex; align-items:center; gap:10px; margin:12px 0 8px; color:#315f50; }
.m-sync-choice input { width:20px; height:20px; min-height:20px; margin:0; flex:0 0 20px; accent-color:#326a5d; }
.m-settings-actions { display:flex; justify-content:flex-end; margin:16px 0 0; }
.m-settings-history { margin-top:18px; border-top:1px solid #dde6dd; }
.m-settings-history summary { min-height:44px; padding:14px 0 8px; cursor:pointer; color:#315f50; }
.m-settings-history ol { list-style:none; margin:0; padding:0; }
.m-settings-history li { display:grid; grid-template-columns:170px minmax(0,1fr); gap:12px; padding:12px 0; border-top:1px solid #edf1ec; }
.m-settings-history li p { margin:0; line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere; }
.m-settings-history-meta { display:flex; flex-direction:column; gap:3px; color:#728278; font-size:12px; }
.m-settings-history-meta strong { color:#4b6655; font-size:13px; }
@media(max-width:760px) { .m-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.monthly-resident-cards,.m-applicable-rule-groups { grid-template-columns:minmax(0,1fr); }.m-applicable-rule-group:nth-child(odd) { border-right:0; } }
@media(max-width:540px) {
 .m-heading { align-items:start; }.m-month { width:100%; }.m-month input { max-width:200px; }
 .m-grid { gap:10px; }.m-resident-card { padding:15px 12px; }.m-resident-card strong { font-size:21px; }
 .m-section-head { padding:13px 14px; flex-wrap:wrap; }.m-row { margin:0 14px; gap:4px 8px; }
 .m-check { font-size:17px; gap:10px; }.m-row-meta { margin-left:31px; }.m-row-actions { grid-row:1; }
 .m-row-actions button { padding:8px; font-size:12px; }.m-note { padding:14px; }.m-unconfirmed { padding:13px 14px; }
 .m-operation { margin:10px 14px; }.m-person { min-width:75px; }.m-tools>button { width:100%; }
 .monthly-history { padding:18px 14px 8px; }#monthly-detail-title { font-size:23px; }
 .m-settings-identity,.m-settings-groups { grid-template-columns:minmax(0,1fr); }
 .m-setting-row { grid-template-columns:minmax(0,1fr) 102px; padding:10px 11px; }
 .m-current-sync { padding:14px; }
 .m-settings-history li { grid-template-columns:minmax(0,1fr); gap:5px; }
 .m-applicable-rules-head,.m-applicable-rule-group { padding-inline:14px; }
}

/* V0.8: keep the original monthly dialog lifecycle, focus one original item. */
#monthly-detail-dialog { width:min(1120px,calc(100vw - 32px)); max-width:1120px; }
#monthly-detail-body { min-width:0; }
#monthly-detail-title { overflow-wrap:anywhere; }
.m-parent-summary { color:#68816e; font-size:14px; line-height:1.7; margin:0 0 12px; }
.m-focused-section { margin-top:16px; min-width:0; }
.m-focused-section>.m-operation { margin:10px 0; }
.m-focused-section .task-focus-shell { min-width:0; }
.m-current-item { min-width:0; }
.m-item-note { color:#617965; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; margin:0 0 24px; }
.m-current-arrangement { margin:24px 0 20px; }
.m-current-arrangement h3 { font-size:18px; margin:0 0 14px; }
.m-current-arrangement-box { padding:16px 18px; background:#f5f8f3; border:1px solid #dce6d8; border-radius:8px; display:flex; flex-wrap:wrap; gap:7px 18px; align-items:center; }
.m-current-arrangement-box p { flex-basis:100%; margin:0; font-size:15px; color:#647e69; overflow-wrap:anywhere; }
.m-current-arrangement-box button { margin-top:5px; }
.m-current-completion { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; padding:14px 0 20px; }
.m-current-completion>p { flex-basis:100%; margin:0; }
.m-focused-note { padding:22px 0; background:transparent; border-top:1px solid #e1e8df; }
.m-focused-note .field { font-size:16px; line-height:1.6; }
.m-focused-note textarea { min-height:116px; }
.m-focused-note .m-small { margin:8px 0 14px; line-height:1.7; }
.m-current-info,.m-common-records,.m-focused-history { padding:14px 0; border-top:1px solid #e1e8df; min-width:0; }
.m-current-info>summary,.m-common-records>summary,.m-focused-history>summary { cursor:pointer; min-height:44px; display:list-item; padding:10px 0; color:#526e5a; font-size:15px; }
.m-current-info .m-row-actions { display:flex; gap:10px; }
.m-current-meta { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.8; color:#708572; }
.m-common-records .history,.m-focused-history .history { margin-top:16px; }
.m-focused-section .history-label { flex-wrap:wrap; }
.m-focused-section .history-text,.m-focused-section .history-label { overflow-wrap:anywhere; }
.m-focused-section .m-common-records .m-focused-note { margin-top:20px; }
.monthly-resident-cards .monthly-card { height:auto; }
@media(max-width:600px) {
 #monthly-detail-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); padding:16px 12px; }
 #monthly-detail-title { font-size:24px; }
 .m-current-arrangement { margin-top:16px; }
 .m-current-arrangement-box { padding:13px; gap:7px; }
 .m-current-arrangement-box button { padding:9px 11px; }
 .m-focused-note .field { font-size:15px; }
 .m-focused-note textarea { min-height:100px; }
 .m-current-completion { gap:8px; }
 .m-focused-section .m-operation { margin-inline:0; }
}

/* Monthly settings V0.4: scope the overview and editor independently of task cards. */
.m-settings-directory{font-size:14px;line-height:1.6;min-width:0}
.m-settings-directory-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:20px 0}
.m-settings-directory-head h2{font-size:26px;margin:0 0 6px}.m-settings-directory-head p{margin:0;font-size:13px}
.m-settings-directory button{font-size:14px}.m-settings-save-notice{padding:10px 14px;background:#edf5e9;border:1px solid #cbdcc4;border-radius:6px}
.m-settings-table-tools{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:22px 0 16px}
.m-settings-table-filters{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap}.m-settings-table-filters .field{margin:0;font-size:13px}
.m-settings-table-filters input,.m-settings-table-filters select{font-size:14px;min-height:42px;padding:8px 12px;margin:5px 0 0}
.m-settings-table-filters input{width:240px;max-width:100%}.m-settings-table-tools p{margin:0 0 8px;font-size:12px}
.m-settings-table-card{border:1px solid #d8e3d8;border-radius:10px;overflow:hidden;background:#fff}
.m-settings-table-scroll{max-height:calc(100dvh - 306px);min-height:280px;overflow:auto;scrollbar-color:#bfd0bc #f5f8f1;scrollbar-width:thin}
.m-settings-table{width:100%;min-width:1260px;table-layout:fixed;border-spacing:0;border-collapse:separate;font-size:13px;line-height:1.6}
.m-settings-table col.m-name-col{width:118px}.m-settings-table col.m-state-col{width:94px}.m-settings-table col.m-action-col{width:110px}
.m-settings-table th,.m-settings-table td{padding:14px 8px;text-align:center;border-bottom:1px solid #e4ebe0;vertical-align:middle}
.m-settings-table thead th{background:#edf3e9;color:#617462;font-size:12px;font-weight:500;line-height:1.6;position:sticky;z-index:3}
.m-settings-table thead tr.m-settings-group-head th{top:0;height:38px;padding:8px}.m-settings-table thead tr.m-settings-item-head th{top:38px;height:66px;padding:8px 7px;background:#f6f8f3}
.m-settings-table .m-group-start{border-left:1px solid #dce6d8}.m-settings-table tbody tr{background:#fff}.m-settings-table tbody tr:nth-child(even){background:#fafcf8}.m-settings-table tbody tr:hover{background:#f0f5ec}
.m-settings-table tbody tr:last-child td,.m-settings-table tbody tr:last-child th{border-bottom:0}
.m-settings-table .m-name-cell{position:sticky;left:0;z-index:2;background:inherit;text-align:left;padding-left:16px;box-shadow:1px 0 #e1e8dc}
.m-settings-table thead .m-name-cell,.m-settings-table thead .m-action-cell{z-index:5;background:#edf3e9}
.m-settings-table .m-name-cell strong{display:block;font-size:14px;font-weight:550;overflow-wrap:anywhere}.m-settings-table .m-name-cell small{display:block;font-size:11px;font-weight:400;color:#748578;margin-top:3px;overflow-wrap:anywhere}
.m-settings-table .m-action-cell{position:sticky;right:0;z-index:2;background:inherit;box-shadow:-1px 0 #e1e8dc}
.m-settings-table .m-action-cell button{padding:4px 7px;font-size:13px;white-space:nowrap;min-height:34px}
.m-roster-state{white-space:nowrap;font-size:12px;color:#627d65}.m-roster-state.pending{color:#a77736}.m-roster-state.inactive{color:#7d887c}
.m-app-state{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:76px;min-height:28px;padding:2px 8px;border:1px solid;border-radius:5px;font-size:12px;line-height:1.5;font-weight:500;white-space:nowrap;vertical-align:middle}
.m-app-state-icon{display:inline-flex;align-items:center;justify-content:center;width:12px;flex:none;font-size:12px;font-weight:600}
.m-app-state.applicable{color:#326044;background:#e7f1e5;border-color:#c5d9c2}.m-app-state.not_applicable{color:#606a65;background:#edf0ed;border-color:#d6ddd7}.m-app-state.unconfirmed{color:#8a5815;background:#fff1d8;border-color:#e7c789}
.m-settings-table .m-settings-empty{text-align:center;padding:46px;color:#748578;font-weight:400}.m-settings-table-foot{font-size:12px;color:#748578;padding:12px 15px;border-top:1px solid #d8e3d8;background:#fafcf8}
#monthly-settings-dialog{width:min(1120px,calc(100vw - 32px));max-width:1120px;max-height:calc(100dvh - 36px);padding:0;overflow:hidden;font-size:14px;line-height:1.6}
#monthly-settings-dialog[open]{display:flex;flex-direction:column}#monthly-settings-dialog .dialog-top{padding:21px 24px 18px;margin:0;border-bottom:1px solid #d8e3d8;align-items:flex-start;flex:none}
#monthly-settings-title{margin:0;font-size:24px}#monthly-settings-context{margin:5px 0 0;font-size:13px}
#monthly-settings-body{padding:20px 24px;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}
#monthly-settings-dialog .m-settings-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#monthly-settings-dialog .m-settings-stack{display:flex;flex-direction:column;gap:14px;min-width:0}
#monthly-settings-dialog input,#monthly-settings-dialog select,#monthly-settings-dialog button{font-size:14px;line-height:1.5}
#monthly-settings-dialog input:not([type=checkbox]),#monthly-settings-dialog select{min-height:40px;padding:9px 11px;max-width:100%;margin:5px 0 0}
#monthly-settings-dialog .m-setting-row select{margin:0}#monthly-settings-dialog .field{font-size:13px}
#monthly-settings-dialog .m-settings-group h3{margin:0;padding:10px 14px;font-size:14px;background:#f0f5ec}
#monthly-settings-dialog .m-setting-row{padding:10px 14px;grid-template-columns:minmax(0,1fr) 112px;gap:6px 12px}
#monthly-settings-dialog .m-setting-title{margin:0;font-size:14px}#monthly-settings-dialog .m-setting-title strong{font-weight:400}
#monthly-settings-dialog .m-setting-reason summary{cursor:pointer;color:#6c7e6a;min-height:24px;font-size:12px;padding:3px 0;line-height:1.5}
#monthly-settings-dialog .m-setting-reason input{width:100%}#monthly-settings-dialog .m-current-sync{padding:12px 14px;background:#f8faf5;border-color:#d8e3d8;font-size:13px}
#monthly-settings-dialog .m-current-sync h3{font-size:14px;margin:0 0 8px}#monthly-settings-dialog .m-current-sync p{font-size:12px}
#monthly-settings-dialog .m-settings-history summary{font-size:13px;padding:10px 0;min-height:36px}#monthly-settings-dialog .m-settings-history{margin-top:14px}
#monthly-settings-dialog .m-settings-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 24px;border-top:1px solid #d8e3d8;background:#f8faf5;flex:none}
#monthly-settings-dialog .m-settings-footer p{margin:0;font-size:12px}#monthly-settings-dialog .m-settings-actions{margin:0;gap:10px}#monthly-settings-dialog .m-settings-actions button{min-width:90px;min-height:42px}
@media(max-width:760px){.m-settings-directory-head{gap:12px;flex-wrap:wrap}.m-settings-directory-head h2{font-size:23px}.m-settings-table-tools{align-items:stretch;flex-direction:column;gap:10px}.m-settings-table-filters{gap:12px}.m-settings-table-filters input{width:220px}.m-settings-table-tools p{margin:0}.m-settings-table-scroll{min-height:260px}.m-settings-table col.m-name-col{width:104px}.m-settings-table col.m-action-col{width:96px}.m-settings-table .m-name-cell{padding-left:10px}#monthly-settings-dialog .m-settings-groups,#monthly-settings-dialog .m-settings-identity{grid-template-columns:minmax(0,1fr)}#monthly-settings-dialog .dialog-top{padding:17px 16px 14px}#monthly-settings-title{font-size:21px}#monthly-settings-body{padding:16px}#monthly-settings-dialog .m-settings-footer{padding:12px 16px}#monthly-settings-dialog .m-settings-footer p{display:none}#monthly-settings-dialog .m-settings-actions{width:100%}#monthly-settings-dialog .m-settings-actions button{flex:1}}
/* Monthly completion table: scoped separately from long-term settings and cards. */
.m-completion-page { font-size:14px; padding:6px 0 20px; }
.m-completion-page > h2 { font-size:28px; margin:20px 0 8px; }
.m-table-nav { display:flex; gap:24px; align-items:center; }
.m-table-nav .text-button { padding:4px 0; }
.m-table-tools { display:flex; align-items:flex-end; flex-wrap:wrap; gap:16px 20px; margin:24px 0 16px; }
.m-table-tools .field { width:224px; margin:0; gap:8px; font-size:13px; }
.m-table-tools input { min-width:0; padding:9px 10px; font-size:14px; height:42px; }
.m-table-month-field { display:grid; gap:8px; }
.m-table-months { display:flex; gap:6px; }
.m-table-months button { width:32px; padding:6px; }
.m-table-months input { width:164px; }
.m-table-tools > .text-button { height:42px; }
.m-table-total { margin:0 0 10px auto; font-size:13px; color:var(--muted,#75877d); }
.m-completion-shell { border:1px solid #d7e2d4; border-radius:10px; overflow:hidden; background:#fff; }
.m-completion-scroll { overflow:auto; max-height:calc(100vh - 255px); min-height:170px; }
.m-completion-table { width:100%; min-width:1260px; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:13px; }
.m-completion-name-col { width:135px; }
.m-completion-progress-col { width:105px; }
.m-completion-table th,.m-completion-table td { padding:12px 8px; text-align:center; vertical-align:middle; border-bottom:1px solid #e0e8dc; }
.m-completion-table thead { position:sticky; top:0; z-index:4; }
.m-completion-table thead th { font-weight:400; color:#62776c; background:#edf3e8; height:42px; }
.m-completion-table thead tr:nth-child(2) th { background:#f5f8f1; line-height:1.7; height:65px; }
.m-completion-table .m-table-group-start { border-left:1px solid #dce6d6; }
.m-completion-table tbody tr { background:white; }
.m-completion-table tbody tr:nth-child(even) { background:#f9fbf6; }
.m-completion-table tbody td { height:76px; }
.m-completion-table .m-completion-name { position:sticky; left:0; z-index:2; text-align:left; background:inherit; border-right:1px solid #dce6d6; padding-left:18px; }
.m-completion-table thead .m-completion-name,.m-completion-table thead .m-completion-progress { z-index:5; background:#edf3e8; }
.m-completion-table .m-completion-progress { position:sticky; right:0; z-index:2; border-left:1px solid #dce6d6; background:inherit; }
.m-completion-table small { display:block; font-size:12px; font-weight:400; line-height:1.6; color:#77897b; margin-top:4px; }
.m-completion-table .m-table-name-link { padding:0; border:0; background:transparent; text-align:left; font-weight:600; font-size:16px; box-shadow:none; }
.m-table-cell { position:relative; display:flex; justify-content:center; align-items:center; min-height:46px; padding-bottom:10px; }
.m-table-chip { display:inline-flex; justify-content:center; align-items:center; gap:6px; min-width:88px; min-height:34px; border:1px solid #c8d9c2; border-radius:5px; padding:6px 10px; font-size:13px; font-weight:400; white-space:nowrap; background:white; color:#32664f; cursor:pointer; }
.m-table-chip input[type=checkbox] { width:14px; height:14px; min-height:0; margin:0; accent-color:#326c56; }
.m-table-chip.done { background:#e7f1e2; border-color:#c1ddba; }
.m-table-chip.not_applicable { background:#f0f2ee; border-color:#e0e5dc; color:#7a8980; }
.m-table-chip.unconfirmed { background:#fff4df; border-color:#f3c779; color:#98621a; }
.m-table-chip.deleted,.m-table-chip.missing,.m-table-chip.conflict { border-style:dashed; color:#8a968d; background:#fafcf8; }
.m-table-more { position:absolute; bottom:-4px; border:0; background:transparent; padding:0 5px; font-size:11px; min-height:20px; color:#617d6f; opacity:0; }
.m-table-cell:hover .m-table-more,.m-table-cell:focus-within .m-table-more { opacity:1; }
.m-completion-table .m-table-placeholder { text-align:left; padding:24px; font-weight:400; color:#7c8a80; }
.m-completion-table .m-table-uncertain { color:#a77321; }
.m-completion-foot { display:flex; justify-content:space-between; gap:12px; padding:12px 16px; font-size:12px; color:#7c8a80; background:#fafcf8; }
@media (hover:none) { .m-table-more { opacity:1; } }
@media (max-width:700px) {
  .m-completion-page > h2 { font-size:24px; }
  .m-table-tools { gap:12px; }
  .m-table-tools .field { width:min(100%,224px); }
  .m-table-total { flex-basis:100%; margin:0; }
  .m-completion-scroll { max-height:65vh; }
  .m-completion-name-col { width:116px; }
  .m-completion-table .m-completion-name { padding-left:12px; }
  .m-completion-table .m-completion-progress { position:static; }
  .m-table-more { opacity:1; }
  .m-completion-foot { flex-direction:column; }
  .m-completion-foot::after { content:"↔ 左右滑动查看全部项目"; }
}
