/* カスタム日付カレンダー（今月表示時はモーダルだけ濃いめの緑／日付セルは無地・日曜赤・土曜青・祝日赤） */
.jp-cal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.jp-cal-overlay.jp-cal-open {
  opacity: 1;
  pointer-events: auto;
}
.jp-cal-panel {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  transition: background 0.2s ease;
}
/* 表示中の年月が「今日の年月」ときだけモーダル（パネル）をやや濃い緑 */
.jp-cal-panel.jp-cal-panel--this-real-month {
  background: #a5d6a7;
}
.jp-cal-panel.jp-cal-panel--this-real-month .jp-cal-header,
.jp-cal-panel.jp-cal-panel--this-real-month .jp-cal-footer {
  border-color: rgba(27, 94, 32, 0.22);
}
.jp-cal-panel.jp-cal-panel--this-real-month .jp-cal-nav {
  background: rgba(255, 255, 255, 0.55);
}
.jp-cal-panel.jp-cal-panel--this-real-month .jp-cal-nav:hover {
  background: rgba(255, 255, 255, 0.85);
}
.jp-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px;
  border-bottom: 1px solid #eee;
}
.jp-cal-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #111;
  line-height: 1.35;
}
.jp-cal-nav {
  width: 40px;
  height: 40px;
  border: none;
  background: #f5f5f5;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
    background 0.2s ease,
    box-shadow 0.22s ease;
}
.jp-cal-nav:hover:not(:disabled) {
  background: #eee;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.jp-cal-nav:active:not(:disabled) {
  transform: scale(0.94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition-duration: 0.08s;
}
.jp-cal-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.jp-cal-nav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.35);
}
.jp-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  padding: 8px 10px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.jp-cal-weekdays span:nth-child(1) {
  color: #c62828;
}
.jp-cal-weekdays span:nth-child(7) {
  color: #1565c0;
}
.jp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 4px 10px 12px;
}
.jp-cal-day {
  position: relative;
  z-index: 0;
  aspect-ratio: 1;
  max-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #222;
  background: transparent;
  padding: 0;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
    background 0.2s ease,
    box-shadow 0.22s ease,
    color 0.15s ease;
}
.jp-cal-day.is-current-month {
  background: transparent;
}
.jp-cal-day.is-other-month {
  color: #bbb;
  background: #fafafa;
  font-weight: 600;
}
.jp-cal-day.is-sun:not(.is-holiday) {
  color: #c62828;
}
.jp-cal-day.is-sat:not(.is-holiday) {
  color: #1565c0;
}
.jp-cal-day.is-holiday {
  color: #c62828;
}
.jp-cal-day.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.jp-cal-day.is-selected {
  box-shadow: inset 0 0 0 2px #e65100;
  background: rgba(255, 255, 255, 0.92);
}
.jp-cal-panel.jp-cal-panel--this-real-month .jp-cal-day.is-selected {
  background: rgba(255, 255, 255, 0.75);
}
/* 日付セルホバー */
.jp-cal-day:not(.is-disabled):not(.is-selected):hover {
  z-index: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.jp-cal-day.is-current-month:not(.is-disabled):not(.is-selected):hover {
  background: rgba(0, 0, 0, 0.06);
}
.jp-cal-day.is-other-month:not(.is-disabled):not(.is-selected):hover {
  background: #ececec;
  color: #666;
}
.jp-cal-panel.jp-cal-panel--this-real-month .jp-cal-day.is-current-month:not(.is-disabled):not(.is-selected):hover {
  background: rgba(255, 255, 255, 0.5);
}
.jp-cal-day.is-selected:not(.is-disabled):hover {
  transform: scale(1.06);
  box-shadow:
    inset 0 0 0 2px #e65100,
    0 4px 14px rgba(230, 81, 0, 0.2);
}
.jp-cal-day:focus-visible {
  outline: none;
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.4);
}
.jp-cal-day.is-selected:focus-visible {
  box-shadow:
    inset 0 0 0 2px #e65100,
    0 0 0 3px rgba(21, 101, 192, 0.4);
}
.jp-cal-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid #eee;
}
.jp-cal-footer button {
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #1565c0;
  padding: 8px 12px;
  border-radius: 8px;
  transition:
    transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1),
    background 0.2s ease,
    color 0.15s ease;
}
.jp-cal-footer button:hover {
  transform: scale(1.05);
  background: rgba(21, 101, 192, 0.08);
}
.jp-cal-footer button:active {
  transform: scale(0.98);
  transition-duration: 0.08s;
}
.jp-cal-footer button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .jp-cal-nav,
  .jp-cal-day,
  .jp-cal-footer button {
    transition: none;
  }
  .jp-cal-nav:hover:not(:disabled),
  .jp-cal-nav:active:not(:disabled),
  .jp-cal-day:not(.is-disabled):hover,
  .jp-cal-day.is-selected:not(.is-disabled):hover,
  .jp-cal-footer button:hover,
  .jp-cal-footer button:active {
    transform: none;
  }
}
