/* ===================================================
   1. 全体を包むエリア・文字の重なり強制解除
   =================================================== */
.custom-cal-area {
  margin: 40px auto !important;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
  padding: 15px !important;
  box-sizing: border-box !important;
  display: block !important;
  clear: both !important;
  color: #4a3728 !important;
}

/* ★見出しに「Zen Old Mincho」を適用＆サイズアップ */
.custom-cal-main-title {
  display: block !important;
  position: relative !important;
  float: none !important;
  clear: both !important;
  font-family: "Zen Old Mincho", serif !important;
  font-size: 30px !important;
  font-weight: bold !important;
  text-align: center !important;
  margin: 0 0 16px 0 !important;
  height: auto !important;
  line-height: 1.4 !important;
  letter-spacing: 0.05em !important;
}

/* ★説明文のサイズアップ */
.custom-cal-sub-text {
  display: block !important;
  position: relative !important;
  float: none !important;
  clear: both !important;
  font-size: 15px !important;
  color: #6a5340 !important;
  text-align: center !important;
  margin: 0 0 30px 0 !important;
  height: auto !important;
  line-height: 1.6 !important;
}

/* ===================================================
   2. タブボタンの設定
   =================================================== */
.custom-cal-tabs-container {
  display: flex !important;
  justify-content: space-between !important;
  gap: 6px !important;
  margin-bottom: 24px !important;
  border-bottom: 2px solid #dfd7cf !important;
  padding-bottom: 0 !important;
  position: relative !important;
  clear: both !important;
}

/* ★タブボタンの文字サイズアップと調整 */
.custom-cal-tab-btn {
  flex: 1 !important;
  background: #fcfbfa !important;
  border: 1px solid #dfd7cf !important;
  border-bottom: none !important;
  padding: 14px 2px !important;
  font-size: 18px !important;
  font-weight: bold !important;
  color: #6a5340 !important;
  cursor: pointer !important;
  border-radius: 6px 6px 0 0 !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

.custom-cal-tab-btn:hover {
  background: #f5f0eb !important;
}

.custom-cal-tab-btn.active {
  background: #4a3728 !important;
  color: #ffffff !important;
  border-color: #4a3728 !important;
}

/* ===================================================
   3. カレンダーパネルの設定
   =================================================== */
.custom-cal-month-wrap {
  display: none !important;
  background: #ffffff !important;
  border: 1px solid #dfd7cf !important;
  border-radius: 8px !important;
  padding: 40px 20px !important;
  box-shadow: 0 4px 12px rgba(74, 55, 40, 0.04) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  clear: both !important;
}

.custom-cal-month-wrap.active {
  display: block !important;
}

/* ★カレンダーの中の年月タイトルもサイズアップ */
.custom-cal-month-title {
  font-size: 24px !important;
  font-weight: bold !important;
  text-align: center !important;
  margin-bottom: 40px !important;
  color: #4a3728 !important;
  letter-spacing: 0.03em !important;
}

/* ★曜日ヘッダーのサイズアップ */
.custom-cal-week-header {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  text-align: center !important;
  font-weight: bold !important;
  font-size: 16px !important;
  border-bottom: 1px solid #dfd7cf !important;
  padding-bottom: 10px !important;
  margin-bottom: 14px !important;
}

/* 日付グリッド */
.custom-cal-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  border-top: 1px solid #f2eee9 !important;
  border-left: 1px solid #f2eee9 !important;
}

.custom-cal-cell {
  border-right: 1px solid #f2eee9 !important;
  border-bottom: 1px solid #f2eee9 !important;
  padding: 8px 4px !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* ★日付のマス：文字が大きくなった分、さらに少しだけ高さを拡張 */
.custom-cal-day {
  font-size: 18px !important;
  min-height: 85px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  color: #4a3728 !important;
  padding: 15px 0 !important;
}

.custom-cal-other { 
  color: #d0c5bb !important; 
}

.custom-cal-delivery-week { 
  background-color: #fbf5ee !important; 
}

.custom-cal-delivery-week .day-num { 
  font-weight: bold !important; 
  color: #b5835a !important; 
}

/* ★「お届け」ラベルも少しだけサイズアップ */
.custom-cal-label {
  font-size: 12px !important;
  background: #8c6b53 !important;
  color: #ffffff !important;
  padding: 3px 6px !important;
  border-radius: 3px !important;
  transform: scale(0.9) !important;
  display: inline-block !important;
  line-height: 1.2 !important;
  margin-top: auto !important;
  font-weight: normal !important;
}

/* ===================================================
   4. 文字化け対策：日本語をUnicode暗号コードで注入
   =================================================== */
.nen-label::before    { content: "\5E74"; }
.gatsu-label::before  { content: "\6708"; }

/* 曜日ヘッダー*/
.w-sun::before { content: "\65E5"; color: #c94a4a; }
.w-mon::before { content: "\6708"; }
.w-tue::before { content: "\706B"; }
.w-wed::before { content: "\6C34"; }
.w-thu::before { content: "\6728" !important; } /* 木 */
.w-fri::before { content: "\91d1" !important; } /* ★金 (\9121) に今度こそ修正！ */
.w-sat::before { content: "\571F"; color: #4a7cb5; }

/* お届けラベルの文字 */
.custom-cal-label::before { 
  content: "\304A\5C4A\3051"; 
}

/* ===================================================
   5. スマホ表示でのタブボタン・日付の文字溢れ防止用の安全装置
   =================================================== */
@media screen and (max-width: 500px) {
  .custom-cal-main-title { font-size: 22px !important; }
  .custom-cal-tab-btn { font-size: 14px !important; padding: 10px 0 !important; }
  .custom-cal-month-title { font-size: 20px !important; margin-bottom: 20px !important; }
  .custom-cal-week-header { font-size: 13px !important; }
  .custom-cal-day { font-size: 15px !important; min-height: 65px !important; }
  .custom-cal-label { font-size: 9px !important; padding: 2px 4px !important; transform: scale(0.85) !important; }
}