/* Business workspace; existing dialogs and scoring controls retain their IDs. */
.w-shell{--text-primary:#263e38;--text-secondary:#52685e;--border-color:#d2dfd8;--accent-blue:#16765f;--bg-surface:#fff}
.w-shell .fim-assist-mode,.w-shell .fim-check-mode{background:#eef3f0;color:#263e38;border-color:#d2dfd8}
.w-shell .btn-primary{background:#176957;border-radius:6px}.w-shell .btn-secondary{color:#176957;background:#fff;border-color:#b8cdc2;border-radius:6px}
.w-shell .score-panel .panel-header{display:none}.w-shell .fim-mode-switch{background:#e4ebe7}
.w-shell .fim-assist-note,.w-shell .fim-assist-option,.w-shell .fim-check-option{color:#3e574c}
.w-shell .fim-assist-note{--text-muted:#52685e}.w-shell .fim-item-locomotion{grid-column:1/-1}.w-shell .locomotion-score-grid .w-ratings{flex-direction:row}
.w-shell .fim-check-list,.w-shell .fim-assist-list{max-height:none}.w-shell #w-entry-main .fim-item>label{font-size:13px;font-weight:600}
.w-shell .score-panel .score-header{display:none}.w-shell #w-entry-meta .panel{margin-bottom:0}.w-shell .score-panel .score-actions{margin-top:0!important}.w-shell #w-save-bar .assessment-save-actions button{width:auto;flex:1;min-width:120px}.w-shell #w-save-bar .assessment-save-actions{width:330px;max-width:100%;flex-wrap:nowrap}
body:has(#screen-dashboard:not(.hidden)) .toast{top:12px;bottom:auto;right:12px;max-width:calc(100vw - 24px);font-size:13px;pointer-events:none}
@media(max-width:700px){.w-shell .w-sidebar{display:grid;grid-template-columns:1fr auto}.w-shell .w-sidebar nav{grid-column:1/-1;grid-row:2}.w-shell .w-sidebar>.w-button{font-size:11px;padding:6px;min-height:32px}.w-shell .w-sidebar>.w-button:last-child{display:none}.w-shell .w-logo{grid-column:1}.w-shell #w-entry-meta{gap:10px}.w-shell .score-panel{width:100%}.w-shell .score-panel .score-actions{justify-content:flex-start!important}.w-shell .w-patient-bar{padding:10px 12px}.w-shell #w-save-bar .assessment-save-actions{width:100%}}
.w-shell #w-entry{padding-bottom:145px}
.w-shell #w-save-bar{position:fixed;left:238px;right:28px;bottom:12px;margin:0;border:1px solid #c6d4cd;border-radius:6px}
@media(max-width:1100px){.w-shell #w-save-bar{left:193px;right:18px}}
@media(max-width:700px){.w-shell #w-save-bar{left:12px;right:12px;bottom:8px}}
#screen-dashboard .dashboard-container{max-width:none;padding:0;height:auto;min-height:100vh}
.w-shell{--ink:#263e38;--muted:#61736d;--line:#dce5e1;--surface:#fff;--brand:#176957;color:var(--ink);background:#f4f7f6;display:grid;grid-template-columns:210px minmax(0,1fr);min-height:100vh;letter-spacing:0;font-size:14px}
.w-shell *{box-sizing:border-box;letter-spacing:0;min-width:0}
.w-shell [hidden]{display:none!important}
.w-sidebar{background:#fff;border-right:1px solid var(--line);padding:24px 16px;position:sticky;top:0;height:100vh;overflow:auto;display:flex;flex-direction:column;gap:14px}
.w-logo{display:flex;gap:12px;align-items:center;font-size:22px;font-weight:700;margin-bottom:16px}.w-logo>b{background:var(--brand);color:white;border-radius:8px;padding:8px 13px}.w-logo small{display:block;font-size:11px;color:var(--muted);font-weight:400}
.w-sidebar nav{display:grid;gap:4px}.w-nav-label{color:var(--muted);padding:16px 10px 4px;font-size:11px}.w-sidebar nav button{border:0;background:none;text-align:left;padding:11px 12px;color:var(--ink);border-radius:6px;font-size:14px;cursor:pointer}.w-sidebar nav button:hover,.w-sidebar nav button.active{background:#e4f1eb;color:var(--brand)}.w-sidebar nav button.active{font-weight:700}.w-user{margin-top:auto;border-top:1px solid var(--line);padding-top:20px;font-size:13px}
.w-main{min-width:0}.w-patient-bar{position:sticky;top:0;z-index:15;background:#fff;border-bottom:1px solid var(--line);padding:14px 28px;display:flex;align-items:center;gap:16px}.w-patient-bar>label{display:flex;align-items:center;gap:12px}.w-patient-bar>button{margin-left:auto}.w-patient-bar select{max-width:350px}.w-patient-bar span{font-size:12px;color:var(--muted)}
#w-content{padding:24px 28px 0;max-width:1600px;margin:auto}.w-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.w-heading h1{font-size:23px;margin:0;color:var(--ink)}.w-heading p{font-size:13px;color:var(--muted);margin:8px 0 0;line-height:1.7}
.w-shell button,.w-shell input,.w-shell select,.w-shell textarea{font-family:inherit}.w-shell button{cursor:pointer}.w-shell button:disabled{opacity:.55;cursor:wait}.w-shell :focus-visible{outline:2px solid #167ca4;outline-offset:2px}.w-shell input:not([type=checkbox]):not([type=radio]),.w-shell select,.w-shell textarea{border:1px solid #c6d4cd;background:white;color:var(--ink);border-radius:6px;padding:9px;max-width:100%;font-size:14px}.w-shell textarea{width:100%;line-height:1.7;resize:vertical}.w-shell label{font-size:12px;color:var(--muted)}
.w-button,.w-link{font:inherit;border-radius:6px;padding:8px 12px;min-height:36px;border:1px solid #c6d4cd;background:white;color:var(--brand);text-align:center;line-height:1.5}.w-button.primary{background:var(--brand);color:white;border-color:var(--brand)}.w-link{border:0;background:none;padding:4px;color:var(--brand)}
.w-columns,.w-info-grid,.w-review-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(270px,1fr);gap:22px;align-items:start}.w-home-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:26px 0}.w-home-actions button{background:#fff;border:1px solid var(--line);border-radius:8px;padding:22px;text-align:left;color:var(--ink)}.w-home-actions h2{font-size:19px;margin:12px 0}.w-home-actions p{color:var(--muted);font-size:12px}.w-home-actions span{display:block;color:var(--brand);margin-top:22px}
.w-card{background:transparent;border:0;border-top:1px solid var(--line);padding:20px 0;margin-bottom:18px}.w-card h2{font-size:17px;margin:0 0 16px}.w-card p{line-height:1.7}.w-big{font-size:36px;font-weight:700}.w-big small{font-size:14px;color:var(--muted)}.w-subtle{font-size:12px;color:var(--muted);line-height:1.7}.w-notice{padding:12px 14px;border-left:3px solid #6aa18d;background:#eaf2ee;line-height:1.7;font-size:12px;margin:12px 0;color:#38584c;overflow-wrap:anywhere}
.w-filters,.w-strip,.w-tabs{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px}.w-filters label{display:grid;gap:6px}.w-filters select{max-width:310px}.w-filters label.w-check{display:flex;align-items:center;gap:8px}.w-strip{padding:14px 0;border-block:1px solid var(--line);font-size:13px}.w-tabs button,#w-group-tabs button{border:1px solid var(--line);border-radius:6px;color:var(--ink);background:white;padding:9px 12px;line-height:1.6}.w-tabs button.active,#w-group-tabs button.active{background:var(--brand);color:white;border-color:var(--brand)}
.w-table{overflow:auto;max-width:100%}.w-table table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}.w-table th,.w-table td{padding:12px;border-bottom:1px solid var(--line);text-align:left}.w-table th{background:#eaf0ed;color:var(--muted);font-weight:500}.w-table tr.selected{background:#e2f0e9}.w-table .w-diff{background:#fff1d8;color:#775111;font-weight:700}.w-chart{width:100%;max-height:340px;color:var(--muted)}.w-chart text{font-size:12px;fill:currentColor}.w-review-grid aside{position:sticky;top:95px}.w-card blockquote{margin:12px 0;padding:12px;background:#eaf0ed;border-left:3px solid #84a498;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}.w-review-grid aside>label{display:grid;gap:6px;margin:16px 0}.w-info-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.w-info-values dt{font-size:12px;color:var(--muted)}.w-info-values dd{margin:6px 0;overflow-wrap:anywhere}.w-history{padding:14px 0;border-bottom:1px solid var(--line)}.w-history>span{margin-left:12px;font-size:12px;color:var(--brand)}.w-history>small{display:block;color:var(--muted);margin:8px 0}.w-info-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.w-info-form label{display:grid;gap:8px}.w-wide{grid-column:1/-1}.w-form-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:20px}
#w-entry-meta{display:flex;gap:20px;align-items:center;flex-wrap:wrap;border-block:1px solid var(--line);padding:10px 0}.w-shell .panel{background:transparent;color:var(--ink);box-shadow:none;backdrop-filter:none;border:0;border-radius:0;padding:16px 0}.w-shell .panel h2{font-size:15px;color:var(--ink);margin-bottom:14px;border-color:var(--line)}.w-date-panel{display:flex;gap:16px;align-items:center!important;padding:0!important}.w-date-panel h2{display:none}.w-date-panel .form-group{margin:0}.w-shell .score-panel{margin-left:auto;padding:0!important}.w-shell .score-panel>h2,.w-shell .score-panel .score-display{display:none}.w-shell .score-panel button{font-size:12px;white-space:normal}.w-entry-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px}.w-entry-grid .fim-entry-panel>h2{display:none}#w-group-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}#w-group-tabs small{opacity:.8;margin-left:5px}#w-entry-main .fim-items{grid-template-columns:1fr;gap:14px;max-height:none}#w-entry-main .fim-category{margin-bottom:14px}#w-entry-main .fim-category-title{font-size:15px;color:var(--brand);margin:8px 0}#w-entry-main .fim-item{min-width:0}.w-original-score{display:none!important}.w-ratings{display:flex;flex-wrap:wrap;gap:5px;align-items:center;min-height:42px}.w-ratings button{width:36px;height:36px;flex:none;border:1px solid #c6d4cd;border-radius:5px;background:white;color:var(--ink);font-weight:600}.w-ratings button.active{background:var(--brand);color:white;border-color:var(--brand)}.w-ratings button.w-unset{width:auto;padding:0 7px;font-size:11px;background:none;color:var(--muted);border:0}.w-rating-label{font-size:12px;margin-left:6px;min-width:65px;color:var(--brand)}
.w-shell .fim-mode-switch{flex-wrap:wrap}.w-shell .fim-assist-group,.w-shell .fim-checklist-group{background:#eef3f0;border-color:var(--line);color:var(--ink);height:auto;max-height:none}.w-shell .fim-assist-option,.w-shell .fim-check-option{color:var(--ink)}.w-shell .fim-comment{background:#fff!important;color:var(--ink)!important;min-height:54px}.w-shell .fim-tooltip{color:var(--ink)}.w-helper{border-top:1px solid var(--line);padding:14px 0}.w-helper summary{cursor:pointer;font-size:13px;font-weight:600}.w-helper .panel>h2{display:none}.w-shell .chat-box{max-height:420px}.w-shell #chat-messages{max-height:350px}.w-shell .input-dark{background:white;color:var(--ink)}
#w-entry{padding-bottom:18px}#w-save-bar{position:sticky;bottom:0;z-index:20;background:#fff;border-top:1px solid #c6d4cd;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px -10px 0;box-shadow:0 -4px 15px #263e3810}#w-save-bar>div:first-child{display:grid;gap:5px}#w-save-bar small{font-size:11px;color:var(--muted)}#w-save-bar .assessment-save-actions{margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}#w-save-bar button{min-height:40px;white-space:normal}.w-shell .integration-list,.w-shell .summary-history-list{max-height:600px}.w-shell .summary-history-item{flex-shrink:0;min-height:100px;color:var(--ink);background:white}.w-shell .integration-item{background:white;color:var(--ink)}#w-summary,#w-integration{padding-bottom:24px}
@media(min-width:1500px){.w-entry-grid{grid-template-columns:minmax(0,1fr) 320px}#w-entry-main .fim-items{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1100px){.w-shell{grid-template-columns:175px minmax(0,1fr)}#w-content{padding:20px 18px 0}.w-entry-grid{grid-template-columns:1fr}.w-columns,.w-info-grid,.w-review-grid{grid-template-columns:1fr}.w-review-grid aside{position:static}.w-home-actions{gap:10px}.w-home-actions button{padding:16px}.w-patient-bar{padding:12px 18px}.w-patient-bar>label{display:grid;gap:5px}#w-entry-aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.w-shell .score-panel{margin-left:0}}
@media(max-width:700px){.w-shell{display:block}.w-sidebar{height:auto;position:static;padding:12px;gap:10px}.w-logo{margin:0;font-size:18px}.w-sidebar nav{display:flex;overflow-x:auto;padding-bottom:6px}.w-sidebar nav button{flex:none;font-size:12px;padding:8px}.w-nav-label,.w-sidebar .w-user,.w-sidebar>.w-link{display:none}.w-sidebar>.w-button{align-self:flex-end}.w-patient-bar{flex-wrap:wrap;gap:8px;position:static}.w-patient-bar>label{flex:1}.w-patient-bar select{width:100%;max-width:none}.w-patient-bar>span{display:none}.w-patient-bar>button{font-size:11px}#w-content{padding:18px 12px 0}.w-heading h1{font-size:20px}.w-heading{flex-wrap:wrap}.w-home-actions{grid-template-columns:1fr}.w-home-actions span{margin-top:10px}.w-info-form,.w-info-values{grid-template-columns:1fr}#w-entry-aside{display:block}.w-date-panel{flex-wrap:wrap;gap:10px}.w-date-panel .form-group{flex:1;min-width:130px}.w-filters>label{width:100%}.w-filters select{max-width:100%;width:100%}.w-ratings button{width:32px;height:36px}.w-rating-label{font-size:11px;min-width:55px;margin-left:0}#w-save-bar{padding:10px;flex-wrap:wrap;gap:8px;margin-inline:-4px}#w-save-bar>div:first-child{display:flex;flex-wrap:wrap;gap:6px 12px}#w-save-bar .assessment-save-actions{width:100%}#w-save-bar button{flex:1;font-size:12px}#w-group-tabs button{font-size:11px;padding:7px}.w-form-actions{flex-wrap:wrap}}

/* 利用者マスター */
.patient-master-table{display:block;overflow-x:auto;width:100%;margin:18px 0 30px}
.patient-master-table table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}
.patient-master-table th,.patient-master-table td{padding:13px 12px;border-bottom:1px solid var(--line,#dce5e1);vertical-align:middle}
.patient-master-table th{background:#eaf0ed;white-space:nowrap;color:#52685e;font-weight:600}
.patient-master-table td{min-width:85px;overflow-wrap:anywhere;max-width:260px}
.patient-master-table td:nth-child(2){min-width:130px;font-weight:600}
.patient-master-actions{white-space:nowrap}.patient-master-actions button{padding:7px 10px;border:1px solid #c6d4cd;border-radius:6px;background:white;color:#176957;margin:2px}
.patient-master-actions .btn-card-del{color:#a33e3e}
#w-patients .patients-screen{padding:0}#w-patients .patients-toolbar{flex-wrap:wrap;gap:12px}#w-patients .patients-filter{background:#eaf0ed!important;margin:0!important;flex-wrap:wrap}#w-patients .tab-btn{color:#52685e}#w-patients .tab-btn.active{background:#176957;color:white}
#w-patients .section-title{color:var(--ink);font-size:17px}#w-patients .empty-state{color:var(--muted)}

#w-patients .tab-btn{white-space:nowrap;flex-shrink:0}
/* 新しい業務画面にも保存済みテーマを適用する */
body:not(.light-mode) .w-shell{--ink:#e2eee9;--muted:#b1c6bd;--line:#3c554b;--surface:#21352d;--brand:#83d8b5;--text-primary:#e2eee9;--text-secondary:#b1c6bd;--text-muted:#b1c6bd;--border-color:#3c554b;--accent-blue:#83d8b5;--bg-surface:#21352d;background:#16251f;color:var(--ink);color-scheme:dark}
body:not(.light-mode) .w-shell :is(.w-sidebar,.w-patient-bar,.w-home-actions button,.w-button,.btn-secondary,.w-ratings button,.w-tabs button,#w-group-tabs button,.summary-history-item,.integration-item,.patient-master-actions button,#w-save-bar){background:var(--surface);color:var(--ink);border-color:var(--line)}
body:not(.light-mode) .w-shell :is(input:not([type=checkbox]):not([type=radio]),select,textarea,.input-dark){background:#192b23;color:var(--ink);border-color:#526f61}
body:not(.light-mode) .w-shell .fim-comment{background:#192b23!important;color:var(--ink)!important}
body:not(.light-mode) .w-shell :is(.w-notice,.w-card blockquote,.fim-assist-mode,.fim-check-mode,.fim-assist-group,.fim-checklist-group,.fim-mode-switch,.w-table th,.patient-master-table th){background:#2a4136;color:var(--ink);border-color:var(--line)}
body:not(.light-mode) .w-shell :is(.fim-assist-note,.fim-assist-option,.fim-check-option){color:var(--ink);--text-muted:#b1c6bd}
body:not(.light-mode) .w-shell :is(.w-sidebar nav button.active,.w-sidebar nav button:hover,.w-table tr.selected){background:#2c4d3e;color:#a5e8cb}
body:not(.light-mode) .w-shell :is(.w-ratings button.active,.w-tabs button.active,#w-group-tabs button.active,.w-button.primary,.btn-primary){background:#226e51;color:#fff;border-color:#59a584}
body:not(.light-mode) #w-patients .patients-filter{background:#2a4136!important}
body:not(.light-mode) #w-patients .tab-btn{color:var(--muted)}
body:not(.light-mode) #w-patients .tab-btn.active{background:#226e51;color:#fff}
body:not(.light-mode) .w-shell .patient-master-actions .btn-card-del{color:#ffb3b3}
body:not(.light-mode) .w-shell .w-table .w-diff{background:#5a4626;color:#ffe0a0}
body:not(.light-mode) .w-shell .theme-toggle-btn{color:var(--ink)}
/* 選択した複数評価の職員比較 */
.w-staff-picker{max-height:340px}.w-staff-picker thead{position:sticky;top:0;z-index:1}.w-staff-picker input[type=checkbox]{width:20px;height:20px;cursor:pointer;accent-color:var(--brand)}
.w-staff-results{margin:18px 0 28px}.w-staff-results th small,.w-staff-results td small{font-weight:400;color:var(--muted)}.w-staff-results th:first-child{min-width:150px}.w-staff-results th:not(:first-child){min-width:165px}.w-staff-results [data-w-staff-total]{font-weight:700}.w-staff-review>label{display:grid;gap:8px;margin:16px 0}.w-staff-review>label>select{max-width:200px}
/* 比較項目を一覧表示し、各職員の確認内容を個別に記録する */
.w-staff-review{scroll-margin-top:105px;padding-top:24px}.w-staff-review h2 small{font-size:13px;font-weight:400;color:var(--muted)}
.w-staff-observations,.w-staff-review-forms{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:20px;margin:18px 0}
.w-staff-observations article,.w-staff-review-form{min-width:0;border:1px solid var(--line);border-radius:6px;padding:16px}
.w-staff-observations h3,.w-staff-review-form h3{font-size:14px;line-height:1.6;margin:0 0 8px}.w-staff-observations h4{font-size:12px;color:var(--muted);margin-top:16px}.w-staff-observations blockquote{margin:10px 0}
.w-staff-review-form{display:flex;flex-direction:column;gap:10px;align-items:flex-start}.w-staff-review-form textarea{width:100%}.w-staff-review-form label{font-size:12px}.w-staff-review-form [data-review-status]{margin:0;min-height:18px}
/* 月次サマリーの入力と独立した履歴 */
.w-monthly-panel{border:1px solid var(--line);border-radius:8px;padding:22px;margin:24px 0;background:var(--surface)}
#w-monthly-form{display:grid;gap:12px}#w-monthly-form h2,#w-monthly-form p{margin:0}#w-monthly-form select{max-width:200px}#w-monthly-form button{justify-self:start;margin-top:6px}
.w-monthly-history-item{border-top:1px solid var(--line);padding:16px 0}.w-monthly-history-item>summary{cursor:pointer;font-weight:600;line-height:1.8}.w-monthly-history-item>summary span{display:block;font-weight:400;color:var(--muted);font-size:12px}
.w-monthly-document{padding-top:16px}.w-monthly-conclusion{border-top:2px solid var(--line);padding-top:16px}.w-monthly-conclusion p{white-space:pre-wrap;overflow-wrap:anywhere}.w-monthly-document blockquote{white-space:pre-wrap}
