/* ====== Petitions show 専用スタイル ====== */

/* PC・スマホ共通 -------------------- */

body {
  margin: 0;  /* ブラウザのデフォルト余白を消す */
}

.petition-page {
  padding: 24px 16px;
}

/* タイトル */
.petition-title {
  font-size: 1.9rem;
  line-height: 1.4;
  margin: 0 auto 20px;
  max-width: 1100px; /* 本文と右カラムと幅を揃える */
}

/* 全体：2カラムレイアウト（PC 用） */
.petition-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
}

/* 左側（嘆願文） */
.petition-left {
  flex: 1 1 0;
  min-width: 0;           /* はみ出し防止 */
}

.petition-body {
  line-height: 1.9;
  white-space: pre-wrap;  /* 改行保持 + 自動折り返し */
  font-size: 16px;
}

/* 右側（署名数・フォーム） */
.petition-right {
  flex: 0 0 340px;        /* 340px 固定幅 */
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 共通ボックス */
.box {
  background: #fff;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.box h2 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  border-left: 4px solid #007bff;
  padding-left: 6px;
}

.field {
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  box-sizing: border-box;
}

.actions {
  margin-top: 8px;
}

.actions button,
.actions input[type="submit"] {
  padding: 0.5rem 0.9rem;
}

.comment-note {
  font-size: 0.9rem;
  color: #555;
}

/* ====== スマホ・タブレット用（幅 768px 以下） ====== */
/* スマホ時の調整 */
@media (max-width: 768px) {

  .petition-page {
    padding: 0 16px;       /* ← スマホの左右余白を増やす */
  }

  .petition-container {
    flex-direction: column;
  }

  .petition-body {
    font-size: 13px;       /* ← 少し小さめにして読みやすく */
    line-height: 1.6;      /* ← スマホならこのくらいが◎ */
    word-break: break-word;
  }

  .petition-right {
    width: 100%;
    margin-top: 20px;
  }

  .box {
    padding: 16px;
  }

  .actions button,
  .actions input[type="submit"] {
    padding: 0.7rem 1rem;
  }
}