/* =========================================================
   掲示板専用スタイル（board.css）
   ※ header / footer / メニューUIとは独立
========================================================= */

/* ---------------------------------
   共通：見出し
--------------------------------- */
.board-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 8px 0 10px;
  text-align: center;
  color: var(--accent);
}

/* ---------------------------------
   掲示板一覧（index）
--------------------------------- */

.new-thread-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 20px;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 16px;

  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;

  border: 2px solid var(--accent);
  background: var(--card);
  color: var(--accent);

  box-shadow: 0 3px 10px var(--shadow);
  transition: 0.2s;
}

.new-thread-btn:hover {
  opacity: 0.9;
}

.new-thread-btn2 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 20px;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 16px;

  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;

  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--btn-text);

  box-shadow: 0 3px 10px var(--shadow);
  transition: 0.2s;
}

.new-thread-btn2:hover {
  opacity: 0.9;
}

.thread-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thread-item {
  list-style: none;
}

.no-thread {
  padding: 20px;
  text-align: center;
  color: var(--text-sub);
}

.thread-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.thread-footer .left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.thread-footer .more {
  margin-left: auto;
  white-space: nowrap;
}

/* ---------------------------------
   一覧途中の広告
--------------------------------- */
.ad-banner { list-style: none; }

.ad-box {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin: 10px 0;
  box-shadow: 0 3px 12px var(--shadow);
  color: var(--text-sub);
  font-size: 0.85rem;
}

/* ---------------------------------
   ページング（board専用上書き）
--------------------------------- */
.board-index .pagination,
.topic-page .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.9rem;
}

/* ---------------------------------
   新規スレッド作成ページ（post.php）
--------------------------------- */

.board-write .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 12px 0 18px;
  color: var(--accent);
}

.write-form {
  background: var(--card);
  padding: 18px 18px 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px var(--shadow);
}

.write-form label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.write-form input,
.write-form select,
.write-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: 10px;
  background: var(--bg-sub);
  color: var(--text);
  border: 1px solid var(--border);
  transition: 0.2s ease;
}

.write-form input:focus,
.write-form select:focus,
.write-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(150,120,255,0.25);
}

.write-form input[type="file"] {
  padding: 6px;
  background: transparent;
}

.count-below {
  font-size: 14px;
  color: var(--accent);
  margin-top: 6px;
  text-align: right;
}

/* ---------------------------------
   トピック詳細
--------------------------------- */

.topic-page { padding-top: 0; }

.topic-title {
  position: relative;
  background: rgba(180,120,255,0.12);
  border-radius: 8px;
  padding: 4px 10px 4px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
}

.topic-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--accent);
  border-radius: 8px 0 0 8px;
}

.topic-body {
  background: var(--card);
  padding: 6px 0;
  margin-bottom: 14px;
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--text);
}

.topic-image {
  text-align: center;
  padding: 0 14px;
}

.topic-image img {
  margin: 10px auto 0;
  max-width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 20px;
  display: inline-block;
}

.topic-divider {
  margin: 14px 0;
  border: none;
  border-top: 4px solid var(--border);
  opacity: 0.6;
}

.reply-count,
.topic-date {
  font-size:0.8rem;
  padding: 0px 5px 0px 0px;
}

/* ---------------------------------
   削除関連
--------------------------------- */

.detail-card {
  position: relative;
  border: 2px solid #d8c9f3;
  border-radius: 16px;
  padding: 20px;
  background: var(--card);
}

.delete-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translate(-10px, -10px);
  font-size: 11px;
  color: #fff;
  background: #ff6b6b;
  padding: 4px 12px;
  border-radius: 14px;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.delete-btn:hover { background: #e34a4a; }

.delete-reply{
  margin-bottom: 8px;
  font-size:0.71em;
}

.deleted-notice {
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(-12px);
  transition: 0.5s ease;
}

.deleted-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.delete-thread-page input[type="text"] {
  background: var(--bg-sub);
  color: var(--text);
  border: 1px solid var(--border);
}

.delete-error,
.delete-answer {
  background: #ffe5e5;
  border: 1px solid #ff8a8a;
  color: #c00;
  padding: 12px;
  margin: 12px 0px;
  border-radius: 6px;
  font-weight: bold;
  margin-bottom: 20px;
}



/* ============================================
   ▼ 削除ページ（delete_thread / delete_reply）
   入力欄とボタンのデザイン統一
============================================ */

/* フォームカード */
.delete-form {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 20px;
}

/* ラベル */
.delete-form label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

/* 入力欄（番号でも text 扱いで統一） */
.delete-form input[type="number"],
.delete-form input[type="text"],
.delete-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    background: var(--bg-sub);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    margin-bottom: 14px;
    transition: border .25s ease, background .25s ease;
}

.delete-form input:focus {
    border-color: var(--accent);
    background: var(--bg-sub);
    outline: none;
}

/* 削除ボタン */
.delete-form .btn-primary {
    width: 100%;
    display: block;
    padding: 14px;
    border-radius: 12px;
    background: var(--accent);
    color: #FFF;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    box-shadow: 0 4px 10px var(--shadow);
    cursor: pointer;
    transition: opacity .2s ease, transform .15s ease;
}

.delete-form .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* キャンセルリンク */
.cancel-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: var(--text-sub);
    text-decoration: none;
}

.cancel-link:hover {
    text-decoration: underline;
}

/* ---------------------------------
   返信フォーム
--------------------------------- */

.reply-form-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 4px 12px var(--shadow);
}

.reply-form-card label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.reply-form-card input,
.reply-form-card textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: 12px;
  background: var(--bg-sub);
  color: var(--text);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.reply-delete-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  background: #ff4d4d;
  color: #fff;
  padding: 7px 6px;
  border-radius: 6px;
  font-size: 0.71rem;
}

.reply-delete-btn:hover { background: #e60000; }

/* ---------------------------------
   メタ情報
--------------------------------- */

.topic-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 6px;
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.topic-meta-grid div strong {
  color: var(--text);
  font-weight: 600;
}

.post-main {
  border-width: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(0,0,0,0.15),
              0 0 10px var(--accent-soft);
  border-radius: calc(var(--radius) * 1.4);
  padding: 10px;
  padding-top: 0px;
}

.post-reply {
  padding: 10px;
  padding-top: 0px;
  margin: 10px 0px;
  border-width: 1px;
  border-color: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  opacity: 0.95;
  background-color: var(--card);
}

/* ---------------------------------
   カテゴリタブ
--------------------------------- */

.category-tabs {
  margin: 10px auto 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 680px;
}

.category-tabs a {
  display: inline-block;
  width: 100%;
  padding: 10px 6px;
  text-align: center;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 2px 8px var(--shadow);
}

.category-tabs a:hover { background: var(--accent-soft); }

.category-tabs a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (min-width: 700px) {
  .category-tabs {
    grid-template-columns: repeat(5, 1fr);
  }
}

.new-label {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
  background: #d44bff;
  border-radius: 6px;
  animation: newFlash 1s infinite alternate;
}

@keyframes newFlash {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ---------------------------------
   地域カテゴリページ
--------------------------------- */

.pref-block {
  margin: 24px 0 32px;
  padding: 0 4px;
}

.pref-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
}

.pref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pref-item {
  display: block;
  padding: 10px 6px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px var(--shadow);
}

.pref-item:hover { background: var(--accent-soft); }

/* ---------------------------------
   投稿エラー
--------------------------------- */

.error-card {
  background: #fff5f5;
  border: 1px solid #ffb3b3;
  border-left: 6px solid #ff6b6b;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 20px 0;
  box-shadow: 0 4px 14px rgba(255, 120, 120, 0.15);
}

.error-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #d9534f;
  margin-bottom: 8px;
}

.error-card-list { padding-left: 18px; }

.error-card-list li {
  margin: 5px 0;
  color: #b80000;
}

/* ---------------------------------
   確認ページ
--------------------------------- */

.confirm-box {
  background: var(--accent-soft);
  color: var(--btn-text);
  border-radius: 16px;
  padding: 20px;
  max-width: 760px;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 4px solid var(--border);
}

.confirm-table { width: 100%; }

.confirm-table th {
  width: 30%;
  padding: 10px 5px;
  font-weight: bold;
}

.confirm-table td { padding: 10px 5px; }

.confirm-image {
  width: 100%;
  max-width: 350px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-top: 10px;
}

.confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
}

.confirm-buttons form {
  flex: 1; /* 横幅均等 */
  margin: 0;
}

.confirm-buttons .btn-secondary,
.confirm-buttons .btn-primary {
  width: 100%;
  padding: 14px 0;
  border-radius: 10px;
  font-size: 1rem;
}

.confirm-buttons .btn-secondary {
  background: #333;
  color: #fff;
}

.confirm-buttons .btn-primary {
  background: var(--accent);
  color: #fff;
}


/* ---------------------------------
   ページ下部投稿ボタン用位置
--------------------------------- */
.board-post-new {
  margin: 20px 0;
}
/* ---------------------------------
   返信確認画面：ボタン配置を正常に戻す
--------------------------------- */
.confirm-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 24px !important;
}

.confirm-buttons form {
    flex: 1 1 0 !important;   /* ← 均等幅 */
    margin: 0 !important;
}

.confirm-buttons button {
    width: 100% !important;   /* ← ボタンをフォーム幅いっぱいに */
    white-space: nowrap !important;
}


/* ---------------------------------
   投稿・返信注意文
--------------------------------- */
.warning-box {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  padding-top: 0px;
  border-radius: 8px;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.warning-box {
  color: #c0392b;
  border-color: #e6b8b8;
  background: #fff5f5;
}

/* ---------------------------------
   レスポンシブ
--------------------------------- */

@media (min-width: 768px) {
  main.board-index,
  .topic-page,
  .board-write {
    padding-top: 20px;
    padding-bottom: 60px;
  }
}


/* ガイド誘導セクションのスタイル */
.mini-guide-section {
    margin: 30px auto;
    padding: 15px;
    background-color: #ffffff; /* 白背景で清潔感を出す */
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.mini-guide-section p {
    font-size: 13px; /* 小さめにして「添える」感じに */
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* リンク部分の強調 */
.guide-link {
    color: #a084ff; /* サイトのテーマカラー */
    font-weight: bold;
    text-decoration: underline;
    margin: 0 3px;
}

.guide-link:hover {
    color: #8c6dff;
    text-decoration: none;
}

/* 見出し説明 */
.cc {
    margin: 20px auto;
    padding: 15px 20px;
    background-color: var(--bg-sub);
    border-left: 4px solid var(--accent);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* スマホでの見え方を調整 */
@media screen and (max-width: 768px) {
    .cc {
        margin: 15px 10px;
        font-size: 13px;
        padding: 12px 15px;
    }
}


/* PRアイテム全体の背景をわずかに変えて区別する */
.pr-item .thread-card {
    background-color: var(--card);
    border: 4px solid var(--accent);
}

/* PRバッジのスタイル */
.pr-badge {
    display: inline-block;
    background: #999; /* 目立ちすぎないグレー */
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 5px;
    font-weight: bold;
}

/* PR用スレッドタイトルの色（任意） */
.pr-item .thread-title {
    color: #333;
}