@page { size: A4 portrait; margin: 1cm; }

body {
  font-family: "M PLUS Rounded 1c", "Yu Gothic", "游ゴシック", Meiryo, sans-serif;
  font-size: 10px;
  margin: 0;
  background: #fdfcff;
  color: #555;
}

h1 {
  color: #d9538c;
  text-align: center;
  margin: 0.4em 0 0.5em;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.1em;
}

/* --- ヘッダーボックス（全体） --- */
.header-box {
  width: 780px;
  margin: 0 auto 16px;
  padding: 16px;
  border: 2px solid #a8d8ba;
  border-radius: 12px;
  background: #fef6fa;
  display: flex;
  justify-content: space-between; /* 左右に分割 */
  align-items: flex-start; /* 上揃え */
  gap: 20px; /* 左右セクションの隙間 */
}

/* --- ヘッダー左側 (基本情報 + サイズ表) --- */
.header-left {
  width: 55%;
  display: flex;
  flex-direction: column;
  gap: 12px; /* 基本情報とサイズ表の隙間 */
}

/* 基本情報 (START/GOAL) */
.basic-info {
  font-size: 12px;
  color: #5a4a4f;
  font-weight: 500;
  padding: 4px;
}
.info-row {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-row strong {
  color: #d9538c; /* ラベルの色をピンクに */
}

/* サイズ計測表 */
.size-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e0cde4;
  border-radius: 4px;
  overflow: hidden;
  font-size: 11px;
}
.size-table th {
  background-color: #f3f0f7; /* ラベンダー色 */
  color: #6a5a82;
  font-weight: 700;
  padding: 5px;
  border-bottom: 1px solid #e0cde4;
}
.size-table td {
  padding: 8px 5px; /* 手書きしやすいよう高さを確保 */
  border: 1px solid #e0cde4;
  text-align: center;
  color: #777;
  height: 24px; /* 高さを指定 */
}
.size-table td:first-child {
  text-align: left;
  padding-left: 10px;
  font-weight: 500;
  background-color: #fdfcff;
}

/* --- ヘッダー右側 (ルール + ご褒美) --- */
.header-right {
  width: 45%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 共通ボックススタイル */
.rule-box, .reward-box {
  background: #fff;
  border: 1px solid #e0cde4;
  border-radius: 8px;
  padding: 10px 14px;
  height: 136px; /* 高さを揃える */
}
.box-title {
  font-size: 12px;
  color: #6a5a82;
  margin: 0 0 8px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* 手書き用の点線 */
.input-line {
  display: block;
  border-bottom: 1px dotted #b0a0b8; /* 書き込み用の点線 */
  height: 20px;
  margin-bottom: 4px;
}
.input-line.short { width: 100px; display: inline-block; }
.input-line.xs { width: 50px; display: inline-block; }
.input-line.long { width: 100%; }


/* --- 1週目テーブル（変更なし） --- */
table:not(.size-table) {
  border-collapse: collapse;
  width: 780px;
  margin: 0 auto;
  table-layout: fixed;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

table:not(.size-table) th,
table:not(.size-table) td {
  border: 1px solid #e0cde4;
  padding: 6px 5px;
  height: 60px;
  vertical-align: middle;
  text-align: center;
  word-break: break-word;
}

table:not(.size-table) th {
  background-color: #fdeff5;
  color: #d9538c;
  font-weight: 700;
  font-size: 11px;
  height: 30px;
}

.day-cell { font-weight: 700; color: #d9538c; width: 24px; font-size: 12px; }
.date-cell { width: 35px; }

.weight-cell {
  position: relative;
  padding-right: 18px;
  background: #eaf6ee;
  color: #3a5a42;
  width: 45px;
  font-weight: 700;
  font-size: 12px;
}
.weight-cell .unit { position: absolute; bottom: 4px; right: 4px; font-size: 0.7em; color: #666; }

.mood-cell {
  background: #f3f0f7;
  color: #6a5a82;
  width: 50px;
  font-size: 10px;
  vertical-align: top;
  padding: 6px;
}

.goal-cell {
  font-weight: 700;
  font-size: 10px;
  vertical-align: top;
  padding: 6px;
  text-align: left;
  letter-spacing: 0.05em;
  color: #444;
}

.memo-cell {
  background: #fff;
  text-align: left;
  vertical-align: top;
  padding: 6px;
  font-size: 9px;
  height: auto;
}

/* 週ごと目標の背景色 */
.background-slow { background-color: #dff0d0; }
.background-attack { background-color: #f9cdd7; }
.background-maintain { background-color: #fef5cc; }
.background-adjust { background-color: #e6e0f0; }
.background-push { background-color: #fbcbb8; }