#shiftsPage{--sh-ink:#254657;--sh-pale:#edf4f6;--sh-red:#b33b36;--sh-orange:#976314}#shiftsPage .sh-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}#shiftsPage h1{font-size:25px;margin:0 0 7px}#shiftsPage h2{font-size:18px;margin:0 0 12px}#shiftsPage p{line-height:1.65}.sh-note{font-size:12px;color:var(--muted,#6f756e);margin:7px 0}.sh-toolbar,.sh-tabs,.sh-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.sh-toolbar input,.sh-toolbar select{width:auto}.sh-btn,.sh-tabs button,.sh-cal button,.sh-cell{font-family:inherit;cursor:pointer;border:1px solid #cbd8da;background:#fff;border-radius:9px;color:var(--sh-ink,#254657);padding:10px 14px;font-size:13px;min-height:42px}.sh-btn:hover,.sh-cell:hover{background:#edf4f6}.sh-primary,.sh-tabs .active{background:#254657!important;color:#fff!important;border-color:#254657!important}.sh-danger{color:#b33b36;border-color:#efbcb8}.sh-btn:disabled{opacity:.45;cursor:default}.sh-panel{background:var(--surface,#fff);border:1px solid var(--line,#dde3de);border-radius:13px;padding:18px;margin:14px 0}.sh-stat{padding:9px 13px;border-radius:9px;background:#edf4f6;font-size:13px}.sh-stat.error{background:#fce7e5;color:#a12e28}.sh-stat.warning{background:#fff3db;color:#83520a}.sh-status{font-size:12px;color:#526563;min-height:20px}.sh-status.error{color:#a12e28}.sh-scroll{overflow:auto;border:1px solid #d6dfe2;border-radius:10px}.sh-table{width:100%;border-collapse:collapse;min-width:650px;background:#fff;font-size:12px}.sh-table th,.sh-table td{border:1px solid #d6dfe2;padding:8px;text-align:center;vertical-align:middle}.sh-table th{background:#edf4f6;color:#254657;white-space:nowrap}.sh-table .sh-name{position:sticky;left:0;z-index:1;background:#f8fafb;min-width:70px}.sh-table td.closed{background:#f0f0ef;color:#858585}.sh-cell{border:0;background:none;padding:7px 5px;width:100%;min-width:92px;line-height:1.55}.sh-cell small{display:block;font-size:10px;color:#6a7477}.sh-cell.error{background:#fce7e5;color:#a12e28}.sh-cell.locked{box-shadow:inset 0 0 0 1px #7b969d}.sh-grid{font-size:10px;min-width:1120px;table-layout:fixed}.sh-grid th,.sh-grid td{padding:5px 1px;height:26px}.sh-grid .sh-name{width:72px}.sh-grid .sh-hours{width:112px}.sh-grid .cafe{background:#fce4d6}.sh-grid .management{background:#e2efda}.sh-grid .shop{background:#fff2cc}.sh-grid .break{background:#e3e5e7;color:#62676c}.sh-grid .sh-count{font-weight:700;color:#a72f26;background:#f6f8f8}.sh-grid .sh-low{background:#ffd7d4;color:#9b251f}.sh-grid .sh-hour{border-left:2px solid #93a6ac}.sh-issues{display:flex;gap:8px;flex-direction:column}.sh-issue{padding:11px;border:1px solid #e7c4c0;border-radius:8px;background:#fff5f3;cursor:pointer;text-align:left;color:#983c31;font:inherit;font-size:12px}.sh-issue.warning{background:#fff8e9;border-color:#ead8b2;color:#83520a}.sh-day-list{display:flex;flex-direction:column;gap:8px}.sh-day-row{display:flex;gap:15px;align-items:center;justify-content:space-between;padding:9px;border-bottom:1px solid #e1e6e5}.sh-day-row b{min-width:50px}.sh-day-row button{flex:1;text-align:left}.sh-cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;max-width:630px;margin:14px 0}.sh-cal .weekday{text-align:center;font-size:12px;color:#647471;padding:5px}.sh-cal button{padding:7px 3px;min-height:72px;font-size:15px;position:relative}.sh-cal button small{display:block;font-size:10px;margin-top:4px;line-height:1.3}.sh-cal button.selected{background:#254657;color:#fff;box-shadow:0 0 0 2px #90b1ba}.sh-cal button.request{border-color:#e1a076}.sh-cal button.weekend{background:#f1f2f1}.sh-cal button.selected.weekend{background:#254657}.sh-request-layout{display:grid;grid-template-columns:minmax(280px,1.15fr) minmax(240px,.85fr);gap:20px}.sh-label{display:flex;flex-direction:column;gap:6px;font-size:12px;margin:10px 0}.sh-label input,.sh-label select,.sh-label textarea,.sh-form input,.sh-form select{font:inherit;font-size:14px;color:#254657;border:1px solid #cad7da;border-radius:8px;padding:10px;min-height:42px;background:#fff;box-sizing:border-box;max-width:100%;width:100%}.sh-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 15px}.sh-form .full{grid-column:1/-1}.sh-checks{display:flex;gap:14px;flex-wrap:wrap;margin:10px 0;font-size:13px}.sh-checks input{width:auto!important;min-height:0!important}.sh-overlay{position:fixed;inset:0;background:#17292a77;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.sh-dialog{background:#fff;border-radius:16px;padding:22px;width:610px;max-width:100%;max-height:90vh;overflow:auto;color:#254657}.sh-dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.sh-dialog-head h2{font-size:19px;margin:0}.sh-segment{display:grid;grid-template-columns:1fr 1fr 1.25fr auto;gap:8px;align-items:end;margin:7px 0}.sh-segment label{font-size:11px}.sh-segment button{padding:8px}.sh-rule{display:flex;gap:12px;justify-content:space-between;border-bottom:1px solid #e0e6e7;padding:12px 0}.sh-rule small{display:block;line-height:1.5;color:#687876;margin-top:4px}.sh-rule .sh-actions{margin:0;flex-shrink:0}.sh-pill{display:inline-block;padding:4px 8px;background:#eef3f4;border-radius:6px;font-size:11px;margin-right:6px}.sh-empty{padding:28px;text-align:center;color:#687876;font-size:13px}.sh-print-host{display:none}@media(max-width:720px){#shiftsPage h1{font-size:22px}.sh-header{flex-direction:column}.sh-panel{padding:13px}.sh-request-layout{grid-template-columns:1fr}.sh-rule{flex-direction:column}.sh-form{grid-template-columns:1fr}.sh-segment{grid-template-columns:1fr 1fr}.sh-cal{gap:4px}.sh-cal button{min-height:63px;font-size:14px}.sh-tabs{gap:5px}.sh-tabs button{padding:8px 10px;font-size:12px}.sh-toolbar{gap:5px}.sh-btn{padding:9px 11px}.sh-dialog{padding:17px}.sh-table{min-width:620px}}
/* Larger touch controls and month/week focused layouts. */
@media screen{#shiftsPage .sh-btn,#shiftsPage .sh-tabs button,.sh-dialog .sh-btn{min-height:50px;font-size:15px;padding:12px 17px}#shiftsPage input:not([type=checkbox]),#shiftsPage select,.sh-dialog select,.sh-dialog input:not([type=checkbox]){min-height:50px;font-size:16px;padding:11px 12px}.sh-note,.sh-status,.sh-label{font-size:14px}.sh-cell{min-height:56px;font-size:14px;min-width:125px}.sh-cell small{font-size:12px}.sh-stat{font-size:14px}.sh-table{font-size:14px}.sh-grid{min-width:1490px;font-size:13px}.sh-grid .sh-name{width:85px}.sh-grid .sh-hours{width:135px}.sh-grid td[role=button]{height:44px;cursor:pointer}.sh-grid td[role=button]:hover{outline:2px solid #8d713f;outline-offset:-2px}.sh-grid th,.sh-grid td{padding:3px 1px}.sh-cal button{min-height:86px;font-size:19px}.sh-cal button small{font-size:12px}.sh-checks label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:15px}.sh-checks input{width:22px!important;height:22px!important}.sh-segment label{font-size:14px}.sh-issue{min-height:48px;font-size:14px}.sh-month-toolbar label{display:flex;align-items:center;gap:8px;font-size:15px}.sh-month-table{min-width:4400px}.sh-month-table th small{display:block;margin-top:4px}.sh-request-summary{margin-top:18px}.sh-request-summary summary{min-height:44px;cursor:pointer}.sh-week-grid .sh-end{width:42px;background:#f2f2ed}.sh-grid-date th{text-align:left;padding:9px 12px;background:#e5decf}.sh-grid-count th{font-size:12px}.sh-request-layout{grid-template-columns:minmax(320px,1.2fr) minmax(260px,.8fr)}.sh-dialog-head button{min-width:50px}.sh-dialog{width:700px}.sh-toolbar select{max-width:100%}}
@media screen and (max-width:720px){.sh-request-layout{grid-template-columns:1fr}.sh-cal{gap:4px}.sh-cal button{min-height:80px;font-size:17px;padding:5px 1px}.sh-cal button small{font-size:11px}.sh-month-toolbar{align-items:stretch}.sh-month-toolbar label{width:100%}.sh-tabs{gap:8px}.sh-btn,.sh-tabs button{flex-grow:1}.sh-dialog{padding:16px}.sh-segment{grid-template-columns:1fr 1fr}}
@media print{
body.sh-print-mode>*{display:none!important}body.sh-print-mode>#shiftPrintHost{display:block!important}body.sh-print-mode{background:white!important;margin:0!important;padding:0!important}
.sh-print-host{background:white;color:black;font-family:'Noto Sans JP',sans-serif}.sh-print-host .sh-print-page{break-after:page;page-break-after:always;padding:0;margin:0;box-sizing:border-box}.sh-print-host .sh-print-page:last-child{break-after:auto;page-break-after:auto}.sh-print-host h1{font-size:11pt;line-height:1.3;margin:0 0 3pt}.sh-print-host h2{font-size:10pt;line-height:1.3;margin:0 0 3pt}.sh-print-host p{font-size:7pt;line-height:1.3;margin:3pt 0}
.sh-print-host table{width:100%;min-width:0!important;border-collapse:collapse;font-size:9pt;table-layout:fixed}.sh-print-host th,.sh-print-host td{border:.4pt solid #89999e;text-align:center;padding:4pt;word-break:break-word}.sh-print-host th{background:#e5edf0;white-space:normal}.sh-print-host .sh-name{position:static!important;min-width:0!important}.sh-print-host .sh-grid{font-size:7pt}.sh-print-host .sh-grid td,.sh-print-host .sh-grid th{padding:.5pt 0;height:10pt;line-height:10pt;box-sizing:border-box}.sh-print-host .sh-grid .sh-name{width:48pt}.sh-print-host .sh-grid .sh-hours{width:80pt;font-size:6.5pt}.sh-print-host .sh-grid .sh-end{width:26pt;font-size:6pt;background:#f2f2ed}.sh-print-host .sh-grid-date th{text-align:left;padding-left:4pt;background:#e5decf}.sh-print-host .sh-grid thead{display:table-header-group}.sh-print-host .sh-grid tr{break-inside:avoid}.sh-print-host .sh-count{color:#9b251f}.sh-print-host .sh-low{background:#ffd7d4}.sh-print-host .cafe{background:#fce4d6}.sh-print-host .management{background:#e2efda}.sh-print-host .shop{background:#fff2cc}.sh-print-host .break{background:#ddd}.sh-print-host .sh-circle-page{break-inside:avoid;page-break-inside:avoid}
.sh-paper-a4 .sh-grid{font-size:5.4pt}.sh-paper-a4 .sh-grid td,.sh-paper-a4 .sh-grid th{height:7pt;line-height:7pt;padding:.3pt 0}.sh-paper-a4 .sh-grid .sh-name{width:34pt}.sh-paper-a4 .sh-grid .sh-hours{width:59pt;font-size:4.8pt}.sh-paper-a4 .sh-grid .sh-end{width:20pt;font-size:4.8pt}
.sh-print-host *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Keep the modal title visible beside its close control on narrow screens. */
@media screen{.sh-dialog-head{gap:12px}.sh-dialog-head h2{flex:1;min-width:0;overflow-wrap:anywhere}.sh-dialog-head>.sh-btn{flex:0 0 50px;width:50px;min-width:50px;padding:10px}}

/* Safari date controls must shrink inside the condition dialog grid. */
.sh-dialog,.sh-form,.sh-form>label{min-width:0;box-sizing:border-box}
.sh-dialog .sh-form input:not([type=checkbox]),.sh-dialog .sh-form select{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
.sh-dialog input[type=date]{display:block;-webkit-appearance:none;appearance:none}
.sh-dialog input[type=date]::-webkit-date-and-time-value{min-width:0;text-align:left}

/* Separate preparation, working tables, and history without changing tab actions. */
@media screen{
body #shiftsPage.page-view .sh-tabs.sh-grouped-tabs[aria-label]{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(120px,.5fr);align-items:stretch;gap:12px;padding:0;margin:16px 0 22px;background:none;border:0;box-shadow:none}
body #shiftsPage .sh-tab-group{min-width:0;padding:14px;background:#f4e7cd;border:1px solid #b99a6a;border-radius:12px;box-sizing:border-box}
body #shiftsPage .sh-tab-group h2{font-size:14px;line-height:1.4;margin:0 0 10px;color:#685234}
body #shiftsPage .sh-tab-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body #shiftsPage .sh-tab-group-2 .sh-tab-buttons{grid-template-columns:1fr}
body #shiftsPage .sh-tabs.sh-grouped-tabs button{width:100%;min-width:0;min-height:48px;margin:0;padding:10px 12px;font-size:14px;line-height:1.4;white-space:normal;box-sizing:border-box;border:1px solid #b49467;background:#fff8e9;color:#624e33}
body #shiftsPage .sh-tabs.sh-grouped-tabs button:focus-visible{outline:3px solid #45664b;outline-offset:3px}
body #shiftsPage .sh-tabs.sh-grouped-tabs button:disabled{opacity:.5;cursor:default}
body #shiftsPage .sh-validation>summary{font-weight:700;cursor:pointer;padding:4px 0}
body #shiftsPage .sh-issue-group{margin-top:16px;padding-top:14px;border-top:1px solid #d4bd96}
body #shiftsPage .sh-issue-group h3,body #shiftsPage .sh-issue-group>summary{font-size:15px;font-weight:700;line-height:1.5;margin:0 0 8px}
body #shiftsPage .sh-issue-group h3{color:#943c2d}
body #shiftsPage .sh-advice>summary{color:#785826;cursor:pointer;min-height:32px}
body #shiftsPage .sh-issue:not(button){cursor:default}
body #shiftsPage .sh-issue-link{display:block;margin-top:5px;font-size:12px;text-decoration:underline;text-underline-offset:3px}
}
@media screen and (max-width:1100px){body #shiftsPage.page-view .sh-tabs.sh-grouped-tabs[aria-label]{grid-template-columns:repeat(2,minmax(0,1fr))}body #shiftsPage .sh-tab-group-2{grid-column:1/-1;display:flex;align-items:center;gap:16px}body #shiftsPage .sh-tab-group-2 h2{margin:0}body #shiftsPage .sh-tab-group-2 .sh-tab-buttons{margin-left:auto;min-width:145px}}
@media screen and (max-width:600px){body #shiftsPage.page-view .sh-tabs.sh-grouped-tabs[aria-label]{grid-template-columns:1fr;gap:10px}body #shiftsPage .sh-tab-group{padding:12px}body #shiftsPage .sh-tab-group-1 .sh-tab-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}body #shiftsPage .sh-tab-group-2{grid-column:auto}body #shiftsPage .sh-tabs.sh-grouped-tabs button{padding:9px 7px;font-size:13px}body #shiftsPage .sh-tab-group-2 .sh-tab-buttons{min-width:125px}}

@media screen{body #shiftsPage.page-view .sh-validation .sh-issue.warning{color:#785826;background:#fff2d6;border-color:#d2b080}}

.sh-min-unmet{color:#963c29}.sh-tab-buttons button{min-height:48px}.sh-panel .sh-table td,.sh-panel .sh-table th{padding:14px 16px}.sh-form optgroup{font-weight:700}

.sh-staffing-settings{padding:18px;margin:18px 0;border:1px solid #b99664;border-radius:14px;background:#faf4df}.sh-staffing-settings h3{margin-top:0}
@media(max-width:600px){.sh-week-totals{min-width:0!important;width:100%}.sh-week-totals thead{display:none}.sh-week-totals tbody{display:grid;gap:12px}.sh-week-totals tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid #b99664;border-radius:12px;overflow:hidden}.sh-week-totals th{grid-column:1/-1;text-align:left}.sh-week-totals td:last-child{grid-column:1/-1}.sh-week-totals td:nth-child(2)::before{content:'勤務日数 ';font-size:12px}.sh-week-totals td:nth-child(3)::before{content:'実働 ';font-size:12px}}

/* Keep each original request date at least 44px wide, within its own scrollable calendar. */
@media screen{
 #shiftsPage .sh-request-layout>div{min-width:0}
 #shiftsPage .sh-calendar-scroll{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;border-radius:6px}
 body #shiftsPage.page-view .sh-request-layout .sh-calendar-scroll>.sh-cal{min-width:366px}
 #shiftsPage .sh-calendar-scroll:focus-visible{outline:3px solid #315c46;outline-offset:2px}
}
@media screen and (max-width:720px){body #shiftsPage.page-view .sh-request-layout .sh-calendar-scroll>.sh-cal{min-width:354px}}

@media screen{
 #shiftsPage .sh-payroll>header{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
 #shiftsPage .sh-payroll>header h2{margin:0 0 6px}
 #shiftsPage .sh-payroll>header p{margin:0;font-size:14px}
 #shiftsPage .sh-payroll-amount{font-size:clamp(22px,3vw,30px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:#355b46}
 #shiftsPage .sh-payroll>details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;line-height:1.7}
 #shiftsPage .sh-payroll-table{min-width:540px}
 body[data-cafe-world=ghibli] #shiftsPage .sh-payroll{background:linear-gradient(90deg,#e3d0aa,#fff8e5 22px);border-left:7px solid #9b8155;border-radius:3px 9px 6px 3px}
}

/* Dated conditions stay on the same staff ledger; no schedule is changed here. */
#shiftsPage .sh-condition-period{border-top:1px solid #d7c9b5;padding:10px 0;overflow-wrap:anywhere}
#shiftsPage .sh-condition-period h5{font-size:1em;margin:0 0 6px}
#shiftsPage .sh-condition-period p{margin:6px 0}
#shiftsPage .sh-condition-period summary{min-height:44px;display:flex;align-items:center;cursor:pointer;text-decoration:underline}
#shiftsPage .sh-condition-period details ul{padding-left:20px}

/* Each planned-pay row opens the original staff ledger through its native button. */
#shiftsPage .sh-payroll-person{min-width:100px;min-height:44px;white-space:normal;overflow-wrap:anywhere;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px}
#shiftsPage .sh-payroll-person small{font-size:.75em;font-weight:400;text-decoration:underline}
body[data-cafe-world="ghibli"] #shiftsPage .sh-payroll .sh-payroll-table button.sh-btn.sh-payroll-person{background:#faf1d7;border-color:#b99b69;border-left:4px solid #6d825d;border-radius:3px 9px 9px 3px;box-shadow:1px 2px 0 #c3ad82}
@media print{#shiftsPage .sh-payroll-person{background:none;border:0;box-shadow:none}}
