@charset "utf-8";
/* ============================================================
   フレームスCMS フォーラム  app.css
   「掲示板デザイン見本（§2）」のデザイントークンを、
   現掲示板のクラス構成（.topbar / .card / .post / .badge 等）に対応させたもの。
   ============================================================ */

/* ---- 基本 ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
  margin: 0;
  color: #222;
  background: #fafafa;
}
a { color: #c2410c; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 18px; padding-bottom: 64px; }

h1 { font-size: 1.4rem; margin: 0 0 16px; }
h2 { font-size: 1.1rem; margin: 24px 0 10px; }

.muted { opacity: .66; font-size: .88rem; }
.c { text-align: center; }
.req { color: #e31944; }
.hr { height: 1px; background: #e5e5e5; margin: 14px 0; }

/* ---- ヘッダー ---- */
.topbar { background: #fff; border-bottom: 1px solid #e5e5e5; }
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand a { font-weight: 700; font-size: 1.15rem; color: #222; text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.welcome { margin: 14px 0 0; font-size: .9rem; opacity: .8; }

/* ---- ボタン（ピル型）---- */
button, .btn {
  appearance: none; -webkit-appearance: none;
  border: 1px solid #222; background: #222; color: #fff;
  border-radius: 999px; padding: .6rem 1.3rem; font-size: .95rem;
  cursor: pointer; text-decoration: none; display: inline-block;
  line-height: 1.2; text-align: center; transition: opacity .15s ease;
}
button:hover, .btn:hover { opacity: .85; }
.btn.primary { background: #222; color: #fff; border-color: #222; }
/* 副ボタン：白地・黒文字・黒枠 */
.btn.sub, .btn.ghost { background: transparent; color: #222; border-color: #222; }
/* 新規登録：白地・枠つき（控えめ） */
.btn.regist { background: #fff; color: #222; border-color: #bbb; }
.btn.small { padding: .35rem .8rem; font-size: .82rem; }

.pill {
  display: inline-block; padding: .4rem 1rem; border-radius: 999px;
  background: #f0f0f0; color: #333; font-size: .9rem; text-decoration: none;
  border: 1px solid #e2e2e2;
}
a.pill:hover { background: #e9e9e9; }

/* ---- レイアウト ---- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 4px; }

/* ---- カード ---- */
.card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 12px;
  margin: 14px 0; overflow: hidden;
}
.card .hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid #eee; font-weight: 600;
}
.card .bd { padding: 18px 20px; }

/* ---- フォーム ---- */
.field { margin-top: 14px; }
label { display: block; margin-top: 4px; font-weight: 600; font-size: .95rem; }
input, select, textarea {
  width: 100%; padding: .6rem; border: 1px solid #ccc; border-radius: 8px;
  font-size: 1rem; margin-top: 4px; background: #fff; color: #222;
  font-family: inherit;
}
textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
input[type="file"] { padding: .4rem; background: #fafafa; }

/* チェックボックス・ラジオ
   上の「input { width:100% }」がそのまま効くと、四角が横いっぱいに伸びて
   中央に浮いてしまうため、ここで元のサイズに戻して文字と同じ行に並べる。 */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  flex: none;
}
/* チェックボックスを含むラベルは「四角 → 文字」の横並びにする。
   文字が2行になっても、2行目が四角の下に潜り込まない。 */
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  line-height: 1.6;
  cursor: pointer;
}
label:has(> input[type="checkbox"]) > input,
label:has(> input[type="radio"]) > input {
  margin-top: .25em;
}
.search-fields { margin-top: 4px; }
.search-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
/* 入力欄の直後に来る送信ボタンに上マージン（欄とくっつかないように） */
.field + button,
.field + .btn { margin-top: 18px; }

/* ---- テーブル ---- */
table, .table {
  width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .92rem;
}
th, td { border: 1px solid #e0e0e0; padding: .55rem .6rem; text-align: left; vertical-align: top; }
th { background: #f4f4f4; font-weight: 600; }
.thread-table .col-title a { font-weight: 600; text-decoration: none; color: #1f2937; }
.thread-table .col-title a:hover { text-decoration: underline; }

/* ---- トップの注意書き ---- */
.forum-intro .intro-list { margin: 0; padding-left: 1.2em; }
.forum-intro .intro-list li { margin: 6px 0; }
.forum-intro .intro-strong { color: #c2410c; }

/* ---- バッジ（状態 / NEW / UP）---- */
.badge {
  display: inline-block; padding: .15rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
  background: #eef0f2; color: #555;
}
.badge.open   { background: #e7f6ec; color: #1a7f3c; }   /* 受付中 */
.badge.solved { background: #eef0f2; color: #555;   }     /* 解決済み */
.badge.closed { background: #fde8e8; color: #c01030; }    /* クローズ */
.badge.new    { background: #e31944; color: #fff; }
.badge.up     { background: #fb923c; color: #fff; }
.thread-mark  { margin-left: 6px; font-size: .68rem; padding: .1rem .5rem; }

/* ---- スレッド本文・回答カード ---- */
.post { padding: 16px 20px; border-bottom: 1px solid #eee; }
.post:last-child { border-bottom: 0; }
.post.asker { background: #fff; }
.post.staff { background: #fff7ed; }   /* 管理者/サポートの回答＝薄オレンジ */
.post .meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  color: #666; font-size: .85rem; margin-bottom: 8px;
}
.post .body { white-space: pre-wrap; word-break: break-word; }
.mark-solved-ui { margin-top: 12px; }

/* ---- お知らせ / 注意枠 ---- */
.notice {
  background: #f7f7f7; border: 1px solid #ececec; border-radius: 8px;
  padding: 10px 14px; margin: 10px 0;
}
.notice.muted { background: #f7f7f7; }
.warn-box {
  background: #fff5f5; border: 1px solid #e31944; color: #c01030;
  border-radius: 8px; padding: 10px 14px; margin: 10px 0;
}

/* 休止/サイト通知（オレンジ枠）*/
.site-notice {
  background: #fff7ed; border: 2px solid #fb923c; border-radius: 10px;
  padding: 12px 16px; margin: 16px 0;
}
.site-notice__title { font-weight: 700; font-size: 1.03rem; margin-bottom: 4px; }
.site-notice__msg { line-height: 1.7; }

/* カテゴリ注意書き（管理機能・残置）*/
.cat-notice { background: #fff7ed; border: 1px solid #fb923c; }

/* ---- フラッシュメッセージ ---- */
.flashes { margin: 14px 0; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 8px 0; font-size: .95rem; }
.flash.ok   { background: #e7f6ec; border: 1px solid #a8dcb9; color: #1a7f3c; }
.flash.warn { background: #fff7ed; border: 1px solid #fb923c; color: #b45309; }
.flash.err  { background: #fff5f5; border: 1px solid #f3b4b4; color: #c01030; }
.flash.pending { background: #fff7ed; border: 1px solid #fb923c; color: #b45309; }
.flash-plain, .only-link { text-align: center; padding: 22px 10px; }

/* ---- 管理者確認URL（★）---- */
.refurl-details { display: inline-block; }
.refurl-details summary { cursor: pointer; list-style: none; display: inline-block; }
.refurl-details summary::-webkit-details-marker { display: none; }
.refmark { color: #e31944; font-weight: 700; }
.refurl-box {
  margin-top: 6px; padding: 8px 10px; background: #fff7ed;
  border: 1px solid #fb923c; border-radius: 8px; font-size: .85rem;
}
.refurl-row { display: flex; gap: 6px; flex-wrap: wrap; }
.refurl-row .label { font-weight: 600; }

/* ---- リンク自動装飾 ---- */
.autolink { color: #c2410c; word-break: break-all; }

/* ---- フッター ---- */
.footer { margin-top: 40px; border-top: 1px solid #e5e5e5; background: #fff; }
.footer .wrap { padding-top: 16px; padding-bottom: 16px; }

/* ---- レスポンシブ ---- */
@media (max-width: 600px) {
  .card .hd, .card .bd, .post { padding-left: 14px; padding-right: 14px; }
  table, .table { font-size: .86rem; }
  th, td { padding: .45rem .4rem; }
  .topbar .wrap { gap: 8px; }
}
