/* v699: intrinsic calendar proportions; keep normal page scrolling. */
#pertihub-root .ph-calendar-fit-shell .ph-calendar-main {
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  align-content: start !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 14px !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-layout {
  grid-template-columns: minmax(0, 1fr) 260px !important;
  align-items: start !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-cal-month-title {
  min-height: 48px !important;
  margin: 0 !important;
  padding: 4px 0 12px !important;
  font-size: 26px !important;
  line-height: 1.2 !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-week,
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-week b {
  display: grid !important;
  place-items: center !important;
  min-height: 34px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid {
  grid-template-rows: none !important;
  grid-auto-rows: minmax(112px, auto) !important;
  align-items: stretch !important;
  overflow: hidden !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 112px !important;
  max-height: none !important;
  aspect-ratio: 1.3 !important;
  padding: 10px !important;
  overflow: hidden !important;
  text-align: left !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-num {
  flex: 0 0 auto !important;
  margin: 0 0 8px !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell .ph-cal-num b {
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-holiday,
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-leave,
#pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-more {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
}
@media (max-width: 1000px) {
  #pertihub-root .ph-abs-page:has(.ph-calendar-fit-shell) .ph-abs-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  #pertihub-root .ph-abs-page:has(.ph-calendar-fit-shell) .ph-abs-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 6px !important;
  }
  #pertihub-root .ph-abs-page:has(.ph-calendar-fit-shell) .ph-abs-controls select {
    flex: 1 1 130px !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    font-size: 12px !important;
  }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-side {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    height: auto !important;
    max-height: none !important;
  }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-week { background: #ddeaf2 !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid { border-left: 1px solid #d7e1e6 !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell {
    border: 0 !important;
    border-right: 1px solid #d7e1e6 !important;
    border-bottom: 1px solid #d7e1e6 !important;
    border-radius: 0 !important;
    background: #fbfaf6 !important;
  }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell.saturday { background: #f7fafb !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell.sunday { background: #f7e9eb !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell.holiday { background: #fbe9e0 !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell.blank { background: #f5f4ef !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-cal-day-pill { display: none !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-cal-num { text-align: right !important; }
}
@media (max-width: 600px) {
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-main { padding: 8px !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-cal-month-title { font-size: 22px !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid { grid-auto-rows: minmax(84px, auto) !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell {
    min-height: 84px !important;
    aspect-ratio: auto !important;
    padding: 5px 3px !important;
  }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-grid .ph-cal-cell .ph-cal-num b { font-size: 18px !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-week b { font-size: 9px !important; }
  #pertihub-root .ph-calendar-fit-shell .ph-calendar-side { grid-template-columns: minmax(0, 1fr) !important; }
}
