/* 1. 全体・フォント設定 */
:root {
  --primary-color: #1e6091;       
  --primary-hover: #1a4971;       /* ホバー色 */
  --text-main: #222222;           /* 基本テキスト色 */
  --text-muted: #555555;          /* 補足テキスト色 */
  --border-color: #d1d5db;         /* テーブル・区切り線 */
  --badge-red-bg: #fde8e8;         /* 締め切り等の赤強調背景 */
  --badge-red-text: #c81e1e;       /* 締め切り等の赤テキスト */
  --table-header-bg: #e5e7eb;      /* テーブルヘッダー背景色 */
  --table-stripe-bg: #f9fafb;      /* テーブル交互背景色 (偶数行) */
  --table-hover-bg: #e0f2fe;       /* ホバー選択時の背景色 (爽やかなライトブルー) */
  --table-hover-text: #0369a1;     /* ホバー選択時のテキスト色 */
}

* {
  box-sizing: border-box;
}

body {
  margin: 24px auto;
  padding: 0 24px;
  max-width: 1000px;
  background-color: #ffffff;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* インライン属性(align)のテキスト位置調整 */
h1[align], h2[align], p[align], div[align] {
  text-align: left !important;
}

/* 2. 見出し・テキスト装飾 */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  border-left: 5px solid var(--primary-color);
  padding-left: 12px;
  margin-top: 10px;
  margin-bottom: 20px;
  line-height: 1.4;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-color);
}

h2 a {
  color: inherit;
  text-decoration: none;
}

p {
  margin-top: 0;
  margin-bottom: 16px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* 日付等の強調テキスト (<font color="#ff3300">) */
font[color], font[color="#ff3300"] {
  color: var(--badge-red-text) !important;
  background-color: var(--badge-red-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

/* 3. テーブルと改行制御 */
table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid var(--border-color) !important;
  margin: 20px 0 !important;
  font-size: 14px;
}

table[border], table td, table tr {
  border: 1px solid var(--border-color) !important;
}


table td {
  padding: 10px 12px !important;
  vertical-align: middle;
  white-space: nowrap;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              color 0.2s ease,
              border-left-color 0.2s ease;
}


table td[align="left"] {
  white-space: normal !important;
  min-width: 280px;
}


table tbody tr:first-child {
  background-color: var(--table-header-bg) !important;
  font-weight: 600;
}

table tbody tr:first-child td {
  text-align: center !important;
  white-space: nowrap;
}

/* 4. 行の背景色 */
/* 偶数行 */
table tbody tr:nth-child(even) td {
  background-color: var(--table-stripe-bg);
}

/* 奇数行 */
table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

/* 複数行にマージされたセル (rowspan) の色固定 */
table tbody td[rowspan] {
  background-color: #ffffff !important;
  text-align: center;
  font-weight: 500;
}

/* 6. 注意書き・フッター */
ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 6px;
}

div[align="left"] {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -10px;
  margin-bottom: 16px;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 30px 0 20px 0;
}

/* モバイル表示 */
@media (max-width: 768px) {
  body {
    padding: 0 12px;
  }
  table {
    display: block;
    overflow-x: auto;
  }
}