/* ===========================================================================
   みんなの掲示板（.bbs-ref / .bbsr-*）

   ▲ **5画面すべてで同じ1本を使う。** 中身は `private/forum/ref.php` で、
      `summit/forum/ref.php` `speaking-summit/forum/ref.php` `mypage/forum/ref.php`
      `myessay/forum/ref.php` はどれもそれを include しているだけ。
      さらに **private のダッシュボード（`/private/`）にもカードとして載る。**

   ▲ **だからここは `css/member/` に置く。**
      2026-09-06 にいちど `private/css/page.css` へ移したが、
      ダッシュボードは `page.css` を読まない（local / summary / dashboard の3本だけ）ため、
      **掲示板のカードが素の見た目になった。** 読み込みは
      `css/includes/member-css.php` の1か所で全画面に届く。
   =========================================================================== */

/* 本文中の URL（pb_linkify）。別タブで開く */
.pb-inline-link { color: var(--ui-action); text-decoration: underline; word-break: break-all; }
.pb-inline-link:hover { color: var(--ui-ink-head); }

.bbs-ref { }

.bbsr-new-panel {
  background: var(--ui-surface-head); border-bottom: 1px solid var(--ui-line); padding: 14px 16px;
}
.bbsr-intro {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--ui-action-bg); border: 1px solid var(--ui-line-strong); border-radius: var(--ui-r-ctl);
  padding: 10px 12px; font-size: var(--ui-fs-meta); color: var(--ui-ink-head); line-height: 1.6;
  margin-bottom: 14px;
}
.bbsr-teacher-check-label {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: var(--ui-r-ctl); font-size: var(--ui-fs-meta); font-weight: 600;
  border: 1.5px solid var(--ui-line-strong); background: var(--ui-surface); color: var(--ui-ink-head);
  cursor: pointer; transition: all .15s; user-select: none;
}
.bbsr-teacher-check-label input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--ui-action);
}
.bbsr-teacher-check-label:has(input:checked) {
  border-color: var(--ui-action); background: var(--ui-action-bg); color: var(--ui-action);
}
.bbsr-submit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ui-ink-head); color: var(--ui-surface); border: none; border-radius: var(--ui-r-ctl);
  padding: 9px 24px; font-size: var(--ui-fs-body); font-weight: 700; cursor: pointer;
  transition: opacity .18s;
}
.bbsr-submit-btn:hover { opacity: .85; }
.bbsr-submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.bbsr-form-label {
  font-size: var(--ui-fs-body); font-weight: 700; color: var(--ui-ink-head);
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.bbsr-word-count { font-size: var(--ui-fs-meta); color: var(--ui-ink-muted); }
/* 入力欄は .mui-input / .mui-textarea（css/member/ui.css）。2026-10-08 に form-control から寄せた */

.bbsr-threads { display: flex; flex-direction: column; }
.bbsr-empty { font-size: var(--ui-fs-body); color: var(--ui-ink-muted); padding: 4px 0; margin: 0; }

/* ▲ **投稿を1件ずつ囲わない**（2026-09-06・Step 4・ユーザー指摘）。
   器の中でカードがもう一度 面＋罫＋角丸 を持つと二重枠になる。罫で区切る。 */
.bbsr-card {
  background: none; border: none; border-bottom: 1px solid var(--ui-line); border-radius: 0;
  padding: 12px 2px 10px;
}
.bbsr-card:last-child { border-bottom: none; padding-bottom: 2px; }
.bbsr-card--unread { background: var(--ui-action-bg); padding-left: 10px; padding-right: 10px; }

.bbsr-title-line {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px;
}
.bbsr-title { font-size: var(--ui-fs-card); font-weight: 700; color: var(--ui-ink-head); flex: 1; min-width: 0; }
.bbsr-teacher-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: var(--ui-r-ctl); font-size: var(--ui-fs-micro); font-weight: 700;
  background: var(--ui-action-bg); color: var(--ui-action); border: 1px solid var(--ui-material-line); white-space: nowrap; flex-shrink: 0;
}
.bbsr-new-badge {
  display: inline-block; background: var(--ui-ink-head); color: var(--ui-surface);
  font-size: var(--ui-fs-micro); font-weight: 800; padding: 1px 7px; border-radius: var(--ui-r-ctl);
  animation: bbsr-pulse 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes bbsr-pulse { 0%,100% { opacity:1; } 50% { opacity:.6; } }

.bbsr-delete-btn {
  background: none; border: none; padding: 2px 5px;
  color: var(--ui-line); font-size: var(--ui-fs-meta); cursor: pointer; border-radius: var(--ui-r-ctl);
  transition: color .15s; flex-shrink: 0;
}
.bbsr-delete-btn:hover { color: var(--ui-danger-ink); }

.bbsr-title { font-size: var(--ui-fs-body); font-weight: 700; color: var(--ui-ink-head); line-height: 1.4; margin-bottom: 2px; }
.bbsr-meta  { font-size: var(--ui-fs-meta); color: var(--ui-ink-muted); margin-bottom: 4px; }

.bbsr-body-outer {
  /* ▲ **outer にも font-size を置く**（2026-09-06）。em は継承した 16px で
     計算されるので、中の 14px の行の整数倍にならず4行目が半分見えていた。 */
  font-size: var(--ui-fs-body);
  position: relative; overflow: hidden; max-height: 4.8em; line-height: 1.6;
}
.bbsr-body-outer.expanded { max-height: none; }
.bbsr-body-text { font-size: var(--ui-fs-body); color: var(--ui-ink); line-height: 1.6; }
.bbsr-body-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1.6em; background: linear-gradient(transparent, var(--ui-surface));
  pointer-events: none;
}
.bbsr-card--unread .bbsr-body-fade { background: linear-gradient(transparent, var(--ui-action-bg)); }
.bbsr-body-outer.expanded .bbsr-body-fade { display: none; }
.bbsr-expand-btn {
  background: none; border: none; color: var(--ui-ink-head);
  font-size: var(--ui-fs-meta); font-weight: 600; padding: 2px 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: 3px; margin-top: 1px;
}
.bbsr-expand-btn i { transition: transform .3s; }
.bbsr-expand-btn.expanded i { transform: rotate(180deg); }

.bbsr-action-bar {
  display: flex; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--ui-surface-sunken);
}
.bbsr-comment-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 4px 10px; border-radius: var(--ui-r-ctl);
  font-size: var(--ui-fs-body); color: var(--ui-ink-muted); cursor: pointer;
  transition: color .18s, background .18s;
}
.bbsr-comment-toggle i { font-size: var(--ui-fs-card); }
.bbsr-comment-toggle:hover { color: var(--ui-ink-head); background: rgba(4,63,109,0.07); }

/* いいね（2026-09-20）。コメントの器と同じ形にそろえている。
   🔴 **押せているかどうかはハートの塗りで示す。器は塗らない・枠も付けない**
   （`css/member/board.css` のいいねと同じ判断。`liked` のとき markup が
   `fa-solid fa-heart` に変わり、Font Awesome Free の塗りのハートが出る。
   自作アイコンセットは `fa-heart` を持たない ── 持たせると solid と regular の
   区別ごと消えて、色しか変わらなくなる）。 */
.bbsr-like-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 4px 10px; border-radius: var(--ui-r-ctl);
  font-size: var(--ui-fs-body); color: var(--ui-ink-muted); cursor: pointer;
  transition: color .18s, background .18s;
}
.bbsr-like-btn i { font-size: var(--ui-fs-card); }
.bbsr-like-btn:hover { color: var(--ui-action); background: rgba(4,63,109,0.07); }
.bbsr-like-btn.liked { color: var(--ui-action); }
.bbsr-like-btn:disabled { cursor: default; opacity: .6; }

.bbsr-unread-pip {
  display: inline-block; background: var(--ui-ink-head); color: var(--ui-surface);
  font-size: var(--ui-fs-micro); font-weight: 800; padding: 1px 6px; border-radius: var(--ui-r-ctl);
}

.bbsr-divider { height: 1px; background: var(--ui-line); margin: 8px 0; }
.bbsr-comment-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.bbsr-comment-item { padding: 7px 10px; background: var(--ui-surface-sunken); border-radius: var(--ui-r-ctl); }
.bbsr-comment-head {
  display: flex; align-items: center; gap: 5px; margin-bottom: 3px; flex-wrap: wrap;
}
.bbsr-commenter { font-size: var(--ui-fs-meta); font-weight: 700; color: var(--ui-ink-head); }
.bbsr-comment-dt { font-size: var(--ui-fs-micro); color: var(--ui-ink-muted); }
.bbsr-comment-body { font-size: var(--ui-fs-body); color: var(--ui-ink); line-height: 1.6; }
.bbsr-no-comment { text-align: center; color: var(--ui-ink-muted); font-size: var(--ui-fs-meta); padding: 6px; margin: 0; }

.bbsr-comment-textarea { font-size: var(--ui-fs-body); }
.bbsr-comment-submit-btn {
  background: var(--ui-ink-head); color: var(--ui-surface); border: none;
  padding: 5px 16px; border-radius: var(--ui-r-ctl); font-size: var(--ui-fs-meta); font-weight: 600;
  cursor: pointer; transition: opacity .18s;
}
.bbsr-comment-submit-btn:hover { opacity: .85; }
.bbsr-comment-submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.bbsr-more-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; border: none; background: var(--ui-surface-sunken); color: var(--ui-ink-muted);
  font-size: var(--ui-fs-meta); font-weight: 600; padding: 8px; cursor: pointer;
  border-top: 1px solid var(--ui-line); transition: background .15s, color .15s;
}
.bbsr-more-toggle:hover { background: var(--ui-line); color: var(--ui-ink-head); }
.bbsr-more-icon { transition: transform .25s; }
.bbsr-more-toggle:not(.collapsed) .bbsr-more-icon { transform: rotate(180deg); }
.bbsr-more-toggle.collapsed .bbsr-more-hide { display: none; }
.bbsr-more-toggle:not(.collapsed) .bbsr-more-show { display: none; }



/* コメントのいいね（2026-09-20）。投稿のものより一回り小さく、右端に寄せる */
.bbsr-comment-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.bbsr-like-btn--comment {
  padding: 2px 8px;
  font-size: var(--ui-fs-meta);
  color: var(--ui-line-strong);
}
.bbsr-like-btn--comment i { font-size: var(--ui-fs-body); }
