/*
 * v6.294.0: 配置ボード Phase A R1 PC 版 CSS
 * サンプル docs/samples/haichi_board_final.html 準拠。
 * 色トークンは既存正本から並列コピー（設計知見 #92）：
 *   - .hb-pv (プレート緑) = ok    → syukan.css L972-985 `.chip[data-ok="ok"]`
 *   - .hb-pv-pending (アンバー)  → syukan.css L972-985 `.chip[data-ok="pending"]`
 *   - .hb-pv-ng (赤)              → syukan.css L972-985 `.chip[data-ok="ng"]`
 *   - .hb-pv-empty (ローズピンク点線) → syukan.css L1035 `.chip-empty`
 *   - .hb-mgn (直行青丸)          → --color-primary (#1a73e8) 既存
 *   - .hb-dept 4 拠点色           → dashboard.css L1443-1462 `.fr-dept-pill`
 * R2 でスマホ版 CSS 追加、R3 でポスト数○切替の UI 追加予定。
 */

/* ==================== ページヘッダー ==================== */
body.hb-body {
  background: var(--color-bg, #f6f8fc);
}
body.hb-body .container {
  max-width: 1440px;
}
.hb-page {
  padding: 20px 16px 60px;
}

/* ==================== モニターコンテナ ==================== */
.hb-monitor {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 14px;
}

.hb-mhead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
  flex-wrap: wrap;
}
.hb-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text, #202124);
}
.hb-date {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text, #202124);
  font-variant-numeric: tabular-nums;
}

/* 日付ナビ・拠点プルダウン（配置一覧ページ da-btn-pill と同流儀 #92） */
.hb-btn-pill {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  background: var(--color-surface, #ffffff);
  color: var(--color-text, #202124);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease;
}
.hb-btn-pill:hover {
  background: var(--color-surface-2, #f8fafd);
}
.hb-btn-today {
  color: var(--color-primary, #1a73e8);
  border-color: var(--color-primary, #1a73e8);
}
.hb-btn-nav {
  width: 36px;
  padding: 0;
}
.hb-btn-nav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hb-dept-pill {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 14px;
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  border-radius: 9999px;
  background: var(--color-surface, #ffffff);
  font-size: 13px;
}
.hb-dept-label {
  font-size: 11px;
  color: var(--color-text-muted, #5f6368);
}
.hb-dept-sel {
  height: 32px;
  padding: 0 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text, #202124);
  cursor: pointer;
}
.hb-dept-sel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.hb-spacer {
  flex: 1;
}

/* 集計チップ */
.hb-sum-chip {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 9999px;
  background: var(--color-surface-2, #f8fafd);
  border: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
  font-size: 12px;
  color: var(--color-text-muted, #5f6368);
}
.hb-sum-chip b {
  font-size: 13px;
  color: var(--color-text, #202124);
  font-weight: 600;
}
.hb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.hb-dot-green { background: var(--color-green, #188038); }
.hb-dot-amber { background: var(--color-amber, #f29900); }
.hb-dot-rose  { background: #d0417e; }

/* 自動更新ピル（R1 は「手動更新」表示・R2 で SSE 実装時に「自動更新中」に切替） */
.hb-live-pill {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 9999px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  font-size: 11px;
  color: var(--color-text-muted, #5f6368);
}
.hb-live-pill .hb-dot {
  background: var(--color-green, #188038);
}
.hb-live-pill.hb-live-off .hb-dot {
  background: var(--color-text-faint, #80868b);
}

/* ==================== 4 ボードグリッド ==================== */
.hb-boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 1100px) {
  .hb-boards {
    grid-template-columns: 1fr;
  }
}
.hb-board {
  border-top: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
  padding: 14px 22px 20px;
  min-width: 0; /* grid の min-width auto による膨張防止 (v6.281.3 教訓) */
}
.hb-boards .hb-board:nth-child(odd) {
  border-right: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
}
@media (max-width: 1100px) {
  .hb-boards .hb-board:nth-child(odd) {
    border-right: none;
  }
}
.hb-btitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.hb-btitle .hb-bname {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text, #202124);
}
.hb-btitle .hb-bcnt {
  font-size: 12px;
  color: var(--color-text-faint, #80868b);
}
.hb-btitle .hb-bnight {
  font-size: 11px;
  color: var(--color-primary, #1a73e8);
  background: var(--color-surface-3, #eef3fd);
  border-radius: 9999px;
  padding: 2px 10px;
}

/* ==================== ボード表 ==================== */
table.hb-bd {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
table.hb-bd th {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted, #5f6368);
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  background: var(--color-surface-2, #f8fafd);
  white-space: nowrap;
}
table.hb-bd td {
  padding: 8px;
  border-bottom: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
  vertical-align: middle;
}

/* 社名・現場名 統合カラム */
td.hb-c-cs { min-width: 200px; }
td.hb-c-cs .hb-co {
  font-size: 12px;
  color: var(--color-text-muted, #5f6368);
  line-height: 1.5;
}
td.hb-c-cs .hb-site {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #202124);
  line-height: 1.45;
  padding-left: 1em;
  word-wrap: break-word;
}

/* 上番時間 */
td.hb-c-time {
  width: 72px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
  color: var(--color-text, #202124);
}
td.hb-c-time .hb-dep {
  color: var(--color-red, #c5221f);
  font-size: 12px;
}

/* ポスト数 */
td.hb-c-post {
  width: 56px;
  text-align: center;
}
.hb-pn-ok {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border: 1.6px solid var(--color-text, #202124);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}
.hb-pn-raw {
  display: inline-block;
  font-weight: 600;
  font-size: 13px;
}
.hb-badge-mi {
  display: inline-block;
  font-size: 10px;
  color: #8a5a00;
  background: #fef7e0;
  border: 1px solid #f2d38a;
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 3px;
  vertical-align: 2px;
}

/* 隊員名列 */
td.hb-c-plates {
  min-width: 200px;
}

/* 交通手段列（R1 では空欄・Phase B で実装） */
td.hb-c-tra {
  width: 86px;
}

/* 夜間現場行: 社名・現場名・時間を青文字 */
tr.hb-night td.hb-c-cs .hb-co,
tr.hb-night td.hb-c-cs .hb-site,
tr.hb-night td.hb-c-time {
  color: var(--color-primary, #1a73e8);
}

/* v6.294.0 R1 FB (2026-07-21): 次回予定行 (tr.hb-next) は Phase A2 で再設計するため削除。
 *   関連スタイルは git 履歴 (v6.294.0 初版) に残る。*/

/* ==================== ネームプレート ==================== */
.hb-plates {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 34px;
}
.hb-pw {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.hb-mgn {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--color-primary, #1a73e8);
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* プレート本体（縦書き） */
.hb-pv {
  writing-mode: vertical-rl;
  text-orientation: upright;
  width: 28px;
  height: 68px;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1;
  /* v6.294.0 R1 FB2: 縦プレートは常に 1 列。5+ 文字は下の data-len 別 CSS で自動縮小して 68px に収める */
  white-space: nowrap;
  overflow: hidden;
  /* デフォルト = ok = 緑（syukan.css .chip[data-ok="ok"] の色域 = rgba(24,128,56,.12)/.30 を並列コピー #92）*/
  background: rgba(24, 128, 56, 0.12);
  border: 1px solid rgba(24, 128, 56, 0.30);
  color: var(--color-green, #188038);
}
.hb-pv.hb-pv-pending {
  /* pending = アンバー（syukan.css .chip[data-ok="pending"] 相当を並列コピー #92）*/
  background: rgba(242, 153, 0, 0.12);
  border: 1px solid rgba(242, 153, 0, 0.30);
  color: #8a5500;
  font-weight: 500;
}
.hb-pv.hb-pv-ng {
  /* v6.370.0: ng = 赤 → **ローズピンク点線**（週間予定表 .chip[data-ok="ng"] と同値・#92）。
     NG は実質欠員なので、下の .hb-pv-empty（未配置プレート）と同じ色域に寄せる。
     ⚠️ 値は style.css の token を参照。枠の太さは下の .hb-pv-empty（1.5px）に合わせ、
       このボード内で未配置系の見え方が揃うようにする（週間予定表の 2px とは画面ごとの既存差）。 */
  background: var(--color-unfilled-bg);
  border: 1.5px dashed var(--color-unfilled-border);
  color: var(--color-unfilled-text);
}
.hb-pv.hb-pv-empty {
  /* 未配置 = ローズピンク点線（syukan.css L1035 .chip-empty を並列コピー #92）*/
  background: #fce4ec;
  border: 1.5px dashed #ec407a;
  color: #ec407a;
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 11.5px;
}

/* 応援テープ（プレート下端に 5px の色帯・dashboard.css .fr-dept-pill の border 色を並列コピー #92） */
.hb-pv[data-support-dept="1"] { box-shadow: inset 0 -5px 0 #174EA6; }
.hb-pv[data-support-dept="2"] { box-shadow: inset 0 -5px 0 #3C3489; }
.hb-pv[data-support-dept="3"] { box-shadow: inset 0 -5px 0 #085041; }
.hb-pv[data-support-dept="4"] { box-shadow: inset 0 -5px 0 #712B13; }

/* v6.294.0 R1 FB2: 文字数別自動縮小（68px 内に 1 列固定・staff 表示名から括弧除去後の長さで判定）。
 * 縦書きの 1 文字あたり縦幅目安 = font-size + letter-spacing。padding を絞って content 領域を広げつつ、
 * N 文字 × 1 文字幅 ≤ content 高さ になる font-size/letter-spacing を実測で決定した。 */
.hb-pv[data-len="5"]                              { font-size: 11px; letter-spacing: 0; padding: 4px 0; }
.hb-pv[data-len="6"]                              { font-size: 10px; letter-spacing: 0; padding: 3px 0; }
.hb-pv[data-len="7"],
.hb-pv[data-len="8"]                              { font-size: 8px;  letter-spacing: 0; padding: 2px 0; }
.hb-pv[data-len="9"],
.hb-pv[data-len="10"]                             { font-size: 7px;  letter-spacing: 0; padding: 2px 0; }
/* 11 文字以上（想定外の長名）: 最小サイズ。overflow: hidden ですくいきれない分は削れる（実用限界） */
.hb-pv[data-len="11"],
.hb-pv[data-len="12"],
.hb-pv[data-len="13"],
.hb-pv[data-len="14"],
.hb-pv[data-len="15"]                             { font-size: 6px;  letter-spacing: -0.5px; padding: 1px 0; }

/* ==================== 凡例 ==================== */
.hb-legend {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  border-radius: 20px;
  padding: 14px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 12px;
  color: var(--color-text-muted, #5f6368);
  align-items: flex-end;
}
.hb-lg-label {
  font-weight: 600;
  color: var(--color-text, #202124);
  align-self: center;
}
.hb-lg-item {
  display: inline-flex;
  align-items: flex-end;
  gap: 7px;
}
.hb-lg-item .hb-pv {
  height: 56px;
}

/* ==================== 空状態・ローディング ==================== */
.hb-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--color-text-muted, #5f6368);
  font-size: 14px;
}
.hb-need-dept {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-muted, #5f6368);
  font-size: 14px;
  background: var(--color-surface-2, #f8fafd);
  border-radius: 12px;
  margin: 20px;
}

/* ==================== v6.295.0 R2: 全画面ボタン（PC のみ・スマホ幅では非表示） ==================== */
.hb-btn-fs {
  width: 36px;
  padding: 0;
}
.hb-btn-fs svg {
  width: 16px;
  height: 16px;
}
.hb-btn-fs-label {
  display: none; /* PC でもアイコンのみ・title で「全画面表示」表示 */
}

/* ==================== v6.295.0 R2: 自動更新ピル SSE 接続状態 ==================== */
.hb-live-pill.hb-live-on .hb-dot {
  background: var(--color-green, #188038);
}
/* .hb-live-off の .hb-dot は既存の灰色（v6.294.0 で定義済み）を維持 */

/* ==================== v6.295.0 R2: スマホ版レイアウト ==================== */
/* デフォルト（PC 幅）ではスマホ版を非表示 */
.hb-mobile {
  display: none;
}

@media (max-width: 600px) {
  body.hb-body .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .hb-page {
    padding: 8px 0 40px;
  }
  /* PC 版のモニターコンテナ・凡例はスマホでは非表示 */
  .hb-monitor { display: none; }
  .hb-legend { display: none; }
  /* スマホ版を表示 */
  .hb-mobile {
    display: block;
    background: var(--color-surface, #ffffff);
    border-top: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
    border-bottom: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
  }
  /* スマホ幅では全画面ボタン非表示（PC のみの機能） */
  .hb-btn-fs { display: none; }
}

/* スマホヘッダー（タイトル + 自動更新中表示） */
.hb-mo-head {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--color-surface, #ffffff);
  border-bottom: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
}
.hb-mo-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #202124);
}
.hb-mo-live-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-faint, #80868b);
}
.hb-mo-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-faint, #80868b);
}
.hb-mo-live-wrap.is-active {
  color: var(--color-text-muted, #5f6368);
}
.hb-mo-live-wrap.is-active .hb-mo-live-dot {
  background: var(--color-green, #188038);
}

/* スマホ日付ナビ + 拠点バー */
.hb-mo-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--color-surface, #ffffff);
  border-bottom: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
  flex-wrap: wrap;
}
.hb-mo-today {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 9999px;
  background: var(--color-primary, #1a73e8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.hb-mo-nav {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  background: var(--color-surface, #ffffff);
  color: var(--color-text, #202124);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.hb-mo-nav svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hb-mo-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #202124);
  font-variant-numeric: tabular-nums;
  flex-shrink: 1;
  min-width: 0;
}
.hb-mo-dept-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  border-radius: 9999px;
  background: var(--color-surface, #ffffff);
  padding: 0 4px 0 10px;
  min-width: 0;
  flex-shrink: 0;
}
.hb-mo-dept-sel {
  height: 26px;
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--color-text, #202124);
  cursor: pointer;
  max-width: 140px;
}
.hb-mo-dept-sel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* スマホ 4 種別タブ */
.hb-mo-tabs {
  display: flex;
  background: var(--color-surface, #ffffff);
  border-bottom: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  padding: 0 6px;
}
.hb-mo-tab {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding: 10px 0 8px;
  color: var(--color-text-muted, #5f6368);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  min-width: 0;
}
.hb-mo-tab.is-active {
  color: var(--color-primary, #1a73e8);
  font-weight: 600;
  border-bottom-color: var(--color-primary, #1a73e8);
}

/* スマホカードリスト */
.hb-mo-body {
  padding: 10px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--color-bg, #f6f8fc);
  min-width: 0;
}
.hb-mcard {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}
.hb-mcard-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  min-width: 0;
}
.hb-mcard-tm {
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted, #5f6368);
  line-height: 1.35;
  white-space: nowrap;
  flex-shrink: 0;
}
.hb-mcard-tm .hb-mcard-dep {
  color: var(--color-red, #c5221f);
}
.hb-mcard-nm {
  font-size: 13px;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.hb-mcard-nm small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--color-text-muted, #5f6368);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-mcard-nm .hb-mcard-sn {
  display: block;
  font-weight: 600;
  padding-left: 1em;
  color: var(--color-text, #202124);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-mcard-st {
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--color-text-muted, #5f6368);
}
.hb-mcard-st .hb-mcard-st-ok {
  color: var(--color-green, #188038);
  font-weight: 600;
}
.hb-mcard-st.hb-mcard-st-warn {
  color: #b0356b;
  font-weight: 600;
}
.hb-mcard-chev {
  width: 16px;
  text-align: center;
  color: var(--color-text-faint, #80868b);
  flex-shrink: 0;
  transition: transform 0.15s ease;
  font-size: 14px;
}
.hb-mcard.is-open .hb-mcard-chev {
  transform: rotate(180deg);
}
.hb-mcard-d {
  border-top: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10));
  padding: 12px;
  background: var(--color-surface-2, #f8fafd);
  display: none;
}
.hb-mcard.is-open .hb-mcard-d {
  display: block;
}
.hb-mcard-d .hb-plates {
  margin-bottom: 10px;
}
.hb-mcard-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted, #5f6368);
}
.hb-mcard-row-label {
  font-weight: 600;
  color: var(--color-text-muted, #5f6368);
}
/* 夜間現場カード（青文字・PC 版 tr.hb-night と同様の処理） */
.hb-mcard.hb-mcard-night .hb-mcard-nm small,
.hb-mcard.hb-mcard-night .hb-mcard-nm .hb-mcard-sn,
.hb-mcard.hb-mcard-night .hb-mcard-tm {
  color: var(--color-primary, #1a73e8);
}

/* 空状態（該当種別カードなし） */
.hb-mo-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-muted, #5f6368);
  font-size: 13px;
}

/* ==================== v6.295.0 R2: 全画面表示（body.is-fullscreen） ==================== */
body.hb-body.is-fullscreen {
  background: var(--color-surface, #ffffff);
}
body.hb-body.is-fullscreen .container {
  max-width: 100vw;
  padding: 0;
}
body.hb-body.is-fullscreen .hb-page {
  padding: 0;
  min-height: 100vh;
}
body.hb-body.is-fullscreen .hb-monitor {
  border-radius: 0;
  border: none;
  margin: 0;
  min-height: 100vh;
}
body.hb-body.is-fullscreen .hb-legend {
  display: none;
}
/* 全画面時は 1100px 幅チェックを打ち消して 4 ボード 2×2 維持 */
body.hb-body.is-fullscreen .hb-boards {
  grid-template-columns: 1fr 1fr !important;
}
body.hb-body.is-fullscreen .hb-boards .hb-board:nth-child(odd) {
  border-right: 1px solid var(--color-divider, rgba(60, 64, 67, 0.10)) !important;
}

/* ==================== v6.296.0 R3: ポスト数○切替 UI ==================== */
/* PC 版: セル全体をクリック可能に */
td.hb-c-post-clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}
td.hb-c-post-clickable:hover {
  background: var(--color-surface-2, #f8fafd);
}
td.hb-c-post-clickable:active {
  background: var(--color-surface-3, #eef3fd);
}

/* スマホ版: カード展開部のトグルボタン（ヘッダー開閉と競合しないため展開部に配置） */
.hb-mcard-post-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(60, 64, 67, 0.14));
  border-radius: 8px;
  font-size: 12px;
  color: var(--color-text, #202124);
  cursor: pointer;
  transition: background 0.12s ease;
  text-align: left;
}
.hb-mcard-post-toggle:hover {
  background: var(--color-surface-2, #f8fafd);
}
.hb-mcard-post-toggle:active {
  background: var(--color-surface-3, #eef3fd);
}
.hb-mcard-post-toggle .hb-mcp-label {
  font-weight: 600;
  color: var(--color-text-muted, #5f6368);
  flex-shrink: 0;
}
.hb-mcard-post-toggle .hb-mcp-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.hb-mcard-post-toggle .hb-pn-ok {
  width: 22px;
  height: 22px;
  font-size: 12px;
}
.hb-mcard-post-toggle .hb-pn-raw {
  font-weight: 600;
  font-size: 13px;
}
