.cm-flow-dialog{width:min(1100px,96vw);max-width:96vw;max-height:92dvh;overflow:auto;border:1px solid #cad6d2;border-radius:14px;padding:0;background:#fff;color:#263d38}.cm-flow-dialog::backdrop{background:#142b24aa}.cm-flow-dialog .r905-dialog-head{position:sticky;top:0;z-index:2;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:14px 20px;border-bottom:1px solid #d5dfdc}.cm-flow-dialog .r905-dialog-head h3{margin:0;font-size:18px}.cm-flow-dialog-body{padding:20px}.cm-flow-dialog .r905-form label{display:grid;gap:6px;margin:12px 0}.cm-flow-dialog .r905-form input,.cm-flow-dialog .r905-form select{width:100%;padding:10px;font:inherit;border:1px solid #becdc6;border-radius:6px}.cm-app .cm-client-name input{min-width:220px}.cm-app .cm-client-name{min-width:240px}.cm-next-result{display:block;min-width:190px;margin:8px 0;font-size:13px}.cm-daily-table td:last-child button{white-space:nowrap}.cm-flow-calendar .r905-booked{display:block}.cm-legacy-form #form_area input[type=checkbox],.cm-legacy-form #form_area input[type=radio]{width:auto}@media(max-width:600px){.cm-flow-dialog-body{padding:12px}.cm-flow-dialog .r905-head h2{font-size:20px}}

.cm-flow-dialog:has(.r905-form){width:min(560px,96vw)}

.cm-app .cm-client-name{min-width:0;width:148px}.cm-app .cm-client-name input{min-width:0;width:100%;max-width:148px;box-sizing:border-box}.cm-app .cm-daily-table{table-layout:fixed;width:100%;min-width:850px;font-size:12px}.cm-daily-table th,.cm-daily-table td{padding:5px!important}.cm-daily-table th:first-child{width:36px}.cm-daily-table th:nth-child(2),.cm-daily-table th:nth-child(3){width:15%}.cm-daily-table th:last-child{width:145px}.cm-daily-table input,.cm-daily-table select{min-width:0!important;width:100%;padding:5px!important;box-sizing:border-box;font-size:12px!important}.cm-daily-table input[type=checkbox]{width:20px}.cm-next-result{min-width:0;font-size:11px}.cm-daily-table td:last-child button{font-size:11px;padding:5px}.cm-draft-status{min-height:1.5em}.cocoro905test .r905-calendar thead th small{color:#fff!important}

/* Daily form: fit all booking actions inside the available page width. */
.cm-app .cm-daily-table{min-width:0;width:100%;table-layout:fixed}.cm-app .cm-daily-table th{overflow-wrap:anywhere;white-space:normal}.cm-app .cm-daily-table th:first-child{width:5%}.cm-app .cm-daily-table th:nth-child(2),.cm-app .cm-daily-table th:nth-child(3){width:14%}.cm-app .cm-daily-table th:nth-child(4){width:8%}.cm-app .cm-daily-table th:nth-child(5){width:9%}.cm-app .cm-daily-table th:nth-child(6){width:11%}.cm-app .cm-daily-table th:nth-child(7){width:17%}.cm-app .cm-daily-table th:last-child{width:22%}.cm-app .cm-daily-table td{min-width:0;overflow-wrap:anywhere}.cm-app .cm-daily-table td:last-child button{display:block;width:100%;max-width:100%;white-space:normal;overflow-wrap:anywhere}.cm-app .cm-daily-table [data-existing-next]{margin-top:8px}.cm-app .cm-daily-table .cm-client-name input{max-width:100%}.cm-app .cm-daily-table .cm-next-result{overflow-wrap:anywhere}
@media(max-width:900px){.cm-app .cm-daily-table,.cm-app .cm-daily-table tbody{display:block;width:100%}.cm-app .cm-daily-table thead{display:none}.cm-app .cm-daily-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px;margin-bottom:14px;border:1px solid #d5dfdc;border-radius:8px;background:#fff}.cm-app .cm-daily-table td{display:block;width:auto;max-width:100%;border:0;padding:0!important}.cm-app .cm-daily-table td:before{content:attr(data-label);display:block;font-size:12px;margin-bottom:4px;font-weight:600}.cm-app .cm-daily-table td:last-child{grid-column:1/-1}}
.cm-app .cm-daily-table button[hidden]{display:none!important}

.cm-app .cm-daily-table th:first-child{width:4%}.cm-app .cm-daily-table th:nth-child(2){width:7%}.cm-app .cm-daily-table th:nth-child(3),.cm-app .cm-daily-table th:nth-child(4){width:13%}.cm-app .cm-daily-table th:nth-child(5){width:7%}.cm-app .cm-daily-table th:nth-child(6){width:9%}.cm-app .cm-daily-table th:nth-child(7){width:10%}.cm-app .cm-daily-table th:nth-child(8){width:16%}.cm-app .cm-daily-table th:last-child{width:21%}.cm-daily-actions{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px}.cm-daily-actions .cm-form{margin:0}

/* Stacked names leave room for an HH:MM text field without a native time picker. */
.cm-app .cm-daily-table th:first-child{width:4%}.cm-app .cm-daily-table th:nth-child(2){width:11%}.cm-app .cm-daily-table th:nth-child(3){width:25%}.cm-app .cm-daily-table th:nth-child(4){width:8%}.cm-app .cm-daily-table th:nth-child(5){width:10%}.cm-app .cm-daily-table th:nth-child(6){width:11%}.cm-app .cm-daily-table th:nth-child(7){width:15%}.cm-app .cm-daily-table th:last-child{width:16%}.cm-app .cm-daily-table .cm-start-time{min-width:6ch!important;white-space:nowrap;font-variant-numeric:tabular-nums}.cm-app .cm-client-names-stacked label{display:block;margin:0 0 8px;font-size:11px}.cm-app .cm-client-names-stacked label:last-of-type{margin-bottom:0}

.cm-flow-dialog .cm-transfer-kind{display:grid;gap:6px;margin:12px 0}.cm-flow-dialog .cm-transfer-kind strong{display:block;color:#263d38;background:#f5f7f6;border:1px solid #becdc6;border-radius:6px;padding:10px;font-weight:400;line-height:1.5}
/* Keep both client labels beside their narrower inputs in daily reports. */
.cm-app .cm-daily-table .cm-client-names-stacked label{display:flex;align-items:center;gap:8px;white-space:nowrap;min-width:0}
.cm-app .cm-daily-table .cm-client-names-stacked label input{flex:0 1 50%;width:50%;max-width:50%;min-width:0!important;margin:0}

.cm-app .cm-daily-table [data-row-delete]{white-space:nowrap;font-size:12px;padding:5px 8px}.cm-app .cm-daily-table tr[hidden]{display:none!important}

.cm-app .cm-daily-table th:nth-child(8){width:16%}.cm-app .cm-daily-table th:last-child{width:8%}

.cm-daily-totals{margin:16px 0;padding:14px 16px;background:#f3f7f6;border:1px solid #d6e2df;border-radius:6px;font-size:16px;line-height:1.7;overflow-wrap:anywhere}.cm-daily-totals strong{font-weight:600}

/* Narrow names: label above each input. */
.cm-app .cm-daily-table .cm-client-names-stacked label{display:flex;flex-direction:column;align-items:stretch;gap:4px;white-space:normal}
.cm-app .cm-daily-table .cm-client-names-stacked label input{flex:initial;width:100%;max-width:100%;margin:0}
.cm-app .cm-daily-table th:nth-child(3){width:16%}
.cm-app .cm-daily-table td[data-label="備考"] textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font:inherit;padding:5px;resize:vertical;min-height:70px}
.cm-app .cm-daily-table td[data-label="備考"]{white-space:normal}
.cm-app .cm-daily-table th:nth-child(1){width:4%}
.cm-app .cm-daily-table th:nth-child(2){width:8%}
.cm-app .cm-daily-table th:nth-child(3){width:16%}
.cm-app .cm-daily-table th:nth-child(4){width:6%}
.cm-app .cm-daily-table th:nth-child(5){width:8%}
.cm-app .cm-daily-table th:nth-child(6){width:9%}
.cm-app .cm-daily-table th:nth-child(7){width:13%}
.cm-app .cm-daily-table th:nth-child(8){width:16%}
.cm-app .cm-daily-table th:nth-child(9){width:14%}
.cm-app .cm-daily-table th:nth-child(10){width:6%}
@media(max-width:900px){.cm-app .cm-daily-table td[data-label="備考"]{grid-column:1/-1}}

/* Client and remarks columns: about two thirds of the previous width. */
.cm-app .cm-daily-table th:nth-child(3){width:10.67%}
.cm-app .cm-daily-table th:nth-child(9){width:9.33%}
.cm-app .cm-daily-table th:nth-child(8){width:26%}

/* Restore next booking width and give the freed space to duration and outcome. */
.cm-app .cm-daily-table th:nth-child(4){width:11%}
.cm-app .cm-daily-table th:nth-child(5){width:13%}
.cm-app .cm-daily-table th:nth-child(8){width:16%}

.cm-weekly-totals td {vertical-align:top}
.cm-weekly-totals small {display:block;text-align:center}
.cm-weekly-totals dl {display:block;margin:2px 0;font-size:13px;line-height:1.45}
.cm-weekly-totals dl div {display:flex;justify-content:space-between;gap:4px;padding:2px 4px;border-bottom:1px solid #ddd}
.cm-weekly-totals dt,.cm-weekly-totals dd {margin:0;padding:0}
.cm-weekly-totals dd {font-weight:bold}
.cm-weekly-totals dl div:nth-child(3) {color:#164185}
.cm-weekly-totals dl div:last-child {color:#a82334}

.cm-weekly-totals .cm-week-details{font:inherit;font-size:12px;padding:4px 8px;cursor:pointer}
dialog.cm-weekly-dialog{width:min(520px,94vw)}
.cm-weekly-dialog .cm-week-records{list-style:none;margin:0;padding:0}
.cm-weekly-dialog .cm-week-records li{padding:12px 0;border-top:1px solid #d5dfdc}
.cm-weekly-dialog .cm-week-note{white-space:pre-line;overflow-wrap:anywhere}
.cm-weekly-dialog .cm-week-state{display:flex;gap:8px 16px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:6px}

/* Public reception closures in the management calendar. */
.cm-app .r905-calendar td.cm-unavailable,.cocoro905test .r905-calendar td.cm-unavailable{background:#e6e8e9!important;color:#596269}
.cm-app .cm-reopen-form{margin:4px 0}.cm-app .cm-reopen-form button[type=submit],.cocoro905test .cm-reopen-button{font-size:11px;line-height:1.4;padding:3px 7px;min-height:24px;border-radius:4px;width:auto;white-space:nowrap}

/* Counselor appointment editing: keep the old and new dates visible together. */
.cm-flow-dialog.cm-booking-editor{width:min(720px,96vw)}
.cm-booking-editor .cm-booking-before{padding:12px 14px;background:#f1f6f3;border:1px solid #cbd9d1;border-radius:8px;overflow-wrap:anywhere}
.cm-booking-editor .cm-booking-before p{margin:5px 0}
.cm-booking-editor .cm-booking-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cm-booking-editor label{display:grid;gap:6px;margin:12px 0;min-width:0}
.cm-booking-editor input,.cm-booking-editor select,.cm-booking-editor textarea{box-sizing:border-box;width:100%;min-width:0;padding:10px;border:1px solid #becdc6;border-radius:6px;font:inherit;background:#fff;color:#263d38}
.cm-booking-editor input[readonly]{background:#f3f4f3;color:#53615b}
.cm-booking-editor .cm-booking-help{font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.cm-booking-editor .cm-booking-error{color:#a42424;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
.cm-booking-editor .cm-booking-compare-scroll{overflow-x:auto}
.cm-booking-editor .cm-booking-compare{border-collapse:collapse;width:100%;table-layout:fixed;margin:12px 0;font-size:14px}
.cm-booking-editor .cm-booking-compare th,.cm-booking-editor .cm-booking-compare td{border:1px solid #cbd9d1;padding:10px 8px;text-align:left;white-space:normal;overflow-wrap:anywhere}
.cm-booking-editor .cm-booking-compare thead th{background:#eef3f0;color:#263d38}
.cm-booking-editor .cm-booking-compare th:first-child{width:24%}
.cm-booking-editor .cm-booking-changed td:last-child{background:#fff5d8;font-weight:600}
.cm-booking-editor .cm-booking-edit-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:16px}
.cm-booking-editor button{white-space:normal;line-height:1.6}
.cm-booking-editor .cm-booking-edit-form[hidden],.cm-booking-editor .cm-booking-review[hidden]{display:none!important}
@media(max-width:520px){.cm-booking-editor .cm-booking-fields{grid-template-columns:1fr;gap:0}.cm-booking-editor .cm-booking-compare{font-size:12px}.cm-booking-editor .cm-booking-compare th,.cm-booking-editor .cm-booking-compare td{padding:8px 5px}.cm-booking-editor .cm-booking-edit-actions button{width:100%}}

/* Availability review, explicit cancellation, and room transfer confirmation. */
.cm-booking-editor .cm-booking-cancel-entry{margin-top:24px;padding-top:18px;border-top:1px solid #cbd9d1}
.cm-booking-editor .cm-booking-cancel-entry h4{margin:0 0 8px}
.cm-booking-editor .cm-booking-cancel-link{background:#fff!important;color:#96322d!important;border:1px solid #b86a65!important}
.cm-booking-editor .cm-booking-danger{background:#9c302b!important;color:#fff!important;border:1px solid #9c302b!important}
.cm-booking-editor .cm-booking-cancel-summary{padding:14px;border:1px solid #d8b4b0;border-radius:8px;background:#fff6f5;overflow-wrap:anywhere}
.cm-booking-editor .cm-booking-date-warning{padding:12px 14px;border:2px solid #c78d27;border-radius:8px;background:#fff3cf;color:#65410b;line-height:1.7}
.cm-booking-editor .cm-booking-date-warning strong{display:block}
.cm-booking-editor .cm-booking-checked{padding:10px 12px;border-left:4px solid #547b66;background:#eef6f0;font-size:13px;line-height:1.7}
.cm-booking-editor .cm-booking-cancel-entry[hidden],.cm-booking-editor .cm-booking-cancel-review[hidden],.cm-booking-editor .cm-transfer-review[hidden],.cm-booking-editor .r905-form[hidden],.cm-booking-editor .rmarunouchi-form[hidden]{display:none!important}
.cm-app #cm-transfer-result{margin:18px 0;padding:18px;border:2px solid #547b66;border-radius:10px;background:#f0f7f2;scroll-margin-top:100px}
.cm-app #cm-transfer-result p{margin:8px 0;overflow-wrap:anywhere}
.cm-app #cm-transfer-result button{white-space:normal}
.cm-transfer-focus-slot{outline:4px solid #bd7b13!important;outline-offset:-2px;background:#fff1bf!important;scroll-margin:120px 40px}
