/* ========================
   全体設定
   ========================= */
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  background-color: #f0f2f5;
  color: #212529;
  margin: 0px;
  line-height: 1.6; /* 行間 */
  padding: 10px; /* 内側の余白 */
  touch-action: manipulation; /* スクロール操作と干渉しない */
  scroll-behavior: smooth; /* スムーススクロール */
}

.level1 {
  font-size: 12px;
  font-weight: 400;
}

h3 {
  font-size: 28px;
}

.halfC {
  font-size: 25px;
  font-weight: 400;
  color: #555;
  text-align: left;
}


/* =========================
   table全般
   ========================= */
table {
  width: 100%; /* 横幅いっぱい */
  table-layout: fixed; /* セルの幅を均等に */
  border: 2px solid #ddd; /* 枠線 */
  border-collapse: collapse; /* 枠線を重ねる */
  text-align: center; /* 文字を中央寄せ */
  vertical-align: middle; /* 文字を縦中央寄せ */
  background-color: #f9f9f9; /* 背景色 */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 8px; /* 角を丸くする */
}

/* 時間列だけ固定幅 */
col.time-col {
  width: 60px; /* 固定幅 */
}

/* 残りの列は均等幅 */
col:not(.time-col) {
  width: calc((100% - 30px) / 5); /* 残りの幅を5等分 */
}

th {
  padding: 0; /* 内側余白 */
  font-size: 25px;
  font-weight: 400;
  height: 40px; /* セルの高さ */
  border: 3px solid #ddd;
  text-align: center; /* 文字を中央寄せ */
  vertical-align: middle; /* 文字を縦中央寄せ */
  overflow: hidden; /* はみ出た部分を隠す */
  word-break: break-word; /* 長い単語を折り返す */
  background-color: #f0f0f0;
  color: #333;
}

/* 実質時限の部分のみ */
td {
  padding: 1px; /* 内側余白 */
  font-size: 20px;
  font-weight: 400; /* 通常は400 */
  height: 40px; /* セルの高さ */
  border: 3px solid #ddd; /* 枠線 */
  text-align: center; /* 文字を中央寄せ */
  vertical-align: middle; /* 文字を縦中央寄せ */
  overflow: hidden; /* はみ出た部分を隠す */
  word-break: break-word; /* 長い単語を折り返す */
}


/* ========================
   テーブルの上
   ========================= */
.tableTitle {
  font-size: 55px;
  font-weight: 600;
  color: #06C755;
  text-align: center;
  margin-bottom: 3px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* 文字に影をつける */
  border-bottom: 5px solid black; /* 見出し下にライン */
}

.tableText {
  font-size: 25px;
  font-weight: 600;
  text-align: center;
  margin: 0; /* 上下 左右　の順 */
}

.tableText2 {
  font-size: 40px;
  text-align: center;
  margin: 5px 0; /* 上下 左右　の順 */
}

/* ==上の部分(ラジオボタン,本日欠席)== */
.absenceScale {
  display: inline-block;
  font-size: 28px;
  color: #555;
  text-align: center; /* 文字を中央寄せ */
  vertical-align: middle; /* 文字を縦中央寄せ */
  margin: 0;
}

.radio-group,
.radio-group2 {
  display: flex;
  flex-wrap: wrap; /* 複数行に折り返す */
  justify-content: center; /* 横中央寄せ */
  align-items: center; /* 縦中央揃え */
  gap: 10px; /* 要素間の間隔 */
  margin-bottom: 25px; /* 下の余白 */
}

.radio-group h2.absenceScale,
.radio-group2 h2.absenceScale {
  margin: 0; /* 上下余白リセット */
  font-size: 38px;
  color: #555;
  text-align: center;
}

.radio-group label,
.radio-group2 label {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f3f3f3;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 30px;
  transition: background-color 0.2s ease;
}

.radio-group label:hover,
.radio-group2 label:hover {
  background: #e0e0e0;
}

.radio-group input,
.radio-group2 input {
  accent-color: #06C755;
  width: 27px;
  height: 27px;
  cursor: pointer;
}

.todayAbsence-wrapper {
  display: flex;
  justify-content: center; /* 横方向中央 */
  align-items: center; /* 縦方向中央 */
}

#todayAbsence {
  margin: 0 20px; /* 余白 */
  padding: 10px 16px;
  font-size: 23px;
  border-radius: 10px;
  background-color: #06C755;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

#todayAbsence:hover {
  opacity: 0.9;
}

#todayAbsence:active {
  transform: scale(0.98);
}


/* ========================
   時間割テーブル
   ========================= */
#timetable .cellText {
  padding: 1px; /* 内側余白 */
  font-size: 22px;
  font-weight: 400; /* 通常は400 */
  height: 100px; /* セルの高さ */
  border: 1px solid #ddd; /* 枠線 */
  border-collapse: collapse; /* 枠線を重ねる */
  text-align: center; /* 文字を中央寄せ */
  vertical-align: middle; /* 文字を縦中央寄せ */
  overflow: hidden; /* はみ出た部分を隠す */
  word-break: break-word; /* 長い単語を折り返す */
}

th.todayHeader {
  border: 4px solid red; /* 赤い枠線 */
  background-color: #ffeaea; /* 少し淡い赤背景にしてもわかりやすい */
}


/* ========================
   欠時数テーブル
   ========================= */
.absence {
  background-color: #fff;
  margin-top: 20px; /* 上の余白 */
  padding: 14px; /* 内側の余白 */
  border-radius: 12px; /* 角を丸くする */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* 軽い影をつける */
}

.absence-wrapper {
  display: flex; /* 横並びにする */
  align-items: center; /* 垂直中央寄せ */
  gap: 20px; /* ボタンと欠時数の間の隙間 */
 margin-left: 15px;
}

.button-group {
  display: flex;
  flex-direction: column; /* 縦並び */
  align-items: center; /* ボタンを中央寄せ */
  gap: 2px; /* ボタン同士の隙間 */
}

.absence .absence-count,
.absence .absence2-count {
  font-size: 35px;
  font-weight: 600;
}

#absence td {
  background-color: #fff !important; /* セルの背景は変わらないようにする */
}

#absence td button {
  display: flex;
  justify-content: center; /* 横方向の中央寄せ */
  align-items: center; /* 縦方向の中央寄せ */
  margin: 10px 0;
  width: 44px;
  height: 44px;
  background-color: #06C755; /* 背景色 */
  color: #fff;
  font-weight: 400;
  border: none; /* 枠線なし */
  border-radius: 10px; /* 角を丸くする */
  cursor: pointer; /* クリック可能にする */
  transition: opacity 0.2s, transform 0.1s; /* ホバーとクリック時の変化をスムーズに */
  padding: 0; /* 内側の余白 */
  font-size: 25px; /* 文字サイズ */
}

#absence td button:hover {
  opacity: 0.85; /* 少し薄くなる */
}

#absence td button:active {
  transform: scale(0.95); /* 少し縮む */
}


/* =========================
   モーダル
   ========================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 95%;
  max-width: 500px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow-y: auto;
  max-height: 80vh;
}

.modal-content .modal-btn {
  display: block;
  width: 100%;
  margin: 8px auto;
  font-size: 26px;
  padding: 14px 16px;
  border-radius: 10px;
  border: none;
  background-color: #06C755;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.modal-content .modal-btn:hover {
  opacity: 0.9;
}

.modal-content .modal-btn:active {
  transform: scale(0.97);
}

#closeModal {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 38px;
  color: #777;
  cursor: pointer;
}