/* CIL 共創プラットフォーム 共通スタイル */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #06b6d4;
  --grad: linear-gradient(135deg, #4f46e5, #06b6d4);
  --ink: #1e2433;
  --muted: #6b7280;
  --bg: #f6f7fb;
  --card: #ffffff;
  --line: #e5e8f0;
  --danger: #dc2626;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
.brand {
  font-size: 1.55rem; font-weight: 800; letter-spacing: 3px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--primary);
}
.brand:hover { text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.nav a { color: #3d4657; font-size: 0.92rem; font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.nav-admin { color: var(--danger) !important; font-weight: 700 !important; }
.nav-toggle { display: none; }
.nav-burger { display: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); }
@media (max-width: 860px) {
  .nav-burger { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 0 12px; }
  .nav a { display: block; width: 100%; padding: 8px 4px; border-radius: 8px; }
  .nav a:hover { background: var(--bg); }
  .nav-toggle:checked ~ .nav { display: flex; }
}
.badge {
  background: #e5484d; color: #fff; border-radius: 10px;
  font-size: 0.72rem; padding: 1px 7px; margin-left: 4px; vertical-align: middle;
}

/* 未確認バナー */
.banner-warn {
  background: #fef3cd; border-bottom: 1px solid #f0d47e; color: #7a5b0e;
  padding: 9px 0; font-size: 0.9rem;
}
.banner-warn a { font-weight: 700; color: #7a5b0e; text-decoration: underline; }

main { padding: 28px 16px 56px; min-height: 70vh; }

/* フラッシュメッセージ */
.flash {
  background: #e7f5ec; border: 1px solid #7fc79a; color: #21633c;
  border-radius: 10px; padding: 11px 15px; margin-bottom: 20px;
}
.flash-error { background: #fdeaea; border-color: #e5a0a0; color: #8a2c2c; }

/* カード */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(30, 36, 51, 0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 4px 14px rgba(30, 36, 51, 0.07); }
.card h3 { margin-bottom: 6px; font-size: 1.08rem; }
.card .meta { color: var(--muted); font-size: 0.84rem; margin-bottom: 8px; }
.card p.body-text { white-space: pre-wrap; }
.card-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* 見出し */
.page-title { margin-bottom: 18px; font-size: 1.5rem; }
.section-title {
  margin: 30px 0 14px; font-size: 1.15rem;
  border-left: 4px solid var(--primary); padding-left: 10px;
}

/* フォーム */
form.stack { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
label { font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=search], textarea, select {
  width: 100%; padding: 10px 13px; border: 1px solid #c9d0dd;
  border-radius: 9px; font-size: 1rem; font-family: inherit; background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(79, 70, 229, 0.35); border-color: var(--primary);
}
.hp { display: none !important; }

.btn {
  display: inline-block; background: var(--grad); color: #fff; border: none;
  border-radius: 9px; padding: 10px 24px; font-size: 0.95rem; cursor: pointer;
  font-family: inherit; font-weight: 600;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:hover { opacity: 0.88; text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 5px 15px; font-size: 0.85rem; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: #eef0fd; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #a81f1f; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--danger); border-color: var(--danger); background: #fff5f5; }

/* タグ・ステータス */
.tag {
  display: inline-block; border-radius: 12px; padding: 2px 12px;
  font-size: 0.78rem; font-weight: 700;
}
.tag-recruiting { background: #e7ecfd; color: #4338ca; }
.tag-presenting { background: #fdf3e2; color: #a06a12; }
.tag-active     { background: #e7f5ec; color: #21813c; }
.tag-closed     { background: #ececee; color: #6a7280; }
.tag-progress   { background: #e0f4fa; color: #0e7490; }
.tag-lesson     { background: #f1e9fb; color: #6b3fa0; }
.tag-challenge  { background: #fdeee2; color: #a05512; }
.tag-collaborate{ background: #e7f5ec; color: #21813c; }
.tag-invest     { background: #fdf3e2; color: #a06a12; }
.tag-open       { background: #fdeaea; color: #a81f1f; }
.tag-resolved   { background: #ececee; color: #6a7280; }

/* ヒーロー（トップページ） */
.hero {
  background: var(--grad);
  color: #fff; border-radius: 18px; padding: 52px 36px; margin-bottom: 34px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}
.hero h1 { font-size: 1.85rem; margin-bottom: 12px; line-height: 1.45; }
.hero p { color: #e3ecfb; max-width: 640px; }
.hero .btn { background: #fff; color: var(--primary); margin-top: 20px; font-weight: 700; }

/* 統計 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center;
}
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.stat .label { color: var(--muted); font-size: 0.84rem; }

/* メッセージスレッド */
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.msg { max-width: 75%; padding: 10px 15px; border-radius: 14px; white-space: pre-wrap; }
.msg .time { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
.msg-mine { align-self: flex-end; background: #dde3fc; border-bottom-right-radius: 3px; }
.msg-theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 3px; }

/* テーブル */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { padding: 10px 14px; border-bottom: 1px solid #edf1f6; text-align: left; font-size: 0.92rem; }
table.list th { background: #f0f2f9; color: #4a5568; white-space: nowrap; }

/* 検索バー */
.searchbar { display: flex; gap: 8px; margin-bottom: 18px; max-width: 480px; }
.searchbar input { flex: 1; }

/* ページネーション */
.pagination { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 26px 0 10px; }
.pagination a {
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 16px; font-size: 0.9rem;
}
.pagination a:hover { border-color: var(--primary); text-decoration: none; }
.pagination span { color: var(--muted); font-size: 0.9rem; }

/* 静的ページ（規約など） */
.doc h2 { margin: 26px 0 8px; font-size: 1.1rem; }
.doc p, .doc li { font-size: 0.94rem; }
.doc ol, .doc ul { padding-left: 24px; }

.muted { color: var(--muted); font-size: 0.88rem; }
.inline-form { display: inline; }
.danger-zone { border-color: #f3c1c1; background: #fffafa; }

.site-footer { background: #1c2333; color: #9fb0c3; padding: 26px 0; font-size: 0.85rem; text-align: center; }
.footer-links { margin-bottom: 8px; }
.footer-links a { color: #c6d2e2; margin: 0 10px; }
