:root {
  color-scheme: light;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  background: #f6f8fb;
  color: #182230;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f8fb;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef5ff, #f7f7f2 55%, #fff);
}

.login-panel {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(20, 32, 52, 0.12);
}

.eyebrow {
  margin: 0 0 6px;
  color: #174ea6;
  font-weight: 700;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 0;
}

.lead {
  color: #526071;
  line-height: 1.8;
}

.login-form,
.modal.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 700;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: #182230;
}

textarea {
  resize: vertical;
}

button,
.primary {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 6px;
  background: #174ea6;
  color: #fff;
  font-weight: 700;
}

.ghost {
  background: #eef2f7;
  color: #1f2937;
}

.danger-btn {
  background: #dc2626;
}

.hint {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.topbar h1 {
  font-size: 28px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.print-button {
  background: #0f766e;
}

.print-heading {
  display: none;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary-strip article {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 13px;
}

.summary-strip span,
.summary-strip small {
  display: block;
  color: #667085;
  font-size: 12px;
}

.summary-strip strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow-x: visible;
  margin: 12px 0;
  padding-bottom: 2px;
}

.tabs button {
  flex: 1 1 96px;
  white-space: nowrap;
  background: #e8edf5;
  color: #1f2937;
}

.tabs button.active {
  background: #174ea6;
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  white-space: nowrap;
}

.check input {
  width: auto;
  min-height: auto;
}

.workload-panel,
.schedule-wrap,
.decision-list,
.staff-view {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 14px;
}

.workload-panel {
  margin-bottom: 12px;
}

.workload-panel h2,
.decision-list h2,
.staff-view h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.calc-note {
  margin: -4px 0 10px;
  color: #667085;
  font-size: 13px;
}

.month-meter {
  display: grid;
  grid-template-columns: repeat(24, minmax(46px, 1fr));
  gap: 7px;
  min-height: 120px;
  overflow-x: auto;
}

.meter {
  position: relative;
  min-height: 110px;
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #f8fafc;
  overflow: hidden;
}

.meter b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  opacity: 0.42;
}

.meter span,
.meter em {
  position: relative;
  z-index: 1;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.meter.low b,
.decision-list .low {
  background: #fee2e2;
}

.meter.light b,
.decision-list .light {
  background: #fef3c7;
}

.meter.normal b {
  background: #bbf7d0;
}

.meter.busy b {
  background: #fed7aa;
}

.meter.danger b {
  background: #fecaca;
}

.schedule-wrap {
  overflow: auto;
}

.schedule-grid {
  min-width: 1840px;
  display: grid;
  grid-template-columns: 230px repeat(24, minmax(64px, 1fr));
  grid-auto-rows: 58px;
  position: relative;
  border-top: 1px solid #cbd5e1;
  border-left: 1px solid #cbd5e1;
}

.corner,
.month-head,
.site-name,
.cell {
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  background: #fff;
}

.corner,
.month-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: #eef2f7;
  font-weight: 700;
}

.corner {
  left: 0;
  z-index: 4;
}

.site-name {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 9px;
  background: #fff;
  overflow: hidden;
  border: 0;
  appearance: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  width: 100%;
}

.site-name strong,
.site-name small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-name small {
  color: #667085;
  font-size: 12px;
}

.site-name:hover {
  background: #f8fafc;
}

.site-name:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.cell {
  background-image: linear-gradient(90deg, rgba(203, 213, 225, 0.2), rgba(203, 213, 225, 0.2));
}

.cell.has-work {
  background: #f8fafc;
}

.bar {
  align-self: center;
  justify-self: stretch;
  height: 30px;
  margin: 0 8px;
  padding: 5px 8px;
  grid-row: auto;
  z-index: 1;
  background: var(--status-bg);
  color: var(--status-text);
  border: 1px solid var(--status-border);
  border-radius: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
  min-width: 0;
}

.mobile-overview-cards {
  display: none;
}

.mobile-year-judgement {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-schedule-panel {
  display: none;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.mobile-schedule-scroll {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.mobile-schedule-table {
  min-width: 1350px;
  display: grid;
  grid-template-columns: 150px repeat(24, 50px);
  grid-auto-rows: 48px;
  background: #cbd5e1;
  gap: 1px;
}

.mobile-site-head,
.mobile-month-head,
.mobile-site-cell,
.mobile-work-cell {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #182230;
}

.mobile-site-head,
.mobile-month-head {
  display: grid;
  place-items: center;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 700;
}

.mobile-site-head,
.mobile-site-cell {
  position: sticky;
  left: 0;
  z-index: 2;
}

.mobile-site-head {
  z-index: 4;
}

.mobile-site-cell {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1px;
  padding: 6px 8px;
  text-align: left;
  background: #fff;
}

.mobile-site-cell strong,
.mobile-site-cell span {
  width: 100%;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-site-cell strong {
  font-size: 12px;
}

.mobile-site-cell span {
  color: #667085;
  font-size: 10px;
}

.mobile-work-cell {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: #94a3b8;
  font-size: 10px;
}

.mobile-work-cell.active {
  background: var(--status-bg);
  color: var(--status-text);
}

.mobile-section-head h2 {
  margin-bottom: 2px;
  font-size: 18px;
}

.mobile-section-head p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.mobile-month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.mobile-month {
  min-height: 92px;
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 4px;
  padding: 6px 4px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  color: #182230;
  background: #f8fafc;
}

.mobile-month-main {
  width: 100%;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  appearance: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.mobile-month span,
.mobile-month strong,
.mobile-month em {
  display: block;
  line-height: 1.15;
}

.mobile-month span {
  font-size: 12px;
}

.mobile-month strong {
  font-size: 17px;
}

.vacancy-pill {
  width: 100%;
  min-height: 22px;
  border: 0;
  appearance: none;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.75);
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 0 2px;
  cursor: pointer;
}

.duplicate-pill {
  color: #b91c1c;
}

.mobile-month em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}

.vacancy-panel {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.vacancy-panel h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.vacancy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vacancy-list span {
  padding: 6px 10px;
  border: 1px solid #fdba74;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.staff-chip {
  padding: 6px 10px;
  border: 1px solid #fca5a5;
  border-radius: 999px;
  background: #fff;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.duplicate-panel .vacancy-list span {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.duplicate-panel .staff-chip:hover {
  background: #fef2f2;
}

.mobile-month.low {
  background: #fee2e2;
  border-color: #fca5a5;
}

.mobile-month.light {
  background: #fef3c7;
  border-color: #fcd34d;
}

.mobile-month.normal {
  background: #dcfce7;
  border-color: #86efac;
}

.mobile-month.busy {
  background: #ffedd5;
  border-color: #fdba74;
}

.mobile-month.danger {
  background: #fecaca;
  border-color: #f87171;
}

.mobile-decision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-decision article {
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.mobile-decision span,
.mobile-decision em {
  display: block;
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.mobile-decision strong {
  display: block;
  margin: 2px 0;
  font-size: 15px;
}

.project-card {
  min-width: 0;
  max-width: 100%;
  background: #fff;
  border: 2px solid var(--status-border);
  border-left-width: 8px;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(20, 32, 52, 0.07);
}

.project-card.jump-target {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 10px 26px rgba(20, 32, 52, 0.12);
}

.card-primary-action {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-primary-action:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
  border-radius: 6px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-head h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.card-head p {
  color: #667085;
  margin: 0;
}

.card-head span {
  align-self: start;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--status-bg);
  color: var(--status-text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.project-card dl,
.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.mini-timeline {
  display: flex;
  gap: 3px;
  margin: 10px 0 12px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 3px;
}

.mini-timeline span {
  flex: 0 0 32px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 4px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.mini-timeline span.active {
  background: var(--status-bg);
  border-color: var(--status-border);
  color: var(--status-text);
}

.project-card dl div,
.detail-list div {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 10px;
}

dt {
  color: #667085;
  font-weight: 700;
}

dd {
  margin: 0;
}

.card-actions,
.modal footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.card-actions button {
  background: #eef2f7;
  color: #1f2937;
}

.decision-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.decision-list article {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
}

.decision-list em {
  font-style: normal;
  color: #174ea6;
  font-weight: 700;
}

.shortage-list article {
  background: #fff7ed;
}

.shortage-list em {
  color: #b45309;
}

.staff-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.staff-select button {
  background: #eef2f7;
  color: #1f2937;
}

.staff-select button.active {
  background: #174ea6;
  color: #fff;
}

.availability {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.availability h3 {
  flex-basis: 100%;
  font-size: 16px;
  margin: 0;
}

.availability span {
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid #dbe3ef;
  font-size: 13px;
}

.availability .free {
  background: #ecfdf5;
  color: #047857;
}

.availability .busy {
  background: #fef3c7;
  color: #92400e;
}

.settings-view {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 14px;
}

.settings-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.settings-head h2 {
  margin-bottom: 2px;
  font-size: 20px;
}

.settings-head p,
.setting-note {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-panel {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.settings-panel.wide,
.settings-footer {
  grid-column: 1 / -1;
}

.settings-panel h3 {
  margin: 0;
  font-size: 16px;
}

.three-col,
.rate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rate-grid {
  grid-template-columns: repeat(4, 1fr);
}

.staff-editor {
  display: grid;
  gap: 7px;
}

.staff-row,
.add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.staff-row {
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fff;
}

.staff-row span {
  font-weight: 700;
}

.staff-row button {
  min-height: 32px;
  padding: 5px 10px;
}

.settings-footer {
  display: flex;
  justify-content: flex-end;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.modal {
  width: min(720px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.28);
}

.modal header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal header button,
.modal footer button:not(.primary):not(.danger-btn) {
  background: #eef2f7;
  color: #1f2937;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.monthly-people-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.staff-check-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.staff-check-panel h3 {
  margin: 0;
  font-size: 15px;
}

.staff-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.staff-check {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #182230;
  font-size: 13px;
}

.staff-check input {
  width: auto;
  min-height: auto;
}

.monthly-people-head {
  display: grid;
  gap: 4px;
}

.monthly-people-head h3 {
  margin: 0;
  font-size: 15px;
}

.monthly-people-head p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.monthly-people-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.monthly-people-tools button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #174ea6;
  font-size: 12px;
  font-weight: 700;
}

.field-alert {
  color: #dc2626;
  font-weight: 800;
}

.monthly-people-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.monthly-people-grid label {
  gap: 5px;
  font-size: 12px;
}

.monthly-people-grid label:not(.active-month) {
  opacity: 0.45;
}

.monthly-people-grid .active-month {
  color: #174ea6;
  font-weight: 700;
}

.monthly-people-grid input {
  min-height: 38px;
  padding: 8px 10px;
}

.empty {
  margin: 0;
  padding: 24px;
  color: #667085;
  text-align: center;
}

@media (max-width: 900px) {
  .login-panel,
  .summary-strip,
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .settings-grid,
  .rate-grid {
    grid-template-columns: 1fr 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .top-actions button {
    flex: 1;
  }

  .month-meter {
    grid-template-columns: repeat(12, minmax(46px, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 12px;
  }

  .login-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .summary-strip,
  .filters,
  .card-list,
  .two-col {
    grid-template-columns: 1fr;
  }

  .monthly-people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar h1 {
    font-size: 22px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .top-actions .primary {
    grid-column: 1 / -1;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f6f8fb;
    padding-top: 6px;
  }

  .tabs button {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .month-meter {
    grid-template-columns: repeat(6, minmax(46px, 1fr));
  }

  .workload-panel,
  .schedule-wrap,
  .decision-list,
  .staff-view,
  .settings-view {
    padding: 10px;
  }

  .settings-head {
    display: grid;
  }

  .settings-grid,
  .three-col,
  .rate-grid,
  .add-row {
    grid-template-columns: 1fr;
  }

  .monthly-people-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-footer {
    display: grid;
  }

  .schedule-wrap {
    display: none;
  }

  .workload-panel {
    display: none;
  }

  .mobile-overview-cards {
    display: block;
  }

  .filters {
    display: none;
  }

  .mobile-year-judgement {
    display: grid;
  }

  .mobile-schedule-panel {
    display: block;
  }

  .project-card .card-extra,
  .project-card .card-actions {
    display: none;
  }

  .project-card dl div,
  .detail-list div,
  .decision-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card-actions,
  .modal footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .modal footer {
    grid-template-columns: 1fr 1fr;
  }
}

@page {
  size: A3 landscape;
  margin: 8mm;
}

@media print {
  :root,
  body {
    background: #fff;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .topbar,
  .summary-strip,
  .tabs,
  .mobile-overview-cards,
  #modalRoot {
    display: none !important;
  }

  .print-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12mm;
    margin-bottom: 4mm;
    border-bottom: 1px solid #64748b;
    padding-bottom: 2mm;
  }

  .print-heading h1 {
    margin: 0;
    font-size: 15pt;
  }

  .print-heading p {
    margin: 0;
    font-size: 8pt;
    white-space: nowrap;
  }

  .workload-panel {
    display: block !important;
    margin: 0 0 4mm;
    border: 1px solid #cbd5e1;
    border-radius: 1.5mm;
    padding: 2mm;
    break-inside: avoid;
  }

  .workload-panel h2 {
    margin: 0 0 1mm;
    font-size: 9pt;
  }

  .workload-panel .calc-note {
    margin: 0 0 1.5mm;
    font-size: 5.5pt;
  }

  .month-meter {
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 0.8mm;
    min-height: 24mm;
    overflow: visible;
  }

  .meter {
    min-height: 24mm;
    gap: 0.5mm;
    padding: 1mm 0.5mm;
    border-radius: 1mm;
  }

  .meter span,
  .meter em {
    font-size: 5pt;
    line-height: 1.1;
  }

  .meter strong {
    position: relative;
    z-index: 1;
    font-size: 5.5pt;
    line-height: 1.1;
  }

  .schedule-wrap {
    display: block !important;
    overflow: visible;
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .schedule-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: 42mm repeat(24, minmax(0, 1fr));
    grid-template-rows: 9mm !important;
    grid-auto-rows: 9mm;
    font-size: 6.5pt;
    break-inside: auto;
  }

  .corner,
  .month-head {
    position: static;
    font-size: 6.5pt;
  }

  .site-name {
    position: static;
    min-height: 9mm;
    padding: 1mm 1.5mm;
  }

  .site-name strong {
    font-size: 7pt;
  }

  .site-name small {
    font-size: 5.5pt;
  }

  .bar {
    height: 5.5mm;
    min-height: 0;
    margin: 0 0.8mm;
    padding: 0.6mm 1mm;
    border-radius: 1mm;
    font-size: 5.5pt;
  }

  .month-head,
  .site-name,
  .cell,
  .bar {
    break-inside: avoid;
  }
}
