@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%; }


/* ==============================
   暦概要早見表：SVG九星盤
============================== */

.koyomi-kyusei-color-guide {
  max-width: 1080px;
  margin: 0 auto 24px;
  padding: 16px 18px;
  background: #fffdf5;
  border: 1px solid #e8dca8;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.koyomi-kyusei-color-guide__title {
  margin-bottom: 10px;
  color: #5f4b12;
  font-weight: 800;
  font-size: 1.05rem;
}

.koyomi-kyusei-color-guide__items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.koyomi-guide-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #333;
  font-size: 0.95rem;
  white-space: nowrap;
}

.koyomi-guide-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.16);
}

.kill-goou {
  background: #f4c542;
}

.kill-anken {
  background: #c58af9;
}

.kill-yabure {
  background: #ff9e9e;
}

.koyomi-kyusei-color-guide__note {
  margin: 10px 0 0;
  color: #6a5a24;
  font-size: 0.9rem;
  line-height: 1.7;
}

.koyomi-kyusei-svg-board {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 12px;
  background: #ffffff;
  border: 1px solid #e1e8f0;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  box-sizing: border-box;
}

.koyomi-kyusei-svg-board svg {
  display: block;
  width: 100%;
  height: auto;
}

.koyomi-kill-list {
  list-style: none;
  margin: 12px auto 0;
  padding: 0;
  text-align: left;
  max-width: 300px;
}

.koyomi-kill-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.5;
}

.kyusei-kill-swatch {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.18);
}

@media screen and (max-width: 768px) {
  .koyomi-kyusei-color-guide {
    padding: 14px;
  }

  .koyomi-kyusei-color-guide__items {
    gap: 8px 12px;
  }

  .koyomi-guide-item {
    font-size: 0.9rem;
  }

  .koyomi-kyusei-svg-board {
    max-width: 300px;
  }
}

