@charset "UTF-8";

/************ 下層ヘッダー ************/

.head {
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
}
.head .bg-image {
	background: url('../images/schedule/head.webp') no-repeat;
	background-size: cover;
	background-position: 0 36%;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	filter: brightness(50%);
	z-index: 0;
}
.head .triangle-bottom {
	position: relative;
}
.head .triangle-bottom::before {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	border-bottom: 6vw solid #fff;
	border-left: 100vw solid transparent;
}
.head .head-title {
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 1;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	height: 300px;
}
.head .head-title h1 {
	background-color: #fff;
	font-size: 1.5rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	padding: 0.5rem 3.4rem;
	margin: 0 auto;
}



/************ 年月切り替え ************/

.schedule .schedule-switch {
	display: flex;
	align-items: center;
	justify-content: center;
}
.schedule .schedule-switch h4 {
	letter-spacing: 0.1em;
	font-size: 1.5rem;
	margin-bottom: 0;
	padding: 0.25rem 0.75rem;
}
.schedule .schedule-switch a {
	color: #212529;
	padding: 0.25rem 0.75rem;
}
.schedule .schedule-switch a:hover {
	color: #ffc107;
}



/************ カレンダー（現行サイトからそのまま貼り付け・主に色と文字のみ調整） ************/

/* ── 共通（PC/スマホ共通） ─────────────────────────── */
a{ text-decoration:none; }
th, td { width: 14.28%; }
th{ height:30px; text-align:center; }
td{ height:120px; padding-left:0!important; padding-right:0!important; }
.today{ background:#faf4cd !important; }
th:nth-of-type(1), td:nth-of-type(1){ color:#d83a2a; }
th:nth-of-type(7), td:nth-of-type(7){ color:#1c4380; }

/* ── スマホ版 縦スケジュール（角丸なし・分離なし） ───────────── */
@media (max-width: 767.98px) {
  .mobile-schedule { border:1px solid #dee2e6; border-radius:0; padding:0; }
  .mobile-schedule .ms-row{
    display:grid;
    grid-template-columns:3.8rem 48px 1fr; /* 日付 / レール / 本文 */
    align-items:stretch;
    column-gap:12px;
    padding:0 12px;                    /* 行の上下は0で隣接行と密着 */
    border-top:1px solid #dee2e6;
    min-height:60px;
  }
  .mobile-schedule .ms-row:first-child{ border-top:0; }
  .mobile-schedule .ms-date{ padding:10px 0; }

  .mobile-schedule .ms-date { text-align:center; }
  .mobile-schedule .ms-day{ font-weight:700; font-size:1.25rem; line-height:1.1; }
  .mobile-schedule .ms-youbi{ font-size:.85rem; color:#787d85; }
	.mobile-schedule .ms-body{
	  padding:0;                 /* 中央寄せを効かせるため上下余白は0に */
	  display:flex;              /* フレックスで縦方向中央に */
	  flex-direction:column;
	  justify-content:center;    /* ← 行の“中央”に配置 */
	  align-items:flex-start;    /* 左揃えのままにしたい場合 */
	  gap:6px;                   /* 複数ボタンの間隔（任意） */
	  min-width:0;               /* 既存維持：折り返し対策 */
	}
  .mobile-schedule .ms-row.today{ background:#faf4cd; }
}

/* PCでは縦レールDOMを無効化 */
.ms-preview{ display:none; }

/* ── スマホ版 レール表示（置き換え） ───────────────────── */
@media (max-width: 767.98px) {
  .pc-preview{ display:none !important; } /* スマホではPC用横帯を隠す */

  /* レール列：行の高さいっぱい。月頭/月末ではみ出しを抑止 */
  .ms-rail{
    position:relative !important;
    align-self:stretch !important;
    margin-top:-1px !important;
    margin-bottom:-1px !important;
    overflow:hidden !important;                 /* ← はみ出し防止 */
  }
  .mobile-schedule .ms-row:first-child .ms-rail{ margin-top:0 !important; }
  .mobile-schedule .ms-row:last-child  .ms-rail{ margin-bottom:0 !important; }

  /* レール本体（疑似要素の基準） */
  .ms-preview{
    display:block !important;
    position:absolute !important;
    inset:0 !important;                         /* top/rt/btm/lt = 0 */
    pointer-events:none !important;
    z-index:0;
  }

  /* 縦ライン：中央にぴったり。transformは使わない */
  .ms-preview::before{
    content:"" !important;
    position:absolute !important;
    left:0; right:0; margin:0 auto;             /* 完全中央合わせ */
    width:4px !important;
    background:#3A86FF !important;
    border-radius:0 !important;
    top:0; bottom:0;                             /* 基本は全体（後で上書き） */
  }
  /* 範囲：start=下半分 / mid=全体 / end=上半分（要望どおり） */
  .ms-preview.pv-start::before { top:50% !important; bottom:0   !important; }
  .ms-preview.pv-mid::before   { top:0   !important; bottom:0   !important; }
  .ms-preview.pv-end::before   { top:0   !important; bottom:50% !important; }

  /* ●マーカー：中央にぴったり。midは●なし */
  .ms-preview::after{
    content:"" !important;
    position:absolute !important;
    left:0; right:0; margin:0 auto;             /* これも中央合わせ */
    width:14px !important;
    height:14px !important;
    background:#3A86FF !important;
    border-radius:50% !important;
    z-index:1;
    display:none;                                /* 既定は非表示 */
  }
  .ms-preview.pv-start::after,
  .ms-preview.pv-end::after   { display:block; top:calc(50% - 7px); } /* 行中央に● */

  /* スマホでは「下見会」文字は出さない */
  .ms-preview-label{ display:none !important; }

  /* スマホ：曜日の色分け（日→赤、土→青） */
  .mobile-schedule .ms-row.sun .ms-youbi { color:#d83a2a !important; }
  .mobile-schedule .ms-row.sat .ms-youbi { color:#1c4380 !important; }
}

/*****************/
/* ── PC版 横レール（青ライン＋ドット） ───────────────── */
@media (min-width: 768px) {
  /* レール本体：行内に1本（高さはお好みで調整可） */
  .pc-preview{
    position: relative;
    height: 18px;
    margin: 2px 0 6px 0;
  }
  /* ライン（基本は全幅、variantで左右を半分に制限） */
  .pc-preview::before{
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;                 /* 線の太さ */
    background: #3A86FF;         /* 青で統一 */
    left: 0;
    right: 0;
  }
  /* 中日＝全幅／開始＝右半分／終了＝左半分 */
  .pc-preview.pv-mid::before   { left: 0;   right: 0;   }
  .pc-preview.pv-start::before { left: 50%; right: 0;   }
  .pc-preview.pv-end::before   { left: 0;   right: 50%; }

  /* ドット（開始・終了のみ表示。位置は中央） */
  .pc-preview::after{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 14px;
    height: 14px;
    background: #3A86FF;         /* 青で統一 */
    border-radius: 50%;
    display: none;
  }
  .pc-preview.pv-start::after,
  .pc-preview.pv-end::after { display: block; }
}
/************/
/* ── 下見会 凡例（右寄せの ●───●＋説明） ───────────── */
.preview-legend .legend-line{
  display:inline-flex;
  align-items:center;
  height:14px;                 /* ドット径に合わせる */
}
.preview-legend .bar{
  display:inline-block;
  height:4px;                  /* スマホ/PCのライン太さと統一 */
  width:72px;                  /* 長さはお好みで */
  background:#3A86FF;          /* 青で統一 */
  margin:0 6px;                /* ドットとの間隔 */
  vertical-align:middle;
}
.preview-legend .dot{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#3A86FF;          /* 青で統一 */
  flex:0 0 14px;
}
.preview-legend .legend-text{
  font-size: 0.85rem;
}
