/*
==========================================================
  style.css — なりきりサイト 共通スタイルシート
  テーマ：花見 × 刀剣乱舞 × ふんわり優しい
==========================================================

【カスタマイズガイド】
  色を変えたいときは「SECTION 1」だけ編集すれば
  サイト全体の色が変わります。

【フォント】
  HTMLの <head> にこれを追加してね：
  <link href="https://fonts.googleapis.com/css2?family=Klee+One:wght@400;600&display=swap" rel="stylesheet">

==========================================================
*/


/* ==========================================================
   SECTION 1: カラー設定（★ここを変えてね★）
========================================================== */
:root {

/* ベースカラー：静かな凪の海と、少し褪せたコンクリートのイメージ */
  --bg:          #eef2f5;   /* ページ背景（空を映した水面のような淡いグレーブルー） */
  --surface:     #ffffff;   /* カード背景（光の反射） */
  --surface-alt: #dfe6ed;   /* サブ背景（日陰の防波堤のような落ち着いた青グレー） */
  --border:      #bdcdd9;   /* 罫線（潮風でマットになった手すりの色） */
  --text:        #34495e;   /* 本文（深い海の底の色） */
  --text-muted:  #8da0b0;   /* 補足テキスト（遠くの霧がかった水平線の色） */

  /* アクセントカラー：浮かないように彩度を落とした配色 */
  --accent:      #76a5af;   /* 湊丘の海（少し緑が混ざった、深みのあるくすみブルー） */
  --accent-sub:  #d9a6a1;   /* 桜湊の桜（夕暮れの光が混ざった、灰みのあるオールドローズ） */
  --accent-pale: #f4f7f9;   /* 雲の色（清潔感のあるごく薄いグレー） */

  /* 装飾・角丸（直線を意識して、少し硬派な男子校らしさを出す） */
  --r-card:      4px;       /* 角を少し尖らせて、情緒的な印象に */
  --r-btn:       2px;
  --r-pill:      40px;

  /* アニメーション（水中のような、わずかに重みのある動き） */
  --tr-fast:     0.25s ease-out;
  --tr-base:     0.5s ease-out;

  /* ヘッダー：背景に馴染む透明感 */
  --header-bg:     rgba(238, 242, 245, 0.9);
  --header-border: var(--border);

  /* リンク：海の色に統一 */
  --link:        var(--accent);
  --link-hover:  #5e8a94;

  /* ボタン：落ち着いたくすみブルー */
  --btn-bg:      var(--accent);
  --btn-text:    #ffffff;
  --btn-hover:   #5e8a94;

  /* 掲示板：レス部分はわずかに色味を変えて視認性を確保 */
  --bbs-res-bg:     var(--accent-pale);
  --bbs-res-border: var(--border);

  /* 個人設定：彩度を抑えたサンドイエロー */
  --meibo-sample:   #c2b58b;

  /* ==========================================================
     SECTION 2: サイズ・形状
  ========================================================== */

  --r-sm:   8px;
  --r-md:   16px;
  --r-lg:   28px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 12px rgba(180,100,120,0.07);
  --shadow-md: 0 6px 24px rgba(180,100,120,0.11);

  --max-w:    880px;
  --header-h: 60px;

  /* ==========================================================
     SECTION 3: フォント
  ========================================================== */
  --font: 'Klee One', 'Hiragino Mincho ProN', serif;
  --font-size:   14px;
  --line-height: 1.95;
}


/* ==========================================================
   SECTION 4: リセット・基本
========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family:  var(--font);
  font-size:    var(--font-size);
  line-height:  var(--line-height);
  color:        var(--text);
  background:   var(--bg);
  padding-top:  var(--header-h);
  background-image: radial-gradient(#f2e8d5 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color:           var(--link);
  text-decoration: none;
  transition:      color .2s;
}
a:hover { color: var(--link-hover); }

ul, ol { list-style: none; }


/* ==========================================================
   SECTION 5: アニメーション
========================================================== */

/* ふわっと浮かぶ（花びらのように） */
@keyframes petal-in {
  from { opacity: 0; transform: translateY(14px) rotate(-1deg); }
  to   { opacity: 1; transform: translateY(0)     rotate(0deg); }
}

/* 花びらがゆっくり落ちる */
@keyframes petal-fall {
  0%   { transform: translateY(-10px) rotate(0deg)   translateX(0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 0.8; }
  100% { transform: translateY(120px) rotate(30deg) translateX(16px); opacity: 0; }
}


/* ==========================================================
   SECTION 6: レイアウト共通
========================================================== */

.container {
  max-width: var(--max-w);
  margin:    0 auto;
  padding:   0 24px;
}

.section { padding: 64px 0; }

/* セクションタイトル */
.section-title {
  font-size:      20px;
  font-weight:    600;
  color:          var(--text);
  margin-bottom:  32px;
  text-align:     center;
  letter-spacing: 0.12em;
  position:       relative;
  padding-bottom: 14px;
}
/* タイトル下の桜色ライン */
.section-title::after {
  content:      '';
  position:     absolute;
  bottom:       0; left: 50%;
  transform:    translateX(-50%);
  width:        40px; height: 2px;
  background:   linear-gradient(90deg, var(--accent-sub), var(--accent));
  border-radius: var(--r-pill);
}

/* 縦書き見出しのアクセント */
.text-vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font);
  letter-spacing: 0.3em;
  color: var(--accent-vermilion);
  opacity: 0.6;
}

/* --- ペア名簿用のスタイル --- */
.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.pair-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-image: linear-gradient(135deg, rgba(107,158,107,0.03) 25%, transparent 25%, transparent 50%, rgba(107,158,107,0.03) 50%, rgba(107,158,107,0.03) 75%, transparent 75%, transparent);
  background-size: 20px 20px; /* 霞・市松模様のようなニュアンス */
}

/* ペアの真ん中の「＆」や「×」 */
.pair-relation {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-sub);
  font-family: var(--font);
  background: var(--surface);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  z-index: 2;
}

.pair-chara {
  flex: 1;
  text-align: center;
}

.pair-chara img, .pair-chara-icon {
  width: 60px; height: 60px;
  margin: 0 auto 8px;
  border-radius: 50%; /* ペアは丸アイコンにすると可愛い */
  border: 2px solid var(--accent-pale);
  object-fit: cover;
}

.pair-name { font-size: 13px; font-weight: 600; }
.pair-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; }


/* ==========================================================
   SECTION 7: ヘッダー
========================================================== */

.site-header {
  position:   fixed;
  top: 0; left: 0;
  width:      100%;
  height:     var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--shadow-sm);
  z-index:    1000;
  display:    flex;
  align-items: center;
}

.header-inner {
  width:           100%;
  max-width:       var(--max-w);
  margin:          0 auto;
  padding:         0 24px;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             16px;
}

/* サイト名 */
.site-title {
  font-size:      17px;
  font-weight:    600;
  letter-spacing: 0.10em;
  white-space:    nowrap;
}
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent); }
.sn { color: var(--accent-sub); }

/* PC用ナビ */
.global-nav { display: flex; gap: 2px; }

.global-nav a {
  font-size:      13px;
  font-weight:    600;
  letter-spacing: 0.08em;
  color:          var(--text-muted);
  padding:        6px 16px;
  border-radius:  var(--r-pill);
  transition:     all .2s;
}
.global-nav a:hover,
.global-nav a.active {
  color:      var(--accent);
  background: rgba(107,158,107,0.10);
}

/* ハンバーガー */
.hamburger {
  display:         none;
  flex-direction:  column;
  justify-content: center;
  align-items:     center;
  gap:             5px;
  width:           38px; height: 38px;
  background:      none;
  border:          1px solid var(--border);
  border-radius:   var(--r-sm);
  cursor:          pointer;
  transition:      border-color .2s;
}
.hamburger:hover { border-color: var(--accent); }

.hamburger-line {
  display:    block;
  width:      18px; height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
  transform-origin: center;
}
.hamburger.is-open .hamburger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.is-open .hamburger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ドロワー */
.drawer {
  display:     none;
  position:    fixed;
  top:         var(--header-h); right: 0;
  width:       200px;
  height:      calc(100vh - var(--header-h));
  background:  rgba(253,247,249,0.98);
  border-left: 1px solid var(--border);
  box-shadow:  var(--shadow-md);
  z-index:     999;
  padding:     24px 14px;
  transform:   translateX(100%);
  transition:  transform .3s ease;
}
.drawer.is-open { transform: translateX(0); }

.drawer nav { display: flex; flex-direction: column; gap: 2px; }
.drawer nav a {
  display:       block;
  padding:       9px 14px;
  font-size:     13px;
  font-weight:   600;
  letter-spacing: 0.08em;
  color:         var(--text);
  border-radius: var(--r-sm);
  transition:    background .2s, color .2s;
}
.drawer nav a:hover { color: var(--accent); background: rgba(107,158,107,0.08); }


/* ==========================================================
   SECTION 8: ボタン
========================================================== */

.btn {
  display:        inline-block;
  padding:        9px 26px;
  background:     var(--btn-bg);
  color:          var(--btn-text);
  border:         none;
  border-radius:  var(--r-pill);
  font-size:      13px;
  font-weight:    600;
  letter-spacing: 0.08em;
  cursor:         pointer;
  font-family:    var(--font);
  transition:     background .2s, transform .15s, box-shadow .2s;
  box-shadow:     0 3px 10px rgba(107,158,107,0.25);
}
.btn:hover {
  background:  var(--btn-hover);
  color:       #fff;
  transform:   translateY(-2px);
  box-shadow:  0 5px 14px rgba(107,158,107,0.30);
}
.btn:active { transform: translateY(0); }

/* 桜色ボタン */
.btn-sakura {
  background:  var(--accent-sub);
  box-shadow:  0 3px 10px rgba(232,160,176,0.28);
}
.btn-sakura:hover { background: #d0889a; box-shadow: 0 5px 14px rgba(232,160,176,0.35); }

/* アウトライン */
.btn-outline {
  background:  transparent;
  color:       var(--accent);
  border:      1.5px solid var(--accent);
  box-shadow:  none;
}
.btn-outline:hover { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(107,158,107,0.25); }


/* ==========================================================
   SECTION 9: フォーム共通
========================================================== */

.form-group { margin-bottom: 18px; }

.form-label {
  display:        block;
  font-size:      12px;
  font-weight:    600;
  letter-spacing: 0.08em;
  color:          var(--text-muted);
  margin-bottom:  6px;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
  width:         100%;
  padding:       10px 14px;
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size:     14px;
  font-family:   var(--font);
  color:         var(--text);
  transition:    border-color .2s, box-shadow .2s;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline:      none;
  border-color: var(--accent);
  box-shadow:   0 0 0 3px rgba(107,158,107,0.15);
}

textarea           { resize: vertical; min-height: 120px; }
input[type="file"] { font-size: 13px; color: var(--text-muted); }

input[type="submit"] {
  display:        inline-block;
  padding:        9px 28px;
  background:     var(--btn-bg);
  color:          #fff;
  border:         none;
  border-radius:  var(--r-pill);
  font-size:      13px;
  font-weight:    600;
  letter-spacing: 0.08em;
  cursor:         pointer;
  font-family:    var(--font);
  transition:     background .2s, transform .15s;
  box-shadow:     0 3px 10px rgba(107,158,107,0.25);
}
input[type="submit"]:hover { background: var(--btn-hover); transform: translateY(-1px); }


/* ==========================================================
   SECTION 10: 掲示板 スレッド一覧
========================================================== */

.bbs-list { display: flex; flex-direction: column; gap: 12px; }

.bbs-thread {
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--r-md);
  padding:       16px 20px;
  box-shadow:    var(--shadow-sm);
  position:      relative;
  transition:    transform .2s, box-shadow .2s;
  overflow:      hidden;
}
/* スレッド左の若葉色ライン */
.bbs-thread::before {
  content:  '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width:    3px;
  background: linear-gradient(180deg, var(--accent-sub), var(--accent));
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.bbs-thread:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.bbs-thread-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; padding-left: 2px; }
.bbs-thread-title a { color: var(--text); }
.bbs-thread-title a:hover { color: var(--accent); }

.badge {
  display:        inline-block;
  font-size:      10px;
  font-weight:    600;
  padding:        2px 9px;
  border-radius:  var(--r-pill);
  margin-right:   5px;
  vertical-align: middle;
  letter-spacing: 0.06em;
}
.badge-finished { background: var(--accent-sub); color: #fff; }
.badge-frozen   { background: #a0c4e8;           color: #fff; }

.bbs-thread-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; padding-left: 2px; }
.bbs-thread-res  {
  font-size: 11px; color: var(--text-muted);
  margin-top: 7px; padding-top: 7px;
  border-top: 1px solid var(--border);
  padding-left: 2px;
}

/* ページジャンプ */
.page-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.page-jump a,
.page-jump span {
  display:       inline-block;
  padding:       4px 14px;
  border:        1.5px solid var(--border);
  border-radius: var(--r-pill);
  font-size:     12px;
  font-weight:   600;
  background:    var(--surface);
  color:         var(--text);
  transition:    all .2s;
}
.page-jump a:hover { border-color: var(--accent); color: var(--accent); }
.page-jump span    { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 修正・削除フォーム */
.bbs-editdel {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; padding: 16px 0;
  font-size: 12px; color: var(--text-muted);
}
.bbs-editdel input[type="text"],
.bbs-editdel input[type="password"],
.bbs-editdel select { width: auto; padding: 6px 10px; font-size: 12px; }


/* ==========================================================
   SECTION 11: 掲示板 レス表示
========================================================== */

.res-header {
  padding:       20px 0 16px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 20px;
}
.res-title { font-size: 18px; font-weight: 600; letter-spacing: 0.08em; }

.res-article { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }

.res-icon { flex-shrink: 0; width: 70px; text-align: center; }
.res-icon img {
  width: 66px; height: 86px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  transition: box-shadow .2s;
}
.res-icon img:hover { box-shadow: 0 0 12px rgba(232,160,176,0.40); }

.res-icon-placeholder {
  width: 66px; height: 86px;
  background: var(--surface-alt);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 11px; text-align: center;
}

.res-body { flex: 1; min-width: 0; }

.res-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.res-name { font-weight: 600; font-size: 14px; letter-spacing: 0.04em; }
.res-no   {
  font-size: 10px; color: var(--accent);
  background: rgba(107,158,107,0.12);
  border: 1px solid rgba(107,158,107,0.25);
  padding: 2px 8px; border-radius: var(--r-pill);
  font-weight: 600; letter-spacing: 0.06em;
}
.res-date { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.res-msg  { font-size: 14px; line-height: var(--line-height); word-break: break-all; }

.res-article.is-res {
  background:    var(--bbs-res-bg);
  border-left:   2px solid var(--bbs-res-border);
  padding-left:  18px;
  margin-left:   18px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.frozen-notice {
  text-align: center; padding: 18px; font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-md); margin: 16px 0;
}


/* ==========================================================
   SECTION 12: 掲示板 フォーム
========================================================== */

.bbs-form-wrap { max-width: 620px; margin: 0 auto; padding: 40px 0; }

.bbs-form-title {
  font-size:      19px;
  font-weight:    600;
  letter-spacing: 0.10em;
  color:          var(--text);
  margin-bottom:  24px;
  padding-bottom: 12px;
  border-bottom:  1.5px solid var(--border);
}

.reply-banner {
  background:    var(--surface-alt);
  border:        1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding:       10px 16px;
  font-size:     13px;
  color:         var(--text-muted);
  margin-bottom: 20px;
}

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }


/* ==========================================================
   SECTION 13: 名簿カード
========================================================== */

/* 個別ページ用（詳細レイアウト） */
.meibo-detail {
  display:   flex;
  gap:       32px;
  align-items: flex-start;
  background: var(--surface);
  border:     1.5px solid var(--border);
  border-radius: var(--r-md);
  padding:    32px;
  box-shadow: var(--shadow-sm);
}

.meibo-detail-icon {
  flex-shrink:   0;
  width:         120px;
  text-align:    center;
}
.meibo-detail-icon img {
  width:         120px; height: 156px;
  object-fit:    cover;
  border-radius: var(--r-sm);
  border:        1.5px solid var(--border);
  box-shadow:    var(--shadow-sm);
}
.meibo-detail-icon-placeholder {
  width: 120px; height: 156px;
  background:    var(--surface-alt);
  border:        1.5px dashed var(--border);
  border-radius: var(--r-sm);
  display:       flex; align-items: center; justify-content: center;
  color:         var(--text-muted); font-size: 32px;
}

.meibo-detail-body { flex: 1; min-width: 0; }

.meibo-detail-name {
  font-size:      22px;
  font-weight:    600;
  letter-spacing: 0.10em;
  color:          var(--text);
  margin-bottom:  4px;
}
.meibo-detail-ruby {
  font-size:   13px;
  color:       var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

/* スペック表 */
.meibo-spec {
  width:           100%;
  border-collapse: collapse;
  font-size:       13px;
  margin-bottom:   16px;
}
.meibo-spec th,
.meibo-spec td {
  padding:     8px 12px;
  text-align:  left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.meibo-spec th {
  width:          100px;
  color:          var(--text-muted);
  font-weight:    600;
  letter-spacing: 0.06em;
  white-space:    nowrap;
}
.meibo-spec td { color: var(--text); }

.meibo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.meibo-tag  {
  font-size:     11px;
  font-weight:   600;
  padding:       3px 12px;
  border-radius: var(--r-pill);
  background:    var(--surface-alt);
  color:         var(--accent);
  border:        1px solid var(--border);
  letter-spacing: 0.06em;
}

/* 本文（プロフィール文） */
.meibo-bio {
  font-size:   14px;
  line-height: var(--line-height);
  color:       var(--text);
  margin-top:  16px;
  padding-top: 16px;
  border-top:  1.5px solid var(--border);
}
.meibo-bio p { margin-bottom: 1.2em; }
.meibo-bio p:last-child { margin-bottom: 0; }


/* ==========================================================
   SECTION 14: 日記本文
========================================================== */

/* 2カラムレイアウト（本文＋サイドバー） */
.diary-layout {
  display:   grid;
  grid-template-columns: 1fr 240px;
  gap:       32px;
  align-items: start;
}

.diary-article {
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--r-md);
  overflow:      hidden;
  box-shadow:    var(--shadow-sm);
}

/* 記事ヘッダー */
.diary-head {
  padding:       24px 28px 20px;
  border-bottom: 1.5px solid var(--border);
  background:    var(--surface-alt);
}
.diary-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.diary-cat {
  display:        inline-block;
  font-size:      10px;
  font-weight:    600;
  padding:        3px 11px;
  border-radius:  var(--r-pill);
  letter-spacing: 0.08em;
  background:     rgba(107,158,107,0.12);
  color:          var(--accent);
  border:         1px solid rgba(107,158,107,0.25);
}
.diary-date {
  font-size:   12px;
  color:       var(--text-muted);
  letter-spacing: 0.10em;
}
.diary-h1 {
  font-size:      20px;
  font-weight:    600;
  letter-spacing: 0.08em;
  line-height:    1.55;
  color:          var(--text);
}

/* 本文 */
.diary-body {
  padding:     28px;
  font-size:   14px;
  line-height: var(--line-height);
}
.diary-body p { margin-bottom: 1.5em; }
.diary-body p:last-child { margin-bottom: 0; }
.diary-body h2 {
  font-size:   17px; font-weight: 600;
  margin:      2em 0 0.8em;
  padding-left: 12px;
  border-left:  3px solid var(--accent-sub);
  letter-spacing: 0.06em;
}
.diary-body h3 {
  font-size:   15px; font-weight: 600;
  margin:      1.8em 0 0.6em;
  color:       var(--accent);
  letter-spacing: 0.06em;
}
.diary-body blockquote {
  border-left:   2px solid var(--border);
  padding:       10px 18px;
  margin:        1.5em 0;
  background:    var(--surface-alt);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color:         var(--text-muted);
}
.diary-body a { text-decoration: underline; text-underline-offset: 3px; }
.diary-body img { border-radius: var(--r-sm); margin: 1.5em auto; border: 1.5px solid var(--border); }

/* パンくず */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 20px; flex-wrap: wrap; letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--accent-sub); }

/* 前後ナビ */
.diary-nav {
  display: flex; justify-content: space-between;
  gap: 14px; margin-top: 24px; flex-wrap: wrap;
}
.diary-nav-link {
  display:       flex;
  align-items:   center;
  gap:           8px;
  padding:       10px 16px;
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size:     12px;
  font-weight:   600;
  color:         var(--text);
  transition:    all .2s;
  flex:          1;
  max-width:     46%;
  letter-spacing: 0.04em;
}
.diary-nav-link:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-sm); }
.diary-nav-link.is-next { justify-content: flex-end; margin-left: auto; }
.nav-arrow { color: var(--accent-sub); flex-shrink: 0; }
.nav-sub   { font-size: 10px; color: var(--text-muted); letter-spacing: 0.08em; }

/* サイドバー */
.sidebar {
  display:  flex;
  flex-direction: column;
  gap:      16px;
  position: sticky;
  top:      calc(var(--header-h) + 20px);
}
.sidebar-widget {
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--r-md);
  padding:       18px;
  box-shadow:    var(--shadow-sm);
}
.sidebar-title {
  font-size:      12px;
  font-weight:    600;
  letter-spacing: 0.12em;
  color:          var(--accent);
  margin-bottom:  12px;
  padding-bottom: 8px;
  border-bottom:  1px solid var(--border);
}
.sidebar-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-list li a {
  display:    block;
  padding:    6px 8px;
  font-size:  13px;
  color:      var(--text);
  border-radius: var(--r-sm);
  transition: background .2s, color .2s;
  letter-spacing: 0.02em;
}
.sidebar-list li a:hover { color: var(--accent); background: rgba(107,158,107,0.08); }


/* ==========================================================
   SECTION 15: フッター
========================================================== */

.site-footer {
  margin-top:  64px;
  padding:     24px 0;
  text-align:  center;
  font-size:   12px;
  color:       var(--text-muted);
  background:  var(--surface);
  border-top:  1.5px solid var(--border);
  letter-spacing: 0.06em;
}


/* ==========================================================
   SECTION 16: レスポンシブ（768px以下）
========================================================== */

@media (max-width: 768px) {
  .hamburger  { display: flex; }
  .global-nav { display: none; }
  .drawer     { display: block; }

  .section { padding: 48px 0; }

  .btn,
  input[type="submit"] { display: block; width: 100%; text-align: center; }

  .bbs-editdel { flex-direction: column; align-items: flex-start; }
  .bbs-editdel input[type="text"],
  .bbs-editdel input[type="password"],
  .bbs-editdel select { width: 100%; }

  .form-actions { flex-direction: column; }

  /* 名簿 */
  .meibo-detail { flex-direction: column; padding: 20px; gap: 20px; }
  .meibo-detail-icon { width: 100%; text-align: center; }

  /* 日記 */
  .diary-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .diary-head { padding: 18px 20px; }
  .diary-body { padding: 20px; }
  .diary-nav-link { max-width: 100%; }

  /* レス */
  .res-article.is-res { margin-left: 8px; padding-left: 10px; }
}
/* ==========================================================
   SECTION X-1: 規約リスト
========================================================== */
 
.rules-list {
  list-style: none;
  display:    flex;
  flex-direction: column;
  gap:        16px;
  counter-reset: none; /* 独自番号を使うので不要 */
}
 
.rules-list li {
  display:       flex;
  gap:           16px;
  align-items:   flex-start;
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--r-md);
  padding:       20px 24px;
}
 
/* 番号バッジ */
.rules-num {
  flex-shrink:   0;
  font-size:     11px;
  font-weight:   600;
  letter-spacing: 0.08em;
  color:         var(--surface);
  background:    var(--accent-sub);
  width:         34px; height: 34px;
  border-radius: 50%;
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin-top:    2px;
}
 
.rules-body {
  flex:        1;
  font-size:   14px;
  line-height: var(--line-height);
  color:       var(--text);
}
.rules-body strong {
  display:      block;
  font-weight:  600;
  color:        var(--text);
  letter-spacing: 0.04em;
}
 
/* 規約下の参加CTA */
.entry-cta {
  margin-top:  40px;
  text-align:  center;
  display:     flex;
  flex-direction: column;
  align-items: center;
  gap:         16px;
}
.entry-cta p {
  font-size:   13px;
  color:       var(--text-muted);
}
 
 
/* ==========================================================
   SECTION X-2: 参加フォーム（entry-form.html 用）
========================================================== */
 
/* フォーム注意書きボックス */
.entry-notice {
  background:    var(--surface-alt);
  border:        1.5px solid var(--border);
  border-radius: var(--r-md);
  padding:       18px 24px;
  margin-bottom: 32px;
  font-size:     13px;
  line-height:   var(--line-height);
  color:         var(--text);
}
.entry-notice a {
  color:           var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
 
/* 送信完了メッセージ */
.entry-thanks {
  background:    var(--surface);
  border:        2px solid var(--accent);
  border-radius: var(--r-md);
  padding:       32px 28px;
  text-align:    center;
  font-size:     14px;
  line-height:   var(--line-height);
  color:         var(--text);
  box-shadow:    var(--shadow-sm);
}
.entry-thanks p { margin-bottom: 0.5em; }
.entry-thanks p:last-child { margin-bottom: 0; }
 
/* フォーム全体 */
.entry-form {
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--r-md);
  padding:       32px;
  box-shadow:    var(--shadow-sm);
  display:       flex;
  flex-direction: column;
  gap:           24px;
}
 
/* フォームグループ */
.form-group {
  display:       flex;
  flex-direction: column;
  gap:           6px;
}
 
/* ラベル */
.form-label {
  font-size:     13px;
  font-weight:   600;
  color:         var(--text);
  letter-spacing: 0.04em;
  display:       flex;
  align-items:   center;
  gap:           6px;
  flex-wrap:     wrap;
}
 
/* 必須・任意バッジ */
.form-required {
  font-size:     10px;
  font-weight:   600;
  padding:       2px 8px;
  border-radius: var(--r-pill);
  background:    var(--accent-sub);
  color:         var(--surface);
  letter-spacing: 0.06em;
}
.form-optional {
  font-size:     10px;
  font-weight:   600;
  padding:       2px 8px;
  border-radius: var(--r-pill);
  background:    var(--surface-alt);
  color:         var(--text-muted);
  letter-spacing: 0.06em;
}
 
/* テキスト入力・セレクト共通 */
.form-input,
.form-select,
.form-textarea {
  font-family:   var(--font);
  font-size:     14px;
  color:         var(--text);
  background:    var(--bg);
  border:        1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding:       10px 14px;
  width:         100%;
  transition:    border-color .2s, box-shadow .2s;
  appearance:    none;
  -webkit-appearance: none;
  line-height:   var(--line-height);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline:      none;
  border-color: var(--accent);
  box-shadow:   0 0 0 3px rgba(107,158,107,0.14);
}
 
/* セレクト（▼矢印） */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a88a90' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat:   no-repeat;
  background-position: right 14px center;
  padding-right:       36px;
  cursor:              pointer;
}
 
/* テキストエリア */
.form-textarea { resize: vertical; min-height: 100px; }
 
/* 補足テキスト */
.form-note {
  font-size:  11px;
  color:      var(--text-muted);
  margin-top: 2px;
}
 
/* ラジオ・チェックボックスグループ */
.form-radio-group,
.form-check-group {
  display:   flex;
  flex-wrap: wrap;
  gap:       10px;
  margin-top: 4px;
}
 
.form-radio-label,
.form-check-label {
  display:       flex;
  align-items:   center;
  gap:           6px;
  font-size:     13px;
  color:         var(--text);
  cursor:        pointer;
  padding:       7px 14px;
  border:        1.5px solid var(--border);
  border-radius: var(--r-pill);
  background:    var(--surface);
  transition:    border-color .2s, background .2s;
}
.form-radio-label:hover,
.form-check-label:hover {
  border-color: var(--accent);
  background:   rgba(107,158,107,0.06);
}
.form-radio-label input,
.form-check-label input { accent-color: var(--accent); }
 
/* 規約同意行 */
.form-agree {
  border-color: var(--accent-pale);
  background:   var(--surface-alt);
}
.form-agree a {
  color:           var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
 
/* 送信ボタン */
.form-actions {
  display:         flex;
  justify-content: center;
  margin-top:      8px;
}
 
/* レスポンシブ */
@media (max-width: 768px) {
  .rules-list li { flex-direction: row; padding: 16px 18px; }
  .entry-form    { padding: 20px; }
  .form-radio-group,
  .form-check-group { flex-direction: column; }
  .form-radio-label,
  .form-check-label { width: 100%; }
}