/* =========================
   投稿ページ専用CSS
   style.css の後に読み込む
========================= */

body.post-page {
  background: linear-gradient(180deg, #f7faf7 0%, #eef6ef 100%);
}

.post-page .page {
  width: min(900px, calc(100% - 28px));
}

/* =========================
   ヒーロー
========================= */
.post-page .hero {
  background: linear-gradient(135deg, #e8f5ea, #f7faf7);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 30px 24px;
  margin-bottom: 24px;
}

.post-page .hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.25;
}

.post-page .hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
}

/* =========================
   フォームカード
========================= */
.post-page .card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 26px 24px;
}

.post-page .form-grid {
  gap: 22px;
}

/* =========================
   入力欄
========================= */
.post-page label {
  display: block;
  margin-bottom: 9px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.post-page input[type="text"],
.post-page select,
.post-page textarea,
.post-page input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  padding: 14px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-page textarea {
  min-height: 160px;
  resize: vertical;
}

.post-page input[type="text"]:focus,
.post-page select:focus,
.post-page textarea:focus,
.post-page input[type="file"]:focus {
  outline: none;
  border-color: #8fb89a;
  box-shadow: 0 0 0 4px rgba(47, 125, 74, 0.08);
}

/* =========================
   補足文
========================= */
.post-page .help {
  margin-top: 7px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
}

/* =========================
   画像プレビュー
========================= */
.post-page .preview {
  margin-top: 12px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fbfefb;
  min-height: 96px;
}

.post-page .preview-image {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 14px;
  margin: 0 auto;
}

/* =========================
   確認チェック
========================= */
.post-page .agree-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfefb;
}

.post-page .agree-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
}

.post-page .agree-row span {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--text);
}

/* =========================
   ボタンエリア
========================= */
.post-page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.post-page .actions .btn {
  min-width: 160px;
}

.post-page .btn-primary {
  background: var(--primary);
  color: #fff;
}

.post-page .btn-primary:hover {
  background: var(--primary-dark);
}

.post-page .btn-secondary {
  background: #eef4ef;
  color: #314236;
}

.post-page .btn-secondary:hover {
  background: #e3e9e4;
}

/* =========================
   notice 強化
========================= */
.post-page .notice {
  font-size: 0.96rem;
  line-height: 1.7;
  border-radius: 14px;
}

/* =========================
   送信中の見え方
========================= */
.post-page .btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* =========================
   スマホ
========================= */
@media (max-width: 640px) {
  body.post-page .page {
    width: min(100%, calc(100% - 18px));
    padding-top: 16px;
    padding-bottom: 32px;
  }

  .post-page .hero,
  .post-page .card {
    padding: 16px;
  }

  .post-page .hero h1 {
    font-size: 2rem;
  }

  .post-page input[type="text"],
  .post-page select,
  .post-page textarea,
  .post-page input[type="file"] {
    font-size: 16px;
    padding: 16px;
  }

  .post-page .preview-image {
    max-height: 240px;
  }

  .post-page .actions {
    flex-direction: column;
  }

  .post-page .actions .btn {
    width: 100%;
    min-width: 0;
  }

  .post-page .agree-row {
    padding: 12px 14px;
  }
}