:root {
  --navy: #12345b;
  --navy-dark: #0b223d;
  --teal: #1f9d8f;
  --teal-soft: #e7f7f4;
  --blue-soft: #e8f1fb;
  --orange: #ef8b42;
  --red: #c63f4e;
  --ink: #192536;
  --muted: #64748b;
  --line: #d8e0e9;
  --surface: #ffffff;
  --page: #f4f7fa;
  --shadow: 0 12px 35px rgba(15, 35, 58, .10);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--page); }
body { min-height: 100vh; margin: 0; background: var(--page); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(31, 157, 143, .35);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 9px clamp(14px, 3vw, 36px);
  color: #fff;
  background: var(--navy);
  box-shadow: 0 4px 20px rgba(11, 34, 61, .18);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark, .login-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--navy);
  background: #fff;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; color: #bdd0e4; font-size: 11px; }
.header-calendar-context {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 16px;
  margin-left: 10px;
}
.header-calendar-title { flex: 0 0 auto; font-size: 21px; line-height: 1; }
.header-current-scope {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,.3);
}
.header-current-scope small { flex: 0 0 auto; color: #a9c1d8; font-size: 9px; font-weight: 700; }
.header-current-scope strong { overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.header-link { padding: 8px 11px; border: 1px solid rgba(255,255,255,.32); border-radius: 9px; }
.user-name { font-weight: 700; }
.header-actions form { margin: 0; }
.text-button { padding: 6px 0; border: 0; color: #cfe0ef; background: transparent; }
.app-main { width: 100%; }

.message-stack { margin-bottom: 12px; }
.message { margin-bottom: 8px; padding: 14px 17px; border: 1px solid #a8ddd5; border-radius: 12px; background: #ecfbf8; box-shadow: var(--shadow); }

.calendar-page, .form-page, .detail-page, .master-page { padding: 24px clamp(12px, 3vw, 36px) 48px; }
.calendar-toolbar, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.calendar-page { padding-top: 14px; }
.compact-calendar-toolbar { min-height: 44px; margin-bottom: 8px; }
.calendar-title-line { display: flex; align-items: center; gap: 18px; min-width: 0; }
.compact-calendar-toolbar h1 { font-size: clamp(23px, 3vw, 29px); }
.current-scope {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  padding-left: 17px;
  border-left: 1px solid #cad4df;
}
.current-scope span { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.current-scope strong { overflow: hidden; color: var(--navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--navy-dark); font-size: clamp(24px, 4vw, 34px); line-height: 1.2; }
h2 { color: var(--navy-dark); font-size: 19px; }
.eyebrow { margin-bottom: 6px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }

.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
}
.primary-button { color: #fff; border-color: var(--navy); background: var(--navy); }
.primary-button:hover { background: var(--navy-dark); }
.secondary-button { color: var(--navy); border-color: #bdcad7; background: #fff; }
.danger-button { color: #fff; border-color: var(--red); background: var(--red); }
.wide { width: 100%; }
.add-button span { font-size: 22px; line-height: .8; }
.timeline-frame { position: relative; }
.timeline-add-button {
  position: absolute;
  z-index: 24;
  right: 18px;
  bottom: 24px;
  min-height: 52px;
  padding-inline: 20px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(11, 34, 61, .28);
}
.timeline-add-button-above-weekly { bottom: 86px; }
.timeline-weekly-button { border-color: #3a6486; background: #3a6486; }
.timeline-weekly-button:hover { background: #2d5474; }
.timeline-maintenance-button { bottom: 86px; border-color: #2f3742; background: #2f3742; }
.timeline-maintenance-button:hover { background: #1f2933; }
.timeline-transport-button { bottom: 151px; border-color: #b42333; background: #c93445; }
.timeline-transport-button:hover { background: #a91f30; }

.organization-tabs {
  display: flex;
  gap: 7px;
  margin: 0 -2px 16px;
  padding: 2px 2px 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.org-tab { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: #40536a; background: #fff; font-size: 13px; font-weight: 700; }
.org-tab.active { color: #fff; border-color: var(--navy); background: var(--navy); }
.organization-tabs.bottom-tabs { margin-top: 18px; margin-bottom: 0; padding-bottom: 2px; }
.development-preview-link { margin: 10px 0 0; font-size: 12px; text-align: right; }
.development-preview-link a { color: var(--teal); font-weight: 800; }

.view-controls, .date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.board-tabs, .period-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.board-tabs a, .period-switch a { padding: 8px 13px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.board-tabs a.active, .period-switch a.active { color: var(--navy); background: var(--blue-soft); }
.person-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.person-filter select { min-width: 170px; padding: 8px 32px 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.date-nav-buttons { display: flex; align-items: center; gap: 6px; }
.date-nav-left { display: flex; align-items: center; gap: 11px; }
.visible-period { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.date-nav-buttons a { display: grid; min-width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 22px; font-weight: 800; }
.date-nav-buttons .today-button { width: auto; padding: 0 13px; border-color: var(--teal); background: var(--teal); color: #fff; font-size: 13px; }
.period-tools { display: flex; align-items: stretch; gap: 7px; }
.registration-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.registration-switch > a, .registration-switch > span { min-height: 38px; padding: 8px 12px; font-size: 13px; }
.calendar-jump { display: flex; }
.calendar-print-button { min-height: 38px; padding: 7px 12px; font-size: 12px; }
.print-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #b8d7e6;
  border-radius: 10px;
  color: #1d5068;
  background: #edf8fd;
  font-size: 12px;
  font-weight: 800;
}
.print-schedule-heading { display: none; }
.calendar-jump-control {
  position: relative;
  display: flex;
  min-width: 66px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.calendar-jump-control > span:first-child { color: var(--teal); font-size: 17px; }
.calendar-jump-control input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.calendar-jump-control input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.calendar-jump-control:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.vehicle-inspection-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #e4b45f;
  border-radius: 10px;
  color: #6b4300;
  background: #fff7df;
  font-size: 12px;
  line-height: 1.45;
}
.vehicle-inspection-alert > strong { flex: 0 0 auto; }
.vehicle-inspection-alert div { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.vehicle-inspection-alert span { display: block; }
.timeline-scroll {
  width: 100%;
  max-height: max(320px, calc(100dvh - 200px));
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #c9d4df;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(15, 35, 58, .06);
  -webkit-overflow-scrolling: touch;
}
.timeline-grid {
  --day-width: 112px;
  --label-width: 92px;
  display: grid;
  position: relative;
  grid-template-columns: var(--label-width) repeat(var(--days), minmax(var(--day-width), 1fr));
  grid-template-rows: 58px repeat(var(--lanes), 76px);
  min-width: calc(var(--label-width) + (var(--days) * var(--day-width)));
  isolation: isolate;
}
.resource-grid { grid-template-rows: 58px repeat(var(--lanes), 92px); }
.people-grid { --label-width: 118px; }
.department-grid { --label-width: 0px; grid-template-rows: 58px repeat(var(--lanes), 78px); }
.department-grid .corner-cell { display: none; }
.resource-grid.sales-grid { grid-template-rows: 58px repeat(var(--lanes), 198px); }
.corner-cell, .date-cell {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.corner-cell { left: 0; z-index: 16; grid-column: 1; grid-row: 1; color: var(--muted); font-size: 12px; font-weight: 800; }
.date-cell { grid-row: 1; flex-direction: column; line-height: 1.2; }
.date-cell strong { font-size: 15px; }
.date-cell small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.date-cell em { max-width: calc(100% - 6px); margin-top: 2px; overflow: hidden; color: #a33a46; font-size: 8px; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.date-cell.day-0, .day-column.day-0 { background-color: #fff2f3; }
.date-cell.day-6, .day-column.day-6 { background-color: #f0f6fd; }
.date-cell.company-holiday, .day-column.company-holiday { background-color: #fff0f2; }
.date-cell.company-closure, .day-column.company-closure { background-color: #f4f1f7; }
.date-cell.is-today { color: #fff; background: var(--teal); }
.date-cell.context-day:not(.is-today) { background: #e8edf2; color: #536579; }
.date-cell.context-day { box-shadow: inset 0 -3px 0 #94a3b8; }
.date-cell.is-today small, .date-cell.is-today em { color: #e5fffa; }
.day-column { z-index: 0; grid-row: 2 / span var(--lanes); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.day-column.is-today { background-color: #e4f6f2; box-shadow: inset 2px 0 #35a89b, inset -2px 0 #35a89b; }
a.day-column:hover { background-image: linear-gradient(rgba(31,157,143,.07), rgba(31,157,143,.07)); }
.resource-day-link {
  z-index: 1;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.resource-day-link:hover { background: rgba(31,157,143,.08); }
.resource-day-link.is-today { background: rgba(31,157,143,.08); }
.sticky-rail { position: sticky; left: 0; z-index: 8; display: flex; grid-column: 1; grid-row: 2 / span var(--lanes); align-items: flex-start; justify-content: center; border-right: 1px solid var(--line); background: #f8fafc; pointer-events: none; }
.sticky-rail span { margin-top: 17px; color: var(--muted); font-size: 11px; font-weight: 800; writing-mode: vertical-rl; }
.resource-name {
  position: sticky;
  left: 0;
  z-index: 9;
  display: flex;
  grid-column: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  text-align: center;
}
.resource-name span { max-height: 62px; font-size: 12px; font-weight: 800; writing-mode: vertical-rl; }
.resource-name small { width: 100%; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.asset-grid { --label-width: 118px; }
.asset-resource-name { gap: 2px; padding: 6px 8px; }
.asset-resource-name span {
  max-height: none;
  width: 100%;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: normal;
  writing-mode: horizontal-tb;
}
.asset-resource-name small {
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
}
.people-grid .resource-name { padding: 8px; }
.people-grid .resource-name span {
  max-height: none;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
  writing-mode: horizontal-tb;
}
.people-grid .resource-name small { color: var(--teal); font-size: 10px; font-weight: 800; }
.schedule-bar {
  position: relative;
  z-index: 4;
  align-self: stretch;
  min-width: 0;
  margin: 7px 3px;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-left: 5px solid var(--schedule-border, #3478b8);
  border-radius: 9px;
  color: var(--schedule-text, #173551);
  background: var(--schedule-bg, #dfeefa);
  box-shadow: 0 2px 6px rgba(20, 55, 82, .10);
  text-align: left;
}
.schedule-bar:hover { filter: brightness(.97); transform: translateY(-1px); }
.schedule-bar strong, .schedule-bar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-bar strong { font-size: 13px; }
.schedule-bar span { margin-top: 5px; color: var(--schedule-subtext, #45627d); font-size: 10px; }
.schedule-bar .schedule-orderer { font-size: 9px; line-height: 1.2; }
.schedule-bar .schedule-worksite-name { color: var(--schedule-text, #173551); font-weight: 800; }
.department-grid .schedule-worksite-name,
.asset-grid .resource-booking:not(.shared-machine-booking) .schedule-worksite-name,
.people-grid .schedule-worksite-name { margin-top: 1px; line-height: 1.15; }
.schedule-bar .schedule-time { margin-top: 1px; line-height: 1.15; }
.schedule-bar .personal-work-line {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  margin-top: 2px;
}
.schedule-bar .personal-work-line > b { flex: 0 0 auto; }
.schedule-bar .personal-work-line > span {
  min-width: 0;
  margin-top: 0;
}
.schedule-bar .schedule-leader { margin-top: 2px; color: var(--schedule-accent, #15776c); font-weight: 800; }
.schedule-bar .schedule-team-line {
  display: flex;
  align-items: baseline;
  column-gap: 6px;
  row-gap: 0;
  margin-top: 2px;
  overflow: visible;
  flex-wrap: wrap;
  line-height: 1.15;
  text-overflow: clip;
  white-space: normal;
}
.schedule-bar .schedule-team-line .schedule-leader,
.schedule-bar .schedule-team-line .schedule-members { display: inline; margin-top: 0; }
.schedule-bar .schedule-team-line .schedule-contract-workers { display: inline; margin-top: 0; line-height: 1.15; }
.schedule-bar .schedule-members {
  overflow: visible;
  color: var(--schedule-subtext, #45627d);
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.weekly-plan-card {
  z-index: 5;
  align-self: start;
  height: 58px;
  min-width: 0;
  margin-right: 4px;
  margin-left: 4px;
  padding: 5px 9px;
  overflow: hidden;
  border: 2px dashed #7485a3;
  border-radius: 8px;
  color: #263957;
  background: #f1f4fb;
  text-decoration: none;
}
.weekly-plan-card strong, .weekly-plan-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.weekly-plan-card strong { font-size: 11px; }
.weekly-plan-card span { font-size: 10px; }
.weekly-plan-card:hover { background: #e6edfa; }
.resource-booking { margin-block: 5px; }
.department-grid .resource-booking { margin-block: 2px; padding: 5px 8px; }
.department-grid .resource-booking strong { font-size: 14px; }
.department-grid .resource-booking span { font-size: 11px; }
.department-grid .resource-booking .schedule-orderer { font-size: 10px; line-height: 1.1; }
.department-grid .resource-booking .schedule-team-line { margin-top: 1px; }
.department-grid .department-work-line { font-size: 10px; line-height: 1.1; margin-top: 1px; }
.department-grid .department-work-line > span { font-size: inherit; }
.asset-group-gap { z-index: 3; background: #e5eaf0; border-block: 1px solid #cbd5df; }
.asset-grid .resource-booking:not(.shared-machine-booking) .schedule-orderer,
.people-grid .resource-booking .schedule-orderer { line-height: 1.1; }
.schedule-bar.leave-booking strong { font-size: 10px; line-height: 1.15; }
.department-grid .schedule-bar.leave-booking strong { font-size: 11px; }
.schedule-bar.leave-booking span { margin-top: 1px; line-height: 1.15; }
.schedule-bar .leave-comment,
.schedule-bar .schedule-lodging { margin-top: 2px; color: var(--schedule-text, #173551); }
.shared-machine-booking { margin-block: 4px; padding: 5px 7px; }
.shared-machine-booking strong { font-size: 11px; line-height: 1.2; }
.shared-machine-booking span { margin-top: 2px; font-size: 9px; line-height: 1.15; }
.shared-machine-booking .schedule-orderer { font-size: 8px; }
.shared-machine-booking .shared-machine-meta { color: var(--schedule-text, #173551); font-weight: 700; }
.shared-machine-booking .shared-machine-meta b { color: #8a2733; font-weight: 900; }
.maintenance-booking {
  --schedule-bg: #343b45;
  --schedule-border: #111827;
  --schedule-text: #ffffff;
  --schedule-subtext: #e5e7eb;
  --schedule-accent: #ffffff;
  border-left-width: 6px;
  box-shadow: 0 3px 8px rgba(17, 24, 39, .24);
}
.maintenance-booking strong { color: #fff; }
.maintenance-booking span { color: #e5e7eb; }
.transport-booking {
  --schedule-bg: #fde7e9;
  --schedule-border: #c93445;
  --schedule-text: #7f1422;
  --schedule-subtext: #9f2231;
  --schedule-accent: #b42333;
  border-left-width: 6px;
  box-shadow: 0 3px 8px rgba(164, 29, 47, .18);
}
.transport-booking strong { color: #7f1422; }
.schedule-bar .shared-source-org { color: var(--schedule-text, #173551); font-weight: 800; }
.schedule-bar.has-note { padding-right: 20px; }
.schedule-bar .note-flag {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-flex;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  overflow: visible;
  border-radius: 99px;
  color: #fff;
  background: #c63f4e;
  box-shadow: 0 0 0 2px var(--schedule-bg, #dfeefa);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.sales-grid .day-column {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 21px,
    rgba(89, 112, 133, .13) 21px,
    rgba(89, 112, 133, .13) 22px
  );
}
.sales-grid .resource-booking {
  align-self: start;
  height: var(--booking-height);
  margin: var(--booking-top) 3px 0;
  padding: 2px 6px;
}
.sales-grid .resource-booking strong { font-size: 11px; line-height: 1.05; }
.sales-grid .resource-booking span { margin-top: 1px; font-size: 9px; line-height: 1.05; }
.sales-grid .resource-booking .schedule-orderer { font-size: 8px; }
.sales-grid .resource-booking .sales-time { color: var(--schedule-text, #173551); font-weight: 800; }
.category-sales { --schedule-border: #7962b8; --schedule-bg: #eee9fb; --schedule-text: #42346d; }
.category-general_affairs, .category-internal { --schedule-border: #64748b; --schedule-bg: #eef1f5; }
.category-field_night { --schedule-border: #4c4b9d; --schedule-bg: #e9e9fa; --schedule-text: #32316e; }
.category-travel { --schedule-border: #1f9d8f; --schedule-bg: #e5f7f4; --schedule-text: #17685f; }
.category-visitor { --schedule-border: var(--orange); --schedule-bg: #fff0df; --schedule-text: #73421d; }
.continues-before { border-radius: 2px 9px 9px 2px; }
.continues-after { border-radius: 9px 2px 2px 9px; }
.empty-board { z-index: 5; grid-column: 2 / -1; grid-row: 2; align-self: center; padding: 18px; color: var(--muted); font-size: 13px; text-align: center; pointer-events: none; }

.panel, .detail-card, .form-section { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 6px 24px rgba(15, 35, 58, .05); }
.narrow-panel { width: min(620px, calc(100% - 28px)); margin: 42px auto; padding: clamp(22px, 4vw, 38px); }
.stack-form { display: grid; gap: 16px; margin-top: 22px; }
.field-block { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field-block label, .field-label { color: #33465b; font-size: 13px; font-weight: 800; }
.field-block input:not([type="checkbox"]):not([type="radio"]), .field-block select, .field-block textarea, .person-filter select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bcc9d6;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
.field-block input[type="color"] { min-height: 50px; padding: 4px; }
.field-block textarea { resize: vertical; }
.field-block small, .security-note { color: var(--muted); font-size: 11px; line-height: 1.55; }
#id_inspection_methods { display: flex; flex-wrap: wrap; gap: 8px; }
#id_inspection_methods > div label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 112px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}
#id_inspection_methods input { width: 18px; height: 18px; margin: 0; }
.errorlist { margin: 0; padding: 0; color: var(--red); font-size: 12px; list-style: none; }
.form-alert, .info-banner { margin-bottom: 17px; padding: 13px 15px; border-radius: 10px; font-size: 13px; }
.form-alert { color: #8a2733; border: 1px solid #ebbec4; background: #fff1f2; }
.info-banner { color: #1d5068; border: 1px solid #b8d7e6; background: #edf8fd; }
.schedule-form { display: grid; gap: 16px; }
.form-section { padding: clamp(18px, 3vw, 26px); }
.form-section h2 { padding-bottom: 12px; border-bottom: 1px solid #e6ebf0; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.worksite-search { display: flex; gap: 8px; margin: 7px 0; }
.worksite-search input { min-width: 0; flex: 1; }
.worksite-search button { min-height: 38px; padding: 7px 10px; border: 1px solid #c3ced9; border-radius: 8px; color: #40536a; background: #f8fafc; font-size: 12px; font-weight: 700; }
.worksite-search-status { display: block; min-height: 1.5em; margin: -1px 0 5px; }
.worksite-search-results { display: grid; gap: 5px; margin: 0 0 8px; }
.worksite-search-results[hidden] { display: none; }
.worksite-search-results button { min-height: 38px; padding: 8px 10px; overflow: hidden; border: 1px solid #c6e2de; border-radius: 8px; color: #175a54; background: #f2fbf9; font-size: 12px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.content-label-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.content-label-row .temporary-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid #c3ced9;
  border-radius: 7px;
  background: #f8fafc;
  cursor: pointer;
}
.temporary-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--teal); }
.meeting-method-field > div,
.meeting-method-field ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.meeting-method-field > div > div { display: block; }
.meeting-method-field label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid #c3ced9;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 12px;
  cursor: pointer;
}
.meeting-method-field input {
  appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid #9bacbc;
  border-radius: 4px;
  background: #fff;
}
.meeting-method-field input:checked {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: inset 0 0 0 3px #fff;
}
.meeting-method-field label:has(input:checked) {
  color: #116b62;
  border-color: var(--teal);
  background: var(--teal-soft);
}
.meeting-room-field { margin-bottom: 18px; }
.meeting-room-field .check-grid > div { display: flex; }
.meeting-room-field .check-grid label { width: fit-content; min-height: 34px; padding: 5px 9px; }
.meeting-room-field .check-grid input[type="radio"] { width: 16px; height: 16px; }
.schedule-trip-check {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid #c4d0db;
  border-radius: 9px;
  color: #33465b;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.schedule-trip-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.schedule-trip-row { display: flex; align-items: end; gap: 14px; margin-top: 12px; }
.schedule-trip-row .schedule-trip-check { flex: 0 0 auto; margin-top: 0; }
.schedule-lodging-field { width: min(420px, 100%); margin: 0; }
.visitor-fields, .custom-time-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.shift-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.native-shift-field { display: none; }
.shift-buttons button { display: flex; min-height: 62px; flex-direction: column; justify-content: center; gap: 3px; border: 1px solid #bdcad6; border-radius: 11px; color: #40536a; background: #fff; }
.shift-buttons button strong { font-size: 14px; }
.shift-buttons button span { font-size: 10px; }
.shift-buttons button.active { color: #fff; border-color: var(--teal); background: var(--teal); }
.leader-field { max-width: 520px; margin-bottom: 20px; }
.assignment-layout { display: grid; grid-template-columns: minmax(150px, .38fr) minmax(0, .62fr); gap: 22px; align-items: start; }
.assignment-leader { position: sticky; top: 86px; }
.assignment-members { min-width: 0; }
.check-grid > div, .check-grid ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.check-grid label { display: flex; min-height: 40px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #d7e0e8; border-radius: 9px; background: #fbfcfd; font-size: 12px; font-weight: 600; }
.check-grid input { width: 17px; height: 17px; accent-color: var(--teal); }
.check-grid .is-confirmed-unavailable label { border-color: #e0ad42; background: #fff7df; }
.check-grid .is-confirmed-unavailable label::after { content: "確定予定あり"; margin-left: auto; color: #8b5b00; font-size: 10px; font-weight: 800; }
.support-toggle { margin-top: 18px; padding: 10px 13px; border: 1px dashed var(--teal); border-radius: 9px; color: #16776c; background: var(--teal-soft); font-weight: 800; }
.support-panel { margin-top: 12px; padding: 16px; border: 1px solid #b9ded8; border-radius: 12px; background: #f2fbf9; }
.support-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.support-heading span { color: var(--muted); font-size: 10px; }
.shared-machine-options { display: grid; gap: 10px; margin: 14px 0 20px; }
.shared-machine-option,
.shared-common-option {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, .7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 13px 14px;
  border: 1px solid #b9ded8;
  border-radius: 11px;
  background: #f2fbf9;
}
.shared-machine-option[hidden], .shared-common-option[hidden] { display: none; }
.shared-machine-option-heading { align-self: center; }
.shared-machine-option-heading strong,
.shared-machine-option-heading small { display: block; }
.shared-machine-option-heading small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.business-trip-check {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid #c4d0db;
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.business-trip-check input { width: 18px; height: 18px; accent-color: var(--teal); }
.shared-common-option { grid-template-columns: 1fr; }
.compact-check-grid > div,
.compact-check-grid ul { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
.compact-section { padding-bottom: 22px; }
.field-choice-note { margin: -2px 0 0; color: var(--muted); font-size: 11px; }
.transport-fixed-note { margin: 15px 0 0; color: #8a2733; font-size: 12px; font-weight: 700; }
.transport-primary-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #b42333;
  border-radius: 10px;
  color: #fff;
  background: #c93445;
  font-weight: 800;
}
.transport-primary-button:hover { background: #a91f30; }
.conflict-note { padding: 12px 14px; border: 1px solid #edcf99; border-radius: 10px; color: #76501d; background: #fff8e8; font-size: 12px; line-height: 1.6; }
.form-submit-bar, .detail-actions, .button-row { display: flex; justify-content: flex-end; gap: 10px; }
.form-submit-bar { position: sticky; z-index: 18; bottom: 0; margin: 0 -4px; padding: 12px 4px calc(12px + env(safe-area-inset-bottom)); background: rgba(244,247,250,.94); backdrop-filter: blur(8px); }

.detail-page { width: min(900px, 100%); margin: 0 auto; }
.detail-heading { align-items: flex-start; }
.detail-heading .eyebrow { flex: 0 0 auto; margin-top: 12px; font-size: 14px; }
.detail-top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.detail-return-button { font-size: 14px; }
.detail-top-actions .detail-compact-action { min-height: 38px; padding: 7px 12px; border-radius: 9px; font-size: 12px; }
.detail-card { padding: clamp(18px, 4vw, 32px); }
.detail-status { display: flex; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.category-badge { padding: 5px 10px; border-radius: 999px; background: var(--blue-soft); font-weight: 800; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 15px 0; border-top: 1px solid #e5ebf0; }
.detail-list dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.detail-list dd { margin: 0; line-height: 1.7; }
.person-chip, .resource-chip { display: inline-flex; align-items: center; gap: 5px; margin: 2px 5px 2px 0; padding: 5px 8px; border-radius: 7px; background: #edf3f8; font-size: 12px; }
.person-chip small, .resource-chip small { color: var(--teal); font-size: 9px; font-weight: 800; }
.detail-history { display: grid; gap: 8px; }
.note-card { margin-top: 14px; }
.note-heading { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 16px; }
.note-heading span { color: var(--muted); font-size: 12px; font-weight: 400; }
.note-item { padding: 11px 0; border-top: 1px solid var(--line); }
.note-item:first-of-type { border-top: 0; }
.note-body { margin: 0 0 5px; font-size: 14px; line-height: 1.7; }
.note-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; color: var(--muted); font-size: 11px; }
.note-meta em { font-style: normal; font-weight: 700; }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.note-actions form { margin: 0; }
.note-actions button { min-height: 44px; padding-inline: 14px; }
.note-done .note-body, .note-withdrawn .note-body { color: var(--muted); text-decoration: line-through; }
.note-withdrawn .note-meta em { color: var(--muted); }
.note-done .note-meta em { color: var(--teal); }
.note-empty { margin: 0; color: var(--muted); font-size: 13px; }
.note-form { display: grid; gap: 9px; margin-top: 14px; }
.note-form textarea { width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid #bcc9d6; border-radius: 9px; resize: vertical; }
.internal-use-notice { display: block; margin: 22px 14px 8px; color: #536579; font-size: 11px; font-weight: 700; line-height: 1.6; text-align: center; }
.company-logo { display: flex; justify-content: center; margin: 0 auto 2px; padding: 0 14px; }
.company-logo img { display: block; width: min(100%, 330px); height: auto; max-height: 52px; object-fit: contain; }
.history-entry { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 2px 10px; }
.history-entry + .history-entry { padding-top: 8px; border-top: 1px solid #edf0f3; }
.history-entry strong { color: var(--navy); font-size: 12px; }
.history-entry span { font-size: 13px; }
.history-entry small { grid-column: 2; color: var(--muted); font-size: 11px; }
.detail-actions { margin-top: 16px; }
.danger-panel { border-color: #e6bcc2; }

.master-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.master-tabs a { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 700; }
.master-tabs a.active { color: #fff; border-color: var(--navy); background: var(--navy); }
.master-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding: 14px; }
.master-filter-form { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.master-filter-form label { display: grid; min-width: 150px; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.master-filter-form input,
.master-filter-form select { min-height: 40px; padding: 8px 10px; border: 1px solid #bcc9d6; border-radius: 9px; background: #fff; }
.master-filter-form input[type="search"] { width: min(300px, 100%); }
.master-filter-actions,
.master-import-actions { display: flex; gap: 8px; }
.master-import-actions { flex: 0 0 auto; }
.master-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr); gap: 16px; align-items: start; }
.master-layout .panel { padding: 20px; }
.asset-history-tools { align-items: stretch; flex-direction: column; }
.asset-history-tools .master-import-actions { justify-content: flex-end; }
.asset-history-panel { padding: 18px; }
.asset-history-summary { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.asset-history-summary strong { color: var(--navy); font-size: 18px; }
.asset-history-table-wrap { overflow-x: auto; }
.asset-history-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.asset-history-table th, .asset-history-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.asset-history-table th { color: #40556d; background: #f5f8fb; font-size: 12px; white-space: nowrap; }
.asset-history-table td { color: var(--navy); font-size: 13px; }
.asset-history-table td strong, .asset-history-table td small { display: block; }
.asset-history-table td small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.master-list h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.master-list h2 small { color: var(--muted); font-size: 10px; font-weight: 600; }
.master-items { display: grid; max-height: 650px; gap: 5px; overflow-y: auto; }
.master-items a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; background: #f7f9fb; font-size: 12px; }
.master-items a.active { color: var(--navy); background: var(--blue-soft); font-weight: 800; }
.master-items small { color: var(--teal); }
.master-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; font-size: 12px; }
.master-pagination a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 800; }
.master-pagination span { color: var(--muted); }
.master-import-page { width: min(900px, 100%); }
.import-guide p { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.import-columns { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.import-columns strong,
.import-columns span { padding: 6px 9px; border-radius: 7px; font-size: 11px; }
.import-columns strong { color: #fff; background: var(--navy); }
.import-columns span { color: #29445e; background: #edf3f8; }
.import-errors { display: grid; gap: 5px; margin-top: 14px; }
.import-errors span { display: block; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 22px; background: radial-gradient(circle at top left, #244c73 0, #12345b 45%, #091e35 100%); }
.login-page .app-main { width: 100%; }
.login-card { width: min(420px, 100%); margin: auto; padding: clamp(26px, 6vw, 42px); border-radius: 20px; background: #fff; box-shadow: 0 25px 70px rgba(3, 18, 35, .35); }
.login-logo { width: 54px; height: 54px; margin-bottom: 18px; color: #fff; background: var(--navy); font-size: 22px; }
.login-card h1 { margin-bottom: 8px; }
.login-card > p { color: var(--muted); font-size: 13px; }
.security-note { display: block; margin-top: 18px; text-align: center; }

.action-sheet-backdrop { position: fixed; z-index: 60; inset: 0; background: rgba(8, 24, 40, .45); }
.action-sheet {
  position: fixed;
  z-index: 61;
  right: 14px;
  bottom: 14px;
  width: min(390px, calc(100% - 28px));
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(5, 24, 42, .28);
}
.action-sheet[hidden], .action-sheet-backdrop[hidden] { display: none; }
.sheet-handle { display: none; width: 44px; height: 4px; margin: 0 auto 10px; border-radius: 99px; background: #c7d0da; }
.action-sheet h2 { margin: 5px 6px 9px; font-size: 17px; }
.action-sheet a, .sheet-close { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 10px 12px; border: 0; border-top: 1px solid #edf0f3; background: transparent; font-weight: 700; }
.action-sheet a[hidden] { display: none; }
.action-sheet .danger-link { color: var(--red); }
.sheet-close { justify-content: center; margin-top: 7px; border: 0; border-radius: 9px; color: var(--muted); background: #f0f3f6; }

@media (max-width: 760px) {
  .app-header { min-height: 60px; padding: 8px 12px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 14px; }
  .brand small, .user-name, .header-link { display: none; }
  .calendar-screen .app-header { gap: 9px; }
  .header-calendar-context { gap: 8px; margin-left: 0; }
  .header-calendar-title { font-size: 15px; }
  .header-current-scope { display: block; padding-left: 8px; }
  .header-current-scope small, .header-current-scope strong { display: block; }
  .header-current-scope small { font-size: 8px; }
  .header-current-scope strong { max-width: 145px; font-size: 11px; }
  .calendar-screen .header-actions { gap: 7px; }
  .calendar-screen .text-button { font-size: 11px; white-space: nowrap; }
  .calendar-page, .form-page, .detail-page, .master-page { padding: 17px 10px 36px; }
  .calendar-toolbar { align-items: flex-end; }
  .compact-calendar-toolbar { margin-bottom: 7px; }
  .calendar-toolbar h1 { font-size: 23px; }
  .calendar-title-line { gap: 10px; }
  .current-scope { display: block; padding-left: 10px; }
  .current-scope span, .current-scope strong { display: block; }
  .current-scope span { font-size: 9px; }
  .current-scope strong { max-width: 180px; font-size: 12px; }
  .visible-period { display: none; }
  .add-button { min-height: 40px; padding: 8px 12px; font-size: 12px; }
  .timeline-add-button { right: 10px; bottom: 21px; min-height: 46px; padding-inline: 14px; font-size: 12px; }
  .timeline-add-button-above-weekly { bottom: 76px; }
  .timeline-maintenance-button { bottom: 76px; }
  .timeline-transport-button { bottom: 131px; }
  .view-controls { align-items: stretch; flex-direction: column; }
  .board-tabs { width: 100%; overflow-x: auto; }
  .board-tabs a, .period-switch a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
  .board-tabs a { flex: 1 0 auto; text-align: center; }
  .date-nav-buttons a { min-width: 44px; height: 44px; }
  .person-filter { justify-content: space-between; }
  .master-tools { align-items: stretch; flex-direction: column; }
  .master-filter-form { display: grid; grid-template-columns: 1fr; }
  .master-filter-form label, .master-filter-form input[type="search"] { width: 100%; }
  .master-filter-actions, .master-import-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .person-filter select { min-width: 0; flex: 1; }
  .timeline-grid { --day-width: 100px; --label-width: 78px; grid-template-columns: var(--label-width) repeat(var(--days), var(--day-width)); min-width: calc(var(--label-width) + (var(--days) * var(--day-width))); }
  .people-grid { --label-width: 104px; }
  .asset-grid { --label-width: 108px; }
  .department-grid { --label-width: 0px; }
  .department-grid:not(.sales-grid) { --department-extra: 20px; --day-width: 116px; }
  .corner-cell, .sticky-rail, .resource-name { width: var(--label-width); }
  .schedule-bar { padding-inline: 8px; }
  .form-grid.two-columns:not(.date-fields-grid), .visitor-fields, .custom-time-fields { grid-template-columns: 1fr; }
  .date-fields-grid { grid-template-columns: repeat(2, minmax(125px, 1fr)); gap: 10px; }
  .schedule-trip-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .schedule-lodging-field { width: 100%; }
  .assignment-layout { grid-template-columns: minmax(130px, .38fr) minmax(0, .62fr); gap: 12px; }
  .assignment-leader { position: static; }
  .assignment-members .check-grid > div, .assignment-members .check-grid ul { grid-template-columns: 1fr; }
  .shift-buttons { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .shift-buttons button { min-height: 60px; padding-inline: 4px; }
  .check-grid > div, .check-grid ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shared-machine-option { grid-template-columns: 1fr 1fr; }
  .shared-machine-option-heading { grid-column: 1 / -1; }
  .detail-list > div { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
  .detail-heading { display: block; }
  .detail-heading .eyebrow { margin: 0 0 10px; }
  .detail-top-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-top-actions a { min-width: 0; padding-inline: 8px; }
  .master-layout { grid-template-columns: 1fr; }
  .action-sheet { right: 0; bottom: 0; width: 100%; max-width: none; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .sheet-handle { display: block; }
}

@media (max-width: 420px) {
  .period-switch a { padding-inline: 9px; }
  .calendar-jump-control { min-width: 42px; }
  .calendar-jump-text { display: none; }
  .check-grid > div, .check-grid ul { grid-template-columns: 1fr; }
  .assignment-layout { grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
  .form-submit-bar .primary-button, .form-submit-bar .secondary-button { flex: 1; }
}

@media (max-width: 520px) {
  .date-fields-grid { grid-template-columns: 1fr; }
}

@page shared-machine-calendar {
  size: A3 landscape;
  margin: 8mm;
}

.print-calendar-screen { page: shared-machine-calendar; }
.print-calendar-pages { display: none; }
.department-print-content { display: none; }
@page department-calendar { size: A4 landscape; margin: 8mm; }
.department-print-screen { page: department-calendar; }
.department-print-screen .screen-calendar-timeline { display: none; }
.department-print-screen .department-print-content { display: block; padding: 12px; background: white; color: #162b40; }
.department-print-content h1 { margin: 0 0 4px; font-size: 15pt; }
.department-print-content > p { margin: 0 0 8px; font-size: 9pt; }
.department-print-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 8pt; }
.department-print-table th, .department-print-table td { border: 1px solid #a8b5c3; padding: 4px; vertical-align: top; overflow-wrap: anywhere; }
.department-print-table thead th { background: #eef2f6; text-align: center; }
.department-print-table th small { display: block; font-size: 7pt; }
.department-print-person { width: 17mm; }
.department-print-booking { line-height: 1.25; }
.department-print-booking + .department-print-booking { border-top: 1px solid #cbd5df; margin-top: 4px; padding-top: 4px; }
.department-print-undated { margin-top: 8px; font-size: 8pt; }
@media print {
  body.department-print-screen .calendar-page { width: 281mm; }
  .department-print-content + .department-print-content { break-before: page; page-break-before: always; }
  .department-print-screen .department-print-content { padding: 0; width: 281mm; }
  .department-print-screen .print-calendar-pages,
  .department-print-screen .internal-use-notice,
  .department-print-screen .company-logo { display: none !important; }
  .department-print-table thead { display: table-header-group; }
  .department-print-table tr { break-inside: avoid; }
}

@media print {
  :root { background: #fff; }
  body.print-calendar-screen { width: auto; min-width: 0; background: #fff; }
  .print-calendar-screen, .print-calendar-screen .app-main { margin: 0; padding: 0; }
  .print-calendar-screen .app-main,
  .print-calendar-screen .calendar-page,
  .print-calendar-screen .print-calendar-page { background: #fff; }
  .print-calendar-screen { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-calendar-screen .app-header,
  .print-calendar-screen .view-controls,
  .print-calendar-screen .date-nav,
  .print-calendar-screen .vehicle-inspection-alert,
  .print-calendar-screen .timeline-add-button,
  .print-calendar-screen .organization-tabs,
  .print-calendar-screen .development-preview-link,
  .print-calendar-screen .print-preview-toolbar { display: none !important; }
  .print-calendar-screen .print-schedule-heading-single,
  .print-calendar-screen .screen-calendar-timeline { display: none !important; }
  .print-calendar-screen .print-calendar-pages { display: block; }
  .print-calendar-screen .print-calendar-page {
    width: 404mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .print-calendar-screen .print-calendar-page + .print-calendar-page {
    break-before: page;
    page-break-before: always;
  }
  .print-calendar-screen .calendar-page { width: 404mm; margin: 0; padding: 0; }
  .print-calendar-screen .print-schedule-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 3mm;
    color: #0b223d;
  }
  .print-calendar-screen .print-schedule-heading h1 { margin: 0; font-size: 16pt; }
  .print-calendar-screen .print-schedule-heading p { margin: 0; font-size: 9pt; font-weight: 700; }
  .print-calendar-screen .timeline-frame { width: 404mm; }
  .print-calendar-screen .timeline-scroll {
    width: 404mm;
    max-height: none;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
  }
  .print-calendar-screen .timeline-grid {
    --label-width: 30mm !important;
    --day-width: calc((404mm - var(--label-width)) / var(--days)) !important;
    width: 404mm;
    min-width: 404mm;
    grid-template-columns: var(--label-width) repeat(var(--days), minmax(0, 1fr));
  }
  .print-calendar-screen .corner-cell,
  .print-calendar-screen .date-cell,
  .print-calendar-screen .resource-name { position: static; }
  .print-calendar-screen .corner-cell,
  .print-calendar-screen .date-cell { background: #f8fafc !important; }
  .print-calendar-screen .date-cell.is-today { color: #fff; background: #1f9d8f !important; }
  .print-calendar-screen .resource-name { width: auto; }
  .print-calendar-screen .resource-name span { font-size: 9pt; }
  .print-calendar-screen .resource-name small { font-size: 7pt; }
  .print-calendar-screen .schedule-bar {
    border-radius: 2mm;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .print-calendar-screen .shared-machine-booking strong { font-size: 8pt; }
  .print-calendar-screen .shared-machine-booking span { font-size: 6.5pt; }
  .print-calendar-screen .shared-machine-booking .schedule-orderer { font-size: 6pt; }
}
