/* =========================================================
   Calendar Table Style (テーブル形式カレンダー)
   ========================================================= */
.cms-calendar-wrapper {
  max-width: 1200px;
  margin: 30px auto;
}

/* ナビゲーション */
.cms-cal-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.cms-cal-nav h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.cms-btn {
  text-decoration: none;
  background: #fff;
  border: 1px solid #ddd;
  padding: 6px 14px;
  border-radius: 4px;
  color: #333;
  font-size: 0.9rem;
  transition: .2s;
}

.cms-btn:hover {
  background: #f5f5f5;
}

/* テーブルスタイル */
.cms-cal-table-wrap {
  overflow-x: auto;
  /* スマホで横スクロール */
  border: 1px solid #ddd;
  border-radius: 8px;
}

.cms-cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 700px;
  /* スマホで崩れないように最小幅確保 */
  background: #fff;
}

.cms-cal-table th,
.cms-cal-table td {
  border: 1px solid #ddd;
  padding: 8px;
  vertical-align: top;
}

/* ヘッダー */
.cms-cal-table th {
  background: #f9f9f9;
  text-align: center;
  padding: 10px 0;
  font-weight: bold;
}

.cms-cal-table th.sun {
  color: #e53935;
  background: #fff0f0;
}

.cms-cal-table th.sat {
  color: #1e88e5;
  background: #f0f8ff;
}

/* セル設定 */
.cms-cal-table td {
  height: 140px;
  /* セルの高さ確保 */
  position: relative;
  background: #fff;
}

.cms-cal-table td.empty {
  background: #fafafa;
}

/* 日付 */
.cms-date-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 6px;
}

.cms-date-num {
  display: inline-block;
  font-weight: bold;
  font-size: 1.1rem;
  line-height: 1;
  margin-bottom: 4px;
}

.cms-cal-table td.sun .cms-date-num {
  color: #e53935;
}

.cms-cal-table td.sat .cms-date-num {
  color: #1e88e5;
}

/* イベント */
.cms-ev-badge {
  background: #ffeaf4;
  color: #d63384;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
  display: inline-block;
  margin-top: 2px;
}

/* シフトリスト */
.cms-shift-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cms-shift-item {
  display: block;
  background: #f4f5f7;
  border-left: 3px solid #5b34ff;
  padding: 4px 6px;
  border-radius: 3px;
  text-decoration: none;
  line-height: 1.3;
  transition: background .2s;
}

.cms-shift-item:hover {
  background: #e0e0e0;
}

.cms-shift-item .name {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  color: #333;
}

.cms-shift-item .time {
  display: block;
  font-size: 0.75rem;
  color: #666;
}

/* 日付の代わりに価格を表示するスタイル */
.cms-base-price {
  font-size: 0.9rem;
  color: #e53935;
  /* 価格を目立たせる赤色 */
  font-weight: bold;
  margin-bottom: 8px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* =========================================================
   Base Items Grid (ショップ風デザイン)
   ========================================================= */
.cms-base-grid {
  display: grid;
  /* スマホは2列、PCは自動調整（最小150px） */
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px 16px;
  margin-top: 20px;
  width: 100%;
}

.cms-base-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  /* 薄い枠線 */
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none !important;
  /* リンクの下線を消す */
  color: #333 !important;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cms-base-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
}

/* 画像エリア */
.cms-base-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* 正方形にする */
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.cms-base-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 枠いっぱいにトリミング */
  transition: transform 0.3s ease;
}

.cms-base-item:hover .cms-base-thumb img {
  transform: scale(1.05);
  /* ホバーで少し拡大 */
}

/* 画像がない場合の表示 */
.no-img {
  color: #ccc;
  font-size: 0.8rem;
  font-weight: bold;
}

/* テキストエリア */
.cms-base-body {
  padding: 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cms-base-title {
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 8px;
  /* 2行以上は「...」で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #333;
}

.cms-base-price {
  font-size: 1rem;
  color: #e53935;
  /* 価格を目立たせる赤 */
  font-weight: bold;
  font-family: Arial, sans-serif;
  margin-bottom: 10px;
}

.cms-base-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #f4f4f4;
  color: #333;
  font-size: 0.8rem;
  padding: 8px 0;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.2s;
}

.cms-base-item:hover .cms-base-btn {
  background: #333;
  color: #fff;
}

/* スマホ表示の調整 */
@media (max-width: 600px) {
  .cms-base-grid {
    grid-template-columns: repeat(2, 1fr);
    /* 強制的に2列 */
    gap: 15px 10px;
  }

  .cms-base-title {
    font-size: 0.8rem;
  }

  .cms-base-price {
    font-size: 0.9rem;
  }
}

/* ...既存のCSSの下に追記... */

/* =========================================================
   Today Cast Slider (Updated)
   ========================================================= */
.cms-slider-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 40px;
}

.cms-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 20px;

  /* ★修正: カードを中央寄せにする設定 */
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.cms-slider-track::-webkit-scrollbar {
  display: none;
}

.cms-slider-card {
  flex: 0 0 220px;
  scroll-snap-align: center;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.2s;
  text-align: center;
  border: 1px solid #f0f0f0;
}

.cms-slider-card:hover {
  transform: translateY(-5px);
}

.cms-card-img {
  width: 100%;
  height: 280px;
  background: #fafafa;
}

.cms-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cms-card-info {
  padding: 12px;
}

.cms-card-info .name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: #333;
}

/* ★修正: 時間の背景色なし、黒文字 */
.cms-card-info .time {
  font-size: 0.95rem;
  color: #333;
  /* 黒字 */
  background: transparent;
  /* 背景なし */
  font-weight: bold;
  display: inline-block;
  padding: 0;
}

.cms-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  z-index: 10;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.cms-slider-arrow:hover {
  background: #333;
  color: #fff;
}

.cms-slider-arrow.prev {
  left: 0;
}

.cms-slider-arrow.next {
  right: 0;
}


/* =========================================================
   Cast Detail Modal (Updated)
   ========================================================= */
.cms-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.cms-modal.open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.cms-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.cms-modal-content {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 12px;
  overflow-y: auto;
  z-index: 2;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ★修正: 閉じるボタンの反応エリア改善 */
.cms-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f0f0f0;
  border: none;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  /* フレックスボックスで中央揃え */
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.2s;
  z-index: 10;
  /* コンテンツより上に */
}

.cms-modal-close:hover {
  background: #e0e0e0;
  color: #000;
}

.cms-modal-body {
  display: flex;
  gap: 30px;
}

@media (max-width: 768px) {
  .cms-modal-body {
    flex-direction: column;
  }
}

.cms-modal-left {
  flex: 0 0 300px;
}

.cms-modal-left img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* ★修正: SNSアイコンのデザイン */
.cms-m-sns {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.sns-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  /* 角丸四角 */
  font-size: 1.2rem;
  transition: 0.2s;
}

.sns-icon:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

/* 各SNSの色（オプション） */
.sns-x:hover {
  background: #000;
  color: #fff;
}

.sns-ig:hover {
  background: #E1306C;
  color: #fff;
}

/* インスタカラー */
.sns-tt:hover {
  background: #000;
  color: #fff;
}

/* TikTokは黒ベース */

.cms-modal-right {
  flex: 1;
}

.cms-modal-right h2 {
  margin-top: 0;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.cms-m-row {
  margin-bottom: 15px;
}

.cms-m-row .label {
  display: block;
  font-weight: bold;
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.cms-m-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.cms-m-gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eee;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
