/* Small layout safeguards kept separate from the visual theme. */
.app-shell { grid-template-columns: 265px minmax(0, 1fr); }
main { min-width: 0; }
.table-scroller { min-width: 0; }
.header-actions { display: flex; gap: 9px; }
.switch { position: relative; display: inline-flex !important; width: 30px; height: 17px; margin: 0 !important; cursor: pointer; }
.switch input { opacity: 0; width: 0 !important; height: 0; margin: 0 !important; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #c5cbc5; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 11px; height: 11px; left: 3px; top: 3px; border-radius: 50%; background: white; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(13px); }
.support-row td { background: #fffcf1; }
.support-row td:first-child { color: #9a7913; font-size: 11px; }
.schedule-table th.off-day { background: #d9ddd9; color: #7d8680; position: relative; }
.schedule-table th.off-day i { display: block; position: absolute; top: 2px; right: 4px; font: 700 8px "Noto Sans JP", sans-serif; color: #a26054; font-style: normal; }
.schedule-table td.off-cell { background: repeating-linear-gradient(-45deg, #e3e4e0 0, #e3e4e0 5px, #dcdfda 5px, #dcdfda 10px); color: #9aa19b; font: 600 11px "DM Mono", monospace; }
.schedule-table td.off-cell span { opacity: .75; }
.schedule-table .availability-row td { min-width: 91px; padding: 7px 5px; vertical-align: top; background: #fbfaf4; border-top: 2px solid #8eb8a3; }
.schedule-table .availability-row td.availability-label { min-width: 0; padding: 9px 15px; text-align: left; vertical-align: middle; background: #e4f0e9; color: #245e4e; border-right: 2px solid #8eb8a3; }
.availability-label span { display: block; font: 800 12px "Noto Sans JP", sans-serif; }
.availability-label small { display: block; margin-top: 2px; color: #5d7a6d; font: 500 9px "DM Mono", monospace; letter-spacing: .06em; }
.availability-list { display: grid; gap: 5px; padding: 0; text-align: left; }
.availability-entry,.availability-closure { display: grid; grid-template-columns: 1fr; gap: 2px; line-height: 1.2; }
.availability-entry > b,.availability-closure > b { min-width: 0; overflow: hidden; color: #31473d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.availability-entry > span { display: flex; flex-wrap: wrap; gap: 3px; }
.availability-type,.availability-closure em { display: inline-block; width: fit-content; padding: 2px 4px; background: #e5eee8; color: #3b6654; font: 700 9px "Noto Sans JP", sans-serif; font-style: normal; white-space: nowrap; }
.availability-type.all { background: #fae5de; color: #94442d; }
.availability-type.am { background: #dff0e8; color: #24644e; }
.availability-type.pm { background: #fce9d6; color: #9a5727; }
.availability-type.weekly-holiday { background: #e5e7e5; color: #5e6862; }
.availability-closure em { background: #efebe4; color: #6d665c; }
.availability-empty { display: block; padding-top: 3px; color: #c1c8c2; font: 500 11px "DM Mono", monospace; text-align: center; }
.support-label { padding-left: 13px; }
.capability.assist { background: #fff3ce; color: #886b11; }
.task-check { font: 600 10px "Noto Sans JP", sans-serif; color: #8a711c; white-space: nowrap; cursor: pointer; }
.task-check input { vertical-align: -2px; margin: 0 3px 0 0; accent-color: #b08e19; }
.support-fixed,.support-none { width: 56px; text-align: center; font: 600 10px "Noto Sans JP", sans-serif; white-space: nowrap; }
.support-fixed { color: #8a711c; background: #fff3ce; padding: 3px 4px; }
.support-none { color: #9ba29d; }
.check-grid { grid-template-columns: 1fr !important; }
.skill-option { display: grid; grid-template-columns: minmax(110px, 1fr) auto auto; gap: 8px; align-items: center; background: #f4f2eb; border: 1px solid transparent; padding: 8px; font-size: 11px; }
.skill-option > span { font-weight: 700; }
.skill-option label { margin: 0 !important; padding: 0 !important; background: none !important; font-size: 10px !important; white-space: nowrap; }
.skill-option input { width: auto !important; margin: 0 3px 0 0 !important; }
.skill-option.group-skill { grid-template-columns: minmax(110px, 1fr) auto; background: #edf4f0; }
.group-badge { display: block; margin-top: 2px; color: #4d7568; font: 500 9px "Noto Sans JP", sans-serif; }
.capacity { display: inline-block; margin-left: 5px; padding: 2px 5px; color: #815e13; background: #fff1c7; font: 600 9px "Noto Sans JP", sans-serif; }
.form-note { margin: 7px 0 0; color: #687870; font-size: 11px; line-height: 1.6; }
.noon-toggle { display: flex !important; align-items: center; gap: 6px; margin-top: 14px !important; padding: 9px 10px; background: #fff3ce; color: #71580d; cursor: pointer; }
.noon-toggle input { width: auto !important; margin: 0 !important; accent-color: #a88315; }
.noon-toggle small { color: #897846; font-weight: 500; }
.availability-settings { padding: 13px; background: #eef4f1; border: 1px solid #d6e5dd; }
.availability-settings legend { color: #245e4e; }
.weekday-checks { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.weekday-checks > span { margin-right: 5px; font-size: 11px; font-weight: 700; color: #52685e; }
.weekday-checks label { margin: 0 !important; padding: 4px 6px !important; border: 1px solid #cbdcd3; background: #fffdf7; font-size: 11px !important; cursor: pointer; }
.weekday-checks input { width: auto !important; margin: 0 2px 0 0 !important; accent-color: var(--green); }
.work-hours { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: end; margin-top: 12px; }
.work-hours label { margin: 0 !important; font-size: 11px !important; color: #52685e; }
.work-hours input { margin-top: 4px !important; padding: 8px !important; }
.work-hours > span { padding-bottom: 9px; color: var(--muted); }
.availability-badge { display: block; margin-top: 4px; color: #557067; font: 500 9px "Noto Sans JP", sans-serif; white-space: nowrap; }
.floor-toggle { display: grid !important; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; margin: 0 0 10px !important; padding: 10px; background: #e8f2ed; border-left: 3px solid #54a890; color: #245e4e; cursor: pointer; }
.floor-toggle input { width: auto !important; margin: 0 !important; accent-color: #27856d; }
.floor-toggle span { font-size: 13px; font-weight: 800; }
.floor-toggle small { grid-column: 2; margin-top: 2px; color: #54786b; font-weight: 500; line-height: 1.5; }
.manager-toggle { display: grid !important; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; margin: 0 0 10px !important; padding: 10px; background: #fff3ce; border-left: 3px solid #c5a535; color: #71580d; cursor: pointer; }
.manager-toggle input { width: auto !important; margin: 0 !important; accent-color: #a88315; }
.manager-toggle span { font-size: 13px; font-weight: 800; }
.manager-toggle small { grid-column: 2; margin-top: 2px; color: #897846; font-weight: 500; line-height: 1.5; }
.capability.floor-capability { background: #dff0e8; color: #236652; font-weight: 700; }
.capability.manager-capability { background: #fff1c7; color: #765b0d; font-weight: 700; }
.slot-label.all-day { width: 58px; color: #236652; font-size: 9px; }
.floor-row td.task-cell { background: #f0f8f3; color: #236652; }
.assignment.warning { color: #a84222; background: #fff1eb; outline: 2px solid #d76536; outline-offset: -1px; font-weight: 800; }
.alert ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; }
.alert small { display: block; margin-top: 5px; color: #86513d; }
.pdf-sheet { position: fixed; left: -10000px; top: 0; width: 1600px; padding: 24px; background: #fffdf7; box-shadow: none; }
.pdf-sheet .schedule-table { min-width: 0; font-size: 13px; }
.pdf-sheet .schedule-table th { padding: 9px 5px; }
.pdf-sheet .schedule-table td { min-width: 0; padding: 6px 3px; }
.pdf-sheet .schedule-table td:first-child { min-width: 185px; }
.pdf-sheet .pdf-assignment { display: block; min-height: 18px; font-weight: 600; }
.pdf-generated { margin-left: auto; padding-top: 8px; color: #617068; font: 11px "DM Mono", monospace; }
.sidebar-note.sync-error i { background: #d76536; }
.schedule-table th.time-column { min-width: 70px; width: 70px; }
.schedule-table th.task-column { min-width: 150px; text-align: left; padding-left: 16px; }
.schedule-table td.slot-merged { width: 70px; min-width: 70px; padding: 0; text-align: center; vertical-align: middle; border-right: 2px solid var(--ink); font: 800 13px "Noto Sans JP", sans-serif; letter-spacing: .12em; }
.schedule-table td.slot-merged span { display: block; padding: 10px 4px; }
.schedule-table td.slot-am { background: #e2f0e9; color: #245e4e; }
.schedule-table td.slot-noon { background: #fff2c6; color: #7b6212; }
.schedule-table td.slot-pm { background: #f8e0d8; color: #8e422d; }
.schedule-table td.task-cell { min-width: 150px; padding-left: 15px; text-align: left; font-weight: 700; border-right: 2px solid #c7c8c0; }
.schedule-table .support-row td.task-cell { color: #745f19; }
@media print {
  .schedule-table th.time-column, .schedule-table td.slot-merged { min-width: 48px; width: 48px; }
  .schedule-table th.task-column, .schedule-table td.task-cell { min-width: 92px; }
  .schedule-table td.slot-merged { background: #e5e5e5 !important; color: #111 !important; border-right: 1px solid #111; }
  .schedule-table td.task-cell { border-right: 1px solid #111; }
}
@media (max-width: 850px) { .header-actions { flex-direction: column; } }
