/*
  トップページ・共通レイアウト（index2）
  - 読込: views/_share/stylesheets.ejs（全ログイン画面の基盤）
  - 教室別カラートークン・BBS カード・振替表ローディング・会員サマリ・LINE トップカード
  - Socket.io 振替表更新時も本 CSS の .lesson-loading-bar 等を参照
*/

/* ============================================================
   教室別カラー（校舎カラー）トークン — 単一の正
   data属性方式（data-bbs-school-id / data-school-id）は維持。
   各教室 1 定義に集約し、BBSヘッダー(A群)・会員サマリ表(C群)から参照する。
   ※@supports フォールバック(B群)はレガシー専用かつ rgba 背景の独自alphaのため
     背景の hex トークン化は不可。文字色/左罫線は -text/-bg トークンに統一済み。
   -bg  : 濃色ベタ背景（BBSカードヘッダー・会員サマリ表）用。-fg は -bg 上の文字色。
   -text: 淡色背景（全教室BBS=all-school-bbs-header）上の濃色文字。AA(4.5:1)以上。
   ============================================================ */
/* CSS 変数トークン（教室色・input-group 幅等の単一の正） */
:root {
  --school-1-bg: #607d8b;    --school-1-fg: #fff;      --school-1-text: #37474f;    /* 総務 */
  --school-101-bg: #ffb6c1;  --school-101-fg: #212529; --school-101-text: #212529;  /* 桑名 */
  --school-102-bg: #e53935;  --school-102-fg: #fff;    --school-102-text: #a01212;  /* 四日市（AA確保のため#b71c1cより濃く） */
  --school-103-bg: #1565c0;  --school-103-fg: #fff;    --school-103-text: #0d47a1;  /* 鈴鹿 */
  --school-104-bg: #fb8c00;  --school-104-fg: #212529; --school-104-text: #212529;  /* 伊賀 */
  --school-105-bg: #7b1fa2;  --school-105-fg: #fff;    --school-105-text: #4a148c;  /* 津 */
  --school-106-bg: #2e7d32;  --school-106-fg: #fff;    --school-106-text: #1b5e20;  /* 松阪 */
  --school-107-bg: #0288d1;  --school-107-fg: #fff;    --school-107-text: #01579b;  /* 伊勢 */
  --school-401-bg: #fdd835;  --school-401-fg: #212529; --school-401-text: #212529;  /* トランポリン・福祉 */
  --school-501-bg: #e91e63;  --school-501-fg: #fff;    --school-501-text: #880e4f;  /* ダンス */
  --school-2-bg: #00695c;    --school-2-fg: #fff;      --school-2-text: #004d40;    /* 高校生 */
  --school-1000-bg: #8b0000; --school-1000-fg: #fff;   --school-1000-text: #8b0000; /* 全体 */

  /* Domain: 朝礼スピーチ */
  --chourei-accent:        #f2a83c; /* 面（カードヘッダー・見出し帯） */
  --chourei-accent-fg:     #212529; /* 面の上の文字（対 #f2a83c = 8.2:1 AAA） */
  --chourei-accent-strong: #9a5b00; /* 明るい地の上のテキスト/アイコン/リンク */
  --chourei-accent-weak:   #fdf1de; /* 本日セル・選択行の背景 */
  --chourei-accent-border: #e0912a; /* 罫線・左アクセント線 */

  /* 汎用カラートークン（chourei.css / calender.css 等。DESIGN.md 準拠） */
  --color-bg: #f4f4f5;
  --color-surface: #fffafa; /* = --card-body-bg */
  --color-text: #201f37; /* body 既定と一致 */
  --color-text-muted: #6c757d;
  --color-border: #dee2e6;

  /*
    カード意匠（トップ画面のカードが基準・本システムの標準）
    他画面のCSSからも参照する。値を直書きせずここを唯一の正とする
  */
  --card-header-bg: #585769;
  --card-header-fg: #f4f4f6;
  --card-header-shadow: 1px 1px 2px 0px rgba(0, 0, 0, 0.4),
    inset 0px -3px 6px -2px rgba(187, 187, 187, 0.3);
  --card-body-bg: #fffafa;
  --card-body-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.2),
    inset 0px -3px 6px -2px rgba(0, 0, 0, 0.3);
}

/* ページ全体・グローバルヘッダーの基調 */
body {
  background-color: #f4f4f5;
  color: #201f37;
}

/* ページ全体・グローバルヘッダーの基調 */
header {
  height: 60px;
  background-color: #060074;
}

/* アイコン画像のスタイル */
.sideber-icon {
  width: 100px;
  border-radius: 20%;
  /* 丸くする */
  overflow: hidden;
  /* はみ出た画像を隠す */
  box-shadow: 0 0 3px #000;
  /* 影をつける */
}

.sideber-icon.bbs-user-photo--logo {
  width: 100px;
  height: 100px;
}

.sideber-icon.bbs-user-photo--person {
  width: 100px;
  height: 100px;
  font-size: 48px;
  border-radius: 20%;
}

/* アイコン・操作ボタン */
.mini-icon {
  border-radius: 20%;
  /* 丸くする */
  overflow: hidden;
  /* はみ出た画像を隠す */
  box-shadow: 0 0 3px #000;
  /* 影をつける */
  width: 50px;
}

/* アイコン・操作ボタン */
.minimini-icon {
  border-radius: 20%;
  /* 丸くする */
  overflow: hidden;
  /* はみ出た画像を隠す */
  box-shadow: 0 0 3px #000;
  /* 影をつける */
  width: 30px;
}

/* 掲示板投稿・コメント表示 */
.bbs-user-photo--logo {
  object-fit: contain;
  background-color: #060074;
  padding: 4px;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
}

/* 掲示板投稿・コメント表示 */
.mini-icon.bbs-user-photo--logo {
  width: 50px;
  height: 50px;
}

/* 掲示板投稿・コメント表示 */
.minimini-icon.bbs-user-photo--logo {
  width: 30px;
  height: 30px;
}

/* 写真なし（管理者以外）の人物アイコン表示 */
.bbs-user-photo--person {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ececf0;
  color: #595959;
  aspect-ratio: 1 / 1;
}

.mini-icon.bbs-user-photo--person {
  width: 50px;
  height: 50px;
  font-size: 28px;
}

.minimini-icon.bbs-user-photo--person {
  width: 30px;
  height: 30px;
  font-size: 18px;
}

/* fuchidori-bk のレイアウト・表示スタイル */
.fuchidori-bk {
  text-shadow: 0.5px 0.5px 0 #303030, -0.5px -0.5px 0 #303030,
    -0.5px 0.5px 0 #303030, 0.5px -0.5px 0 #303030, 0px 0.5px 0 #303030,
    0 -0.5px 0 #303030, -0.5px 0 0 #303030, 0.5px 0 0 #303030;
}

/* 検索・フィルタ UI */
.search-wrap {
  background-color: #fdfdfd;
  border-radius: 3px;
}

/* a のスタイル定義 */
a {
  text-decoration: none;
}

/* ホバー・フォーカス時の視覚フィードバック */
a:hover {
  text-decoration: underline;
}

/* 会員性別の文字色（一覧・振替表） */
.men {
  color: rgb(75, 75, 238);
}

/* ホバー・フォーカス時の視覚フィードバック */
.men:hover {
  color: rgb(160, 160, 252);
}

/* 会員性別の文字色（一覧・振替表） */
.women {
  color: rgb(224, 44, 80);
}

/* ホバー・フォーカス時の視覚フィードバック */
.women:hover {
  color: rgb(221, 114, 135);
}

/* 休み・欠席会員の表示色 */
.rest {
  color: rgba(112, 117, 114, 0.542);
}

/* エラーメッセージの強調表示 */
.err-text {
  color: red;
  font-weight: bold;
}

/* スクロールバーの全体的なスタイルを変更 */

::-webkit-scrollbar {
  width: 5px;
  height: 8px;
}

/* スクロールバーのスライダー（つまみ）のスタイルを変更 */

::-webkit-scrollbar-thumb {
  background-color: #060074;
  box-shadow: inset 0 0 0 1px #060074;
  opacity: 0;
  border-radius: 5px;
}

/* スクロールバーのトラックのスタイルを変更 */

::-webkit-scrollbar-track {
  background-color: #dddddd00;
}

/* トップページカードスタイル */
.top-card {
  border-radius: 5px 5px 10px 10px;
  max-height: 650px;
}

/* 折り畳み時はヘッダー分の高さのみ */
.top-card.top-card--collapsed {
  max-height: none;
  height: auto;
}

/* PC3行目：BBS・事業計画・LINE 等（高さ固定・本文スクロール） */
.top-card.top-card--feed {
  height: 650px;
  max-height: 650px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ダッシュボードカードのヘッダー・枠 */
.top-card.top-card--feed > .card-header {
  flex-shrink: 0;
}

/* ダッシュボードカードのヘッダー・枠 */
.top-card.top-card--feed > .card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* カードの丸み */
.card {
  border-radius: 5px 5px 10px 10px;
}

/* トップカードのカードボディーのみ */
.top-card > .card-body {
  background-color: var(--card-body-bg);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--card-body-shadow);
  overflow: scroll;
}

/* カードボディーの丸み */
.card-body {
  border-radius: 0 0 10px 10px;
}

/* トップカードのカードヘッダー */
.top-card > .card-header {
  background-color: var(--card-header-bg);
  border-radius: 5px 5px 0 0;
  box-shadow: var(--card-header-shadow);
  z-index: 1001;
  color: var(--card-header-fg);
}

/* カードヘッダーの丸み */
.card-header {
  border-radius: 5px 5px 0 0;
}

/* 全体BBS：過去12時間の投稿件数チップ */
.all-bbs-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background-color: rgba(220, 53, 69, 0.92);
  color: #fff;
  font-size: 0.7em;
  line-height: 1.2;
  white-space: nowrap;
}

/* 掲示板投稿・コメント表示 */
.all-bbs-recent-chip__period {
  opacity: 0.95;
}

/* 掲示板投稿・コメント表示 */
.all-bbs-recent-chip__count {
  font-weight: 700;
  font-size: 1.05em;
}

/* 掲示板投稿・コメント表示 */
.all-bbs-recent-chip__suffix {
  opacity: 0.95;
}

/* 全教室BBS：教室名ヘッダー（色は data-bbs-school-id で個別指定） */
.all-school-bbs-header {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  margin: 0.5rem 0 0.35rem;
  border-radius: 4px;
  border-left: 4px solid transparent;
}

/* 曜日・列位置に応じた配色（業務カレンダー慣習） */
.all-school-bbs-header:first-child {
  margin-top: 0;
}

/* BBSカード／教室名ヘッダー：教室別カラー */
.bbs-card-header[data-bbs-school-id="1"],
.all-school-bbs-header[data-bbs-school-id="1"] {
  --bbs-header-bg: var(--school-1-bg);
  --bbs-header-fg: var(--school-1-fg);
  --bbs-header-text: var(--school-1-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="101"],
.all-school-bbs-header[data-bbs-school-id="101"] {
  --bbs-header-bg: var(--school-101-bg);
  --bbs-header-fg: var(--school-101-fg);
  --bbs-header-text: var(--school-101-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="102"],
.all-school-bbs-header[data-bbs-school-id="102"] {
  --bbs-header-bg: var(--school-102-bg);
  --bbs-header-fg: var(--school-102-fg);
  --bbs-header-text: var(--school-102-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="103"],
.all-school-bbs-header[data-bbs-school-id="103"] {
  --bbs-header-bg: var(--school-103-bg);
  --bbs-header-fg: var(--school-103-fg);
  --bbs-header-text: var(--school-103-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="104"],
.all-school-bbs-header[data-bbs-school-id="104"] {
  --bbs-header-bg: var(--school-104-bg);
  --bbs-header-fg: var(--school-104-fg);
  --bbs-header-text: var(--school-104-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="105"],
.all-school-bbs-header[data-bbs-school-id="105"] {
  --bbs-header-bg: var(--school-105-bg);
  --bbs-header-fg: var(--school-105-fg);
  --bbs-header-text: var(--school-105-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="106"],
.all-school-bbs-header[data-bbs-school-id="106"] {
  --bbs-header-bg: var(--school-106-bg);
  --bbs-header-fg: var(--school-106-fg);
  --bbs-header-text: var(--school-106-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="107"],
.all-school-bbs-header[data-bbs-school-id="107"] {
  --bbs-header-bg: var(--school-107-bg);
  --bbs-header-fg: var(--school-107-fg);
  --bbs-header-text: var(--school-107-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="401"],
.all-school-bbs-header[data-bbs-school-id="401"] {
  --bbs-header-bg: var(--school-401-bg);
  --bbs-header-fg: var(--school-401-fg);
  --bbs-header-text: var(--school-401-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="501"],
.all-school-bbs-header[data-bbs-school-id="501"] {
  --bbs-header-bg: var(--school-501-bg);
  --bbs-header-fg: var(--school-501-fg);
  --bbs-header-text: var(--school-501-text);
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.bbs-card-header[data-bbs-school-id="1000"],
.all-school-bbs-header[data-bbs-school-id="1000"] {
  --bbs-header-bg: var(--school-1000-bg);
  --bbs-header-fg: var(--school-1000-fg);
  --bbs-header-text: var(--school-1000-text);
}

/* 掲示板投稿・コメント表示 */
.top-card > .card-header.bbs-card-header[data-bbs-school-id] {
  background-color: var(--bbs-header-bg);
  color: var(--bbs-header-fg);
}

/* 掲示板投稿・コメント表示 */
.top-card > .card-header.bbs-card-header[data-bbs-school-id] .day-link {
  color: var(--bbs-header-fg);
}

/* ホバー・フォーカス時の視覚フィードバック */
.top-card > .card-header.bbs-card-header[data-bbs-school-id] .day-link:hover {
  opacity: 0.85;
}

/* 掲示板投稿・コメント表示 */
.top-card > .card-header.bbs-card-header--all {
  background-color: #8b0000;
  color: #fff;
}

/* 事業計画カードヘッダー（共通ナビ #060074 と同色） */
.top-card > .card-header.bbs-card-header--plan {
  background-color: #060074;
  color: #fff;
}

/* 掲示板投稿・コメント表示 */
.top-card > .card-header.bbs-card-header--all-schools {
  background-color: #455a64;
  color: #fff;
}

/* 掲示板投稿・コメント表示 */
.top-card > .card-header.bbs-card-header--line {
  background-color: #06c755;
  color: #fff;
}

/* ケガ事故報告カードヘッダー（旧UIの紫帯に寄せる） */
.top-card > .card-header.bbs-card-header--troubles {
  background-color: #6f42c1;
  color: #fff;
}

.top-card > .card-header.bbs-card-header--troubles .day-link {
  color: #fff;
}

/* 朝礼スピーチカードヘッダー */
.top-card > .card-header.bbs-card-header--chourei {
  background-color: var(--chourei-accent);
  color: var(--chourei-accent-fg);
}

/* ケガ事故報告トップフィード */
.troubles-index-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.troubles-index-item {
  border-bottom: 1px solid #d0d0d0;
  padding: 0.65rem 0.25rem;
}

.troubles-index-item:last-child {
  border-bottom: none;
}

.troubles-index-item__title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.troubles-index-item__title-link {
  color: #0d47a1;
  text-decoration: none;
}

.troubles-index-item__title-link:hover {
  text-decoration: underline;
}

.troubles-index-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.75rem;
  color: #555;
  margin-bottom: 0.15rem;
}

.troubles-index-item__school {
  color: #6f42c1;
}

.troubles-index-item__coach {
  font-size: 0.78rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.troubles-index-item__body {
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.troubles-index-item__file a {
  font-size: 0.75rem;
}

.troubles-index-empty {
  padding: 1rem 0.25rem;
  text-align: center;
  color: #777;
  font-size: 0.85rem;
}

/* 教室別 BBS カードヘッダー（校舎トークン参照） */
.top-card > .card-header.bbs-card-header--all .day-link,
.top-card > .card-header.bbs-card-header--plan .day-link,
.top-card > .card-header.bbs-card-header--all-schools .day-link,
.top-card > .card-header.bbs-card-header--line .day-link {
  color: #fff;
}

.top-card > .card-header.bbs-card-header--chourei .day-link {
  color: var(--chourei-accent-fg);
}

/* 掲示板投稿・コメント表示 */
.all-school-bbs-header[data-bbs-school-id] {
  color: var(--bbs-header-text);
  background-color: color-mix(in srgb, var(--bbs-header-bg) 28%, #fffafa);
  border-left-color: var(--bbs-header-bg);
}

/* @supports not (background-color: color-mix(in srgb のスタイル定義 */
@supports not (background-color: color-mix(in srgb, red 28%, white)) {
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="101"] { background-color: rgba(255, 182, 193, 0.45); }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="102"] { background-color: rgba(229, 57, 53, 0.2); color: #a01212; border-left-color: #e53935; }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="103"] { background-color: rgba(21, 101, 192, 0.18); color: #0d47a1; border-left-color: #1565c0; }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="104"] { background-color: rgba(251, 140, 0, 0.25); }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="105"] { background-color: rgba(123, 31, 162, 0.18); color: #4a148c; border-left-color: #7b1fa2; }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="106"] { background-color: rgba(46, 125, 50, 0.18); color: #1b5e20; border-left-color: #2e7d32; }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="107"] { background-color: rgba(2, 136, 209, 0.18); color: #01579b; border-left-color: #0288d1; }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="401"] { background-color: rgba(253, 216, 53, 0.45); }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="501"] { background-color: rgba(233, 30, 99, 0.18); color: #880e4f; border-left-color: #e91e63; }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="1"] { background-color: rgba(96, 125, 139, 0.2); color: #37474f; border-left-color: #607d8b; }
  /* 掲示板投稿・コメント表示 */
  .all-school-bbs-header[data-bbs-school-id="1000"] { background-color: rgba(139, 0, 0, 0.15); color: #8b0000; border-left-color: #8b0000; }
}

/* col-2-5 のレイアウト・表示スタイル */
.col-2-5 {
  flex: 0 0 auto;
  width: 20%;
}

/* school-row のレイアウト・表示スタイル */
.school-row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  display: flex;
  flex-wrap: wrap;
  overflow-x: auto;
  /* 横方向のスクロールを許可 */
  margin-top: calc(var(--bs-gutter-y) * -1);
  margin-right: calc(var(--bs-gutter-x) * -0.5);
  margin-left: calc(var(--bs-gutter-x) * -0.5);
  /* 任意の固定横幅を指定 */
  max-width: 1200px;
  /* 例として1200pxに設定 */
}

/* 振替表card-body：ローディング中も高さを確保（position:absoluteのローディングバー用） */
.lesson-card-body {
  min-height: 60px;
}

/* 振替表ローディング：横長バー＋スライドダウン（サイドバーの会員情報はローディング中も確認可能） */
#lesson-loading-container.lesson-loading-bar {
  display: none;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 10;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

/* 振替表データ取得中のローディング表示 */
#lesson-loading-container.lesson-loading-bar .lesson-loading-label {
  font-size: 0.8rem;
  color: #555;
}

/* 振替表データ取得中のローディング表示 */
#lesson-loading-container.lesson-loading-bar .lesson-loading-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 振替表データ取得中のローディング表示 */
#lesson-loading-container.lesson-loading-bar .lesson-loading-track {
  flex: 1;
  min-height: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

/* 振替表データ取得中のローディング表示 */
#lesson-loading-container.lesson-loading-bar .lesson-loading-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2980b9);
  border-radius: 4px;
  transition: width 0.2s ease-out;
}

/* 振替表データ取得中のローディング表示 */
#lesson-loading-container.lesson-loading-bar .lesson-loading-percent {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2980b9;
  min-width: 36px;
}

/* 振替表データ取得中のローディング表示 */
#level-loading-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 1060;
}

/* 振替表データ取得中のローディング表示 */
#info-loading-container {
  display: none;
  width: 100%;
  height: 100px;
  background: rgba(255, 255, 255, 0.8);
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* 全画面ローディングオーバーレイ（共通。旧 challenge_list/pdf/item_manager/school_check のローカル定義を集約） */
#loading-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* 振替表データ取得中のローディング表示 */
.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #3498db;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* day-link のレイアウト・表示スタイル */
.day-link {
  color: #fff;
  text-decoration: underline;
}

/* ホバー・フォーカス時の視覚フィードバック */
.day-link:hover {
  color: blue;
}

/* width-50pct のレイアウト・表示スタイル */
.width-50pct {
  width: 50%;
}

/* width-80pct のレイアウト・表示スタイル */
.width-80pct {
  width: 80%;
}

/* width-120pct のレイアウト・表示スタイル */
.width-120pct {
  width: 120%;
}

/* width-140pct のレイアウト・表示スタイル */
.width-140pct {
  width: 140%;
}

/* アニメーション定義 */
@keyframes spin {
  /* ローディングスピナー：回転開始位置 */
  0% {
    transform: rotate(0deg);
  }

  /* ローディングスピナー：1 周完了（ループ継続） */
  100% {
    transform: rotate(360deg);
  }
}

/* タブレット以下：レイアウトを縦積み・全幅化 */
@media screen and (min-width: 450px) and (max-width: 768px) {
  /* 768pxまでの幅の場合に適応される */
  .school-body {
    overflow: scroll;
  }

  /* ダッシュボードカードのヘッダー・枠 */
  .top-card {
    height: 500px;
  }

  /* ダッシュボードカードのヘッダー・枠 */
  .top-card.top-card--feed {
    height: 500px;
    max-height: 500px;
  }

  /* width-120pct のレイアウト・表示スタイル */
  .width-120pct {
    width: 140%;
  }

  /* width-140pct のレイアウト・表示スタイル */
  .width-140pct {
    width: 140%;
  }
}

/* スマホ幅：コンパクト表示・タップ領域調整 */
@media screen and (max-width: 450px) {
  /* 320pxまでの幅の場合に適応される */
  .top-card {
    width: 100%;
    height: 70vh;
  }

  /* ダッシュボードカードのヘッダー・枠 */
  .top-card.top-card--feed {
    height: 70vh;
    max-height: 70vh;
  }

  /* width-120pct のレイアウト・表示スタイル */
  .width-120pct {
    width: 140%;
  }

  /* width-140pct のレイアウト・表示スタイル */
  .width-140pct {
    width: 140%;
  }
}

/* 公式LINEトップカード */
.line-index-card {
  padding: 0.5rem !important;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  position: sticky;
  top: 0;
  background: #fffafa;
  z-index: 2;
  padding-bottom: 0.35rem;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-tab {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  color: #585769;
  cursor: pointer;
}

/* 選択・活性状態の強調 */
.line-index-tab.active {
  background: #585769;
  color: #fff;
  border-color: #585769;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-item {
  width: 100%;
  text-align: left;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

/* ホバー・フォーカス時の視覚フィードバック */
.line-index-item:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-item__date {
  font-size: 0.7rem;
  color: #888;
  white-space: nowrap;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-item__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-item__preview {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.15rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-item__file {
  font-size: 0.75rem;
  color: #6f42c1;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  color: #fff;
  white-space: nowrap;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-badge--send {
  background: #0d6efd;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-badge--flex {
  background: #1db446;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-badge--announce {
  background: #6f42c1;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-empty {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  padding: 1rem 0.5rem;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.75rem;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-detail__text {
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-detail__attachment {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-detail__attachment a {
  color: #0d6efd;
  text-decoration: none;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-flex-preview {
  max-width: 100%;
  min-height: auto;
}

/* LINE 管理画面のヘッダー・専用 UI */
.line-index-json__pre {
  font-size: 0.75rem;
  max-height: 240px;
  overflow: auto;
  background: #f5f5f5;
  padding: 0.75rem;
  border-radius: 4px;
}

/* LINE Flexプレビュー（モーダル内のみ・line.css は読み込まない） */
#lineIndexDetailModal .line-message-preview {
  background-color: #d4e6f1;
  background-image: url('/public/images/line-preview-bg.png');
  background-repeat: repeat;
  padding: 1rem;
  border-radius: 12px;
  max-width: 400px;
  margin: 0 auto;
  min-height: 200px;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-bubble {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-header {
  padding: 12px 16px;
  color: white;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-header-text {
  font-size: 14px;
  font-weight: bold;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-hero {
  width: 100%;
  overflow: hidden;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body {
  padding: 16px;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body[data-layout="vertical"] {
  display: flex;
  flex-direction: column;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body[data-layout="horizontal"] {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body[data-spacing="xs"] > * { margin-bottom: 4px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body[data-spacing="sm"] > * { margin-bottom: 8px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body[data-spacing="md"] > * { margin-bottom: 12px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body[data-spacing="lg"] > * { margin-bottom: 16px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-body[data-spacing="xl"] > * { margin-bottom: 20px; }
/* 曜日・列位置に応じた配色（業務カレンダー慣習） */
#lineIndexDetailModal .line-body > *:last-child { margin-bottom: 0; }

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-text { line-height: 1.5; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-text-xs { font-size: 11px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-text-sm { font-size: 13px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-text-md { font-size: 15px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-text-lg { font-size: 17px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-text-xl { font-size: 19px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-text-xxl { font-size: 24px; }

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-image {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-separator {
  height: 1px;
  background: #e0e0e0;
  margin: 12px 0;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-box { display: flex; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-box[data-layout="vertical"] { flex-direction: column; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-box[data-layout="horizontal"] { flex-direction: row; gap: 8px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-box[data-spacing="xs"] > * { margin-bottom: 4px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-box[data-spacing="sm"] > * { margin-bottom: 6px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-box[data-spacing="md"] > * { margin-bottom: 8px; }
/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-box[data-spacing="lg"] > * { margin-bottom: 12px; }
/* 曜日・列位置に応じた配色（業務カレンダー慣習） */
#lineIndexDetailModal .line-box > *:last-child { margin-bottom: 0; }

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-footer {
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-button {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 15px;
  font-weight: bold;
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-button-primary {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* LINE 管理画面のヘッダー・専用 UI */
#lineIndexDetailModal .line-button-secondary {
  background-color: #f0f0f0 !important;
  color: #333 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 教室別会員数 */
.member-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  padding: 0 0.25rem 0.25rem;
}

/* member-summary-title のレイアウト・表示スタイル */
.member-summary-title {
  font-weight: bold;
  font-size: 0.85rem;
  color: #2c5f8a;
}

/* 色分け凡例（横並び・小さく） */
.member-summary-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
}

/* member-summary-legend / legend--total のレイアウト・表示スタイル */
.member-summary-legend .legend--total {
  color: #212529;
}

/* member-summary-legend / legend--in のレイアウト・表示スタイル */
.member-summary-legend .legend--in {
  color: #0d6efd;
}

/* member-summary-legend / legend--out のレイアウト・表示スタイル */
.member-summary-legend .legend--out {
  color: #dc3545;
}

/* member-summary-legend / legend--rate のレイアウト・表示スタイル */
.member-summary-legend .legend--rate {
  color: #198754;
}

/* テーブルを白背景のパネルに載せる */
#schoolSummaryBody {
  background-color: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 4px;
  padding: 2px;
}

/* テーブル行・セルの整列 */
.member-summary-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.62rem;
  margin-bottom: 0;
  background-color: #fff;
}

/* 会員サマリ表のヘッダー・セル整列 */
.member-summary-table th,
.member-summary-table td {
  padding: 0.15rem 0.1rem;
  vertical-align: middle;
  background-color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* テーブル行・セルの整列 */
.member-summary-table thead th {
  color: #2c5f8a;
  font-weight: 600;
}

/* 教室名ヘッダーを教室ごとに色分け（BBSヘッダーと同系統・校舎カラートークン参照） */
/* ※旧 #333 文字色は校舎トークンの #212529 に統一（ほぼ同一の濃灰・色ゆれ解消） */
.member-summary-table thead th[data-school-id="101"] { background-color: var(--school-101-bg); color: var(--school-101-fg); }
/* テーブル行・セルの整列 */
.member-summary-table thead th[data-school-id="102"] { background-color: var(--school-102-bg); color: var(--school-102-fg); }
/* テーブル行・セルの整列 */
.member-summary-table thead th[data-school-id="103"] { background-color: var(--school-103-bg); color: var(--school-103-fg); }
/* テーブル行・セルの整列 */
.member-summary-table thead th[data-school-id="104"] { background-color: var(--school-104-bg); color: var(--school-104-fg); }
/* テーブル行・セルの整列 */
.member-summary-table thead th[data-school-id="105"] { background-color: var(--school-105-bg); color: var(--school-105-fg); }
/* テーブル行・セルの整列 */
.member-summary-table thead th[data-school-id="106"] { background-color: var(--school-106-bg); color: var(--school-106-fg); }
/* テーブル行・セルの整列 */
.member-summary-table thead th[data-school-id="107"] { background-color: var(--school-107-bg); color: var(--school-107-fg); }
/* テーブル行・セルの整列 */
.member-summary-table thead th[data-school-id="401"] { background-color: var(--school-401-bg); color: var(--school-401-fg); }
.member-summary-table thead th[data-school-id="501"] { background-color: var(--school-501-bg); color: var(--school-501-fg); }
.member-summary-table thead th[data-school-id="2"] { background-color: var(--school-2-bg); color: var(--school-2-fg); }

/* 横計列を太字で強調（背景は白のまま） */
.member-summary-table .member-summary-total {
  font-weight: 700;
}

/* 指標ごとの色分け（入会=青・退会=赤・稼働率=緑・総人数=黒） */
.member-summary-table .member-summary-row--total td {
  color: #212529;
}

/* テーブル行・セルの整列 */
.member-summary-table .member-summary-row--in td {
  color: #0d6efd;
}

/* テーブル行・セルの整列 */
.member-summary-table .member-summary-row--out td {
  color: #dc3545;
}

/* テーブル行・セルの整列 */
.member-summary-table .member-summary-row--rate td {
  color: #198754;
}

.member-summary-table .member-summary-row--net td {
  color: #212529;
}

.member-summary-table .member-summary-in {
  color: #0d6efd;
}

.member-summary-table .member-summary-out {
  color: #dc3545;
}

.application-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 0.35rem;
  background: #fff;
}

.application-tab {
  min-height: 40px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  background: #fff;
  color: #585769;
  font-size: 0.78rem;
  cursor: pointer;
}

.application-tab.active,
.application-tab:focus-visible {
  background: #585769;
  border-color: #585769;
  color: #fff;
}

.member-summary-page {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.member-summary-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.member-summary-panel {
  flex: 1;
  min-width: 0;
  border: 1px solid #d0d5da;
  background: #fff;
  padding: 0.75rem 0.75rem 1.5rem;
}

.member-summary-view-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.member-summary-empty {
  margin: 2rem 0;
  text-align: center;
  color: #6c757d;
}

.member-summary-page .member-summary-label,
.member-summary-page .member-summary-corner {
  background: #fff;
  color: #212529;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.member-summary-page .member-summary-row--in td,
.member-summary-page .member-summary-row--net td {
  color: #0d6efd;
  font-weight: 700;
}

.member-summary-page .member-summary-row--prev .member-summary-in {
  color: #198754;
  font-weight: 700;
}

.member-summary-page #schoolSummaryBody {
  display: block;
  min-width: 0;
  padding: 0.5rem;
  overflow: auto;
}

.member-summary-page .member-summary-table {
  width: 100%;
  height: 100%;
  table-layout: auto;
}

.member-summary-page .member-summary-table th,
.member-summary-page .member-summary-table td {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  width: auto;
  min-width: 3em;
  padding: 0.35em 0.15em;
}
