.kb-cal {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.kb-cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.kb-cal-title {
  font-weight: 700;
}

.kb-cal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  padding: 0;
  /* ←ここが重要 */
  border-radius: 50%;
  /* ←正円 */
  text-decoration: none;

  background: #f5f5f5;
  color: #111;
  line-height: 1;
  font-size: 20px;
  /* 矢印のサイズ */

}

.kb-cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.kb-cal-weekday {
  padding: 10px 8px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

.kb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.kb-cal-cell {
  min-height: 110px;
  padding: 8px;
  border-right: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.kb-cal-cell:nth-child(7n) {
  border-right: none;
}

.kb-cal-cell.is-other {
  background: #fcfcfc;
  color: #aaa;
}

.kb-cal-date {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.kb-cal-ev {
  background: #f6f9ff;
  border-radius: 10px;
  padding: 6px 8px;
  margin: 0 0 6px;
}

.kb-cal-evtime {
  font-size: 11px;
  color: #1a73e8;
  margin-right: 6px;
}

.kb-cal-evtitle {
  font-size: 12px;
  color: #111;
}
/* 次の予定：場所を少し小さく */
.kb-schedule-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #0b2f7b;
    color: #fff;
    vertical-align: middle;
}

.kb-cal-list {
    margin-top: 20px;
}

.kb-cal-list-title {
    font-size: 18px;
    margin: 0 0 10px;
    color: #0b2f7b;
}

.kb-cal-day {
    border-top: 1px solid #ddd;
    padding: 12px;
    position: relative;
}
.kb-cal-day::after {
    content: "›";
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    line-height: 1;
    color: #888;
}

.kb-cal-title{
   color: #0b2f7b;
}
.kb-cal-dayhead {
    font-weight: 700;
    margin-bottom: 6px;
    color: #0b2f7b;
}

.kb-cal-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
    color: inherit;
    border-top: 1px dashed #eee;
}

.kb-cal-item:first-child {
    border-top: none;
}

.kb-cal-itemtime {
    width: 52px;
    color: #555;
    font-variant-numeric: tabular-nums;
}

.kb-cal-itemtitle {
    flex: 1;
}

.kb-cal-item:hover {
    text-decoration: underline;
}

/* ====== スマホ最適化（カレンダー） ====== */
@media (max-width: 600px) {

  /* カレンダー全体を画面幅にフィット */
  .kb-cal {
    border-radius: 10px;
  }

  /* ヘッダー（矢印・月表示）をコンパクトに */
  .kb-cal-head {
    padding: 10px 10px;
  }

  .kb-cal-title {
    font-size: 14px;
    font-weight: 700;
  }

  .kb-cal-nav {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  /* 曜日行を小さく */
  .kb-cal-weekday {
    padding: 8px 2px;
    font-size: 11px;
  }

  /* マスの高さと余白を縮める（ここが一番効きます） */
  .kb-cal-cell {
    min-height: 72px;
    /* ← 90→72 くらいが見やすい */
    padding: 5px;
  }

  /* 日付の表示を少し小さく */
  .kb-cal-date {
    font-size: 11px;
    margin-bottom: 4px;
  }
  .kb-cal-day::after {
    right: 20px;
  }

  /* 予定のカードを“チップ”っぽくして省スペース化 */
  .kb-cal-ev {
    padding: 4px 6px;
    margin: 0 0 4px;
    border-radius: 8px;
    display: block;
    color: inherit;
    text-decoration: none;
  }

  .kb-cal-ev:hover {
    text-decoration: underline;
  }

  /* 時刻は小さく、改行させない */
  .kb-cal-evtime {
    font-size: 10px;
    margin-right: 4px;
    white-space: nowrap;
  }

  /* タイトルは2行まで表示（長いときだけ省略） */
  .kb-cal-evtitle {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    /* ← 720px用のnowrapを解除 */
    line-height: 1.25;
  }
}

/* さらに小さい端末（iPhone SE等）用 */
@media (max-width: 360px) {
  .kb-cal-cell {
    min-height: 64px;
    padding: 4px;
  }

  .kb-cal-weekday {
    font-size: 10px;
  }

  .kb-cal-evtitle {
    font-size: 10px;
  }
}