@charset "UTF-8";

body {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

.koyomi-container {
  max-width: 100%; /* ← 固定幅解除 */
  margin: 40px auto 20px auto; /* 上40px、下20pxに調整 */
  padding: 20px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* === タイトル === */
.koyomi-container h1 {
  text-align: center;
  font-size: 28px;
  color: #004d7a;
  margin-bottom: 30px;
}

/* === 日付ナビ === */
.date-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.date-nav a, .date-nav span {
  padding: 8px 12px;
  font-size: 15px;
  background-color: #eef4fa;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-decoration: none;
  color: #004d7a;
}

.date-nav span {
  background-color: #cfe8ff;
  font-weight: bold;
}

/* 表のスタイル */
.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table th, .table td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.2;
  vertical-align: top;
}

/* === 補足 === */
.koyomi-notes {
  margin-top: 30px;
  padding: 15px 20px;
  background-color: #f0f8ff;
  border-left: 4px solid #0077b6;
  font-size: 15px;
  color: #333;
}

.koyomi-notes ul {
  margin: 0;
  padding-left: 20px;
}

.koyomi-notes li {
  margin: 8px 0;
  line-height: 1.6;
}

/* lecture.css に追加 — 資料ページ専用「戻るボタン」 */
.return-button {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.return-button a {
  display: inline-block;
  padding: 12px 24px;
  background-color: #004d99;
  color: #fff;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.return-button a:hover {
  background-color: #0066cc;
  transform: scale(1.03);
}


/* === 九星盤全体ラッパー === */
.kyuseiban-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 30px 0;
}

/* 各ブロック（タイトル、九星盤、凶殺方位） */
.kyuseiban-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 1 320px;
  max-width: 350px;
  margin: 10px;
}

/* 九星盤タイトル */
.kyuseiban-block h3 {
 font-size: 18px;
 margin-bottom: 8px;
}

/* 凶殺方位リスト */
.kyuseiban-block ul {
  list-style: disc inside;
  padding: 0;
  margin-top: 10px;
  font-size: 14px;
  text-align: left;
}

/* 九星盤本体 */
.kyuseiban {
 width: 100%;
 max-width: 320px;
  aspect-ratio: 1 / 1;
  background-image: url(../img/kyuseiban.svg);	
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;      /* これは必須 */
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: clamp(14px, 4.5vw, 22px);
  font-weight: bold;
}

/* 数字位置 */
.kyuseiban span {
  position: absolute;
  font-size: clamp(10px, 1.1vw, 14px);
  width: 1.4em;
  height: 1.4em;
  line-height: 1.4em;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%);
}

/* 各方位の配置（中央含む） */
.kyuseiban .pos-cyugu { top: 50%; left: 50%; }
.kyuseiban .pos-ri    { top: 35%; left: 50%; }
.kyuseiban .pos-son   { top: 40%; left: 38%; }
.kyuseiban .pos-da    { top: 50%; left: 65%; }
.kyuseiban .pos-ken   { top: 60%; left: 62%; }
.kyuseiban .pos-kan   { top: 65%; left: 50%; }
.kyuseiban .pos-gon   { top: 60%; left: 38%; }
.kyuseiban .pos-shin  { top: 50%; left: 35%; }
.kyuseiban .pos-kon   { top: 40%; left: 62%; }

