/* NAK-2023: 全店を項目別に比べる台帳。箱で括らず、罫線・縞・文字の強弱で区切る。 */
.bo { --bo-text:#22251f; --bo-muted:#5c6256; --bo-control:#767676; --bo-line:#e5e7df; --bo-zebra:#f0f2eb; --bo-ng:#a8413a;
  --bo-name-w:152px; --bo-slot:26px; color:var(--bo-text); line-height:1.6; font-size:14px; }
.bo-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* 操作行 */
.bo-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px 24px; margin-bottom:20px; }
.bo-field { display:grid; gap:4px; min-width:220px; }
.bo-field:first-child { min-width:250px; }
.bo-field > span:first-child { font-size:12px; font-weight:600; color:var(--bo-muted); }
.bo-search { position:relative; display:block; }
.bo-search svg { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:var(--bo-muted); pointer-events:none; }
.bo input[type="search"], .bo textarea { border:1px solid var(--bo-control); border-radius:0; background:#fff; color:var(--bo-text); font:inherit; padding:8px; min-height:40px; box-sizing:border-box; }
.bo input[type="search"] { padding-left:32px; width:240px; }
.bo-toolbar .combo { display:block; width:100%; }
.bo-toolbar .combo input { border-color:var(--bo-control); min-height:40px; }
.bo-asof { margin:0 0 10px auto; font-size:12px; color:var(--bo-muted); }
.bo button { color:inherit; cursor:pointer; border:0; background:none; border-radius:0; font:inherit; padding:0; }
.bo-link { min-height:40px; padding:8px 4px!important; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.bo-link:disabled { color:#8a8f82; text-decoration:none; cursor:default; }
.bo button:focus-visible, .bo input:focus-visible, .bo textarea:focus-visible, .bo summary:focus-visible, .bo-scroll:focus-visible { outline:2px solid var(--bo-text); outline-offset:2px; }
/* 見出しは開いた時の読み上げ起点として焦点を受けるだけで操作できない。Safariはタップでも枠を描くため枠を出さない */
.bo-drawer h2:focus { outline:none; }

/* 件数と凡例 */
.bo-summary { display:flex; flex-wrap:wrap; gap:4px 20px; align-items:baseline; margin:0 0 4px; }
.bo-summary strong { font-size:16px; }
.bo-summary span { color:var(--bo-muted); }
.bo-summary span b { color:var(--bo-text); font-weight:700; }
.bo-legend { display:flex; flex-wrap:wrap; gap:2px 16px; margin:0 0 2px; font-size:12px; color:var(--bo-muted); }
.bo-note { display:flex; flex-wrap:wrap; gap:2px 16px; margin:0 0 10px; font-size:12px; color:var(--bo-muted); }
.bo-legend b { margin-right:4px; font-size:13px; }

/* 一覧の表: 見出し行と店舗列を固定し、縦横に動かしても見失わない */
/* relative: 読み上げ用の非表示テキストを領域内に留め、スマホでページ幅を広げない */
.bo-scroll { position:relative; overflow:auto;max-height:max(360px, calc(100vh - 300px)); border-top:2px solid var(--bo-text); }
.bo table { border-collapse:separate; border-spacing:0; width:100%; font-variant-numeric:tabular-nums; }
/* 縞で行を追わせるので行ごとの罫は外す（残すのは見出しの下・集計の上・閉じ線） */
.bo th, .bo td { padding:8px 12px; text-align:left; vertical-align:middle; background:var(--bo-row, #fff); border-bottom:0; }
.bo tbody th, .bo tfoot th { top:auto; }
/* HUB共通の th（12px・補助色）を行見出しでは打ち消す。店舗名と項目名は行を見分ける手がかりなので本文の強さで出す */
.bo tbody th { font-size:14px; color:var(--bo-text); }
.bo table { border-bottom:1px solid var(--bo-line); }
.bo tbody tr:nth-child(even) { --bo-row:var(--bo-zebra); }
.bo thead th { position:sticky; top:0; z-index:2; background:#fff; font-size:12px; font-weight:600; color:var(--bo-muted); white-space:nowrap; vertical-align:bottom; border-bottom:1px solid var(--bo-control); }
.bo-matrix .bo-name-col { position:sticky; left:0; z-index:1; width:var(--bo-name-w); min-width:var(--bo-name-w); }
.bo-matrix thead .bo-name-col { z-index:3; }
.bo-num { text-align:right!important; white-space:nowrap; }
.bo-net { font-size:16px; font-weight:700; }
.bo-neg { color:var(--bo-ng); }
.bo-zero { color:var(--bo-muted); }
.bo-matrix .bo-c-unknown, .bo-matrix tfoot .bo-num { border-right:1px solid var(--bo-line); padding-right:16px; }
.bo-marks { text-align:center!important; white-space:nowrap; padding-left:4px!important; padding-right:4px!important; }
/* 記号は和文書体で描く（欧文書体の×は小さく、○と並ぶと判別しにくい） */
.bo-m, .bo-legend b, .bo-verdict > span { font-family:"Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif; }
.bo-m { display:inline-block; width:var(--bo-slot); text-align:center; font-size:15px; line-height:1.4; }
.bo-m-ok { color:var(--bo-text); }
.bo-m-ng { color:var(--bo-ng); font-weight:700; }
.bo-m-unk, .bo-m-pre { color:var(--bo-muted); }
/* ○と並べた時に×と－が小さく細く沈まないよう、大きさと太さを寄せる */
.bo-matrix .bo-m-ng { font-size:17px; line-height:21px; }
.bo-matrix .bo-m-unk { font-weight:700; }
.bo-slots { display:block; margin-top:2px; }
.bo-slots i { display:inline-block; width:var(--bo-slot); font-style:normal; font-size:11px; font-weight:400; text-align:center; }
.bo-slots i.is-live { color:var(--bo-text); text-decoration:underline dotted; text-decoration-thickness:1.5px; text-underline-offset:2px; }
.bo-matrix thead th[title^="ism"] > span:first-child { font-size:13.5px; }
.bo-nw { white-space:nowrap; }
.bo-sort { display:inline-flex; gap:2px; align-items:center; min-height:32px; font-weight:600!important; color:var(--bo-muted)!important; white-space:nowrap; }
.bo-sort:hover { color:var(--bo-text)!important; text-decoration:underline; }
.bo-sort.is-on { color:var(--bo-text)!important; }
.bo-name { min-height:32px; text-align:left; font-weight:600; text-decoration:underline; text-decoration-color:#a9ae9f; text-underline-offset:3px; }
.bo-name:hover { text-decoration-color:currentColor; }
.bo-selected .bo-name-col { box-shadow:inset 3px 0 var(--bo-text); }
.bo-selected .bo-name { font-weight:800; text-decoration-color:currentColor; }
.bo tfoot th, .bo tfoot td { font-size:12px; color:var(--bo-muted); padding-top:6px; padding-bottom:6px; white-space:nowrap; }
.bo tfoot tr:first-child > * { border-top:2px solid var(--bo-text); }
.bo tfoot .bo-m { font-size:12px; }
.bo-empty { padding:24px 0; border-top:2px solid var(--bo-text); color:var(--bo-muted); }

/* 店舗詳細: HUBの人物詳細と同じ右ドロワー。浮くものだけに影を付ける */
.bo-drawer { position:fixed; inset:0 0 0 auto; margin:0; width:min(560px, 100vw); height:100%; max-height:100%; max-width:100vw; box-sizing:border-box; border:0; padding:0; background:#fff; color:var(--bo-text); box-shadow:0 12px 32px rgba(30,28,18,.14); overflow-y:auto; overscroll-behavior:contain; }
.bo-drawer[open] { animation:boIn .2s ease both; }
.bo-drawer::backdrop { background:rgba(20,18,10,.4); }
@keyframes boIn { from { transform:translateX(24px); opacity:0; } to { transform:none; opacity:1; } }
.bo-dhead { position:sticky; top:0; z-index:2; display:grid; grid-template-columns:1fr auto; column-gap:16px; background:#fff; padding:16px 28px 12px; border-bottom:1px solid var(--bo-line); }
.bo-eyebrow { grid-column:1; grid-row:1; align-self:center; margin:0; font-size:12px; font-weight:600; color:var(--bo-muted); }
.bo-drawer h2 { grid-column:1; grid-row:2; }
.bo-dnav { grid-column:2; grid-row:1 / 3; align-self:start; display:flex; align-items:center; gap:4px 16px; }
.bo-dtotal { grid-column:1 / -1; grid-row:3; }
.bo-close { width:40px; height:40px; font-size:22px!important; line-height:1; color:var(--bo-muted)!important; }
.bo-close:hover { color:var(--bo-text)!important; }
.bo-drawer h2 { font-size:22px; margin:4px 0 6px; letter-spacing:-.02em; }
.bo-dtotal { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 16px; margin:0; font-variant-numeric:tabular-nums; }
.bo-dtotal strong { font-size:24px; }
.bo-pos { margin-left:auto; font-size:12px; color:var(--bo-muted); }
.bo-dbody { padding:4px 28px 40px; }
.bo-quarter { margin-top:24px; }
.bo-quarter h3 { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; font-size:16px; margin:0 0 8px; }
.bo-quarter h3 small { font-size:12px; font-weight:400; color:var(--bo-muted); }
.bo-quarter h3 span { margin-left:auto; font-size:13px; font-weight:400; color:var(--bo-muted); }
.bo-items { border-top:2px solid var(--bo-text); }
.bo-items thead th { position:static; }
.bo-items tbody th { width:7.5em; font-weight:600; }
.bo-items small, .bo-line { display:block; font-size:12px; font-weight:400; color:var(--bo-muted); }
/* 見込みは四半期の見出しに出すので、判定の語は第3Qと同じ長さに揃い列幅がぶれない */
.bo-verdict { white-space:nowrap; width:5.5em; }
.bo-verdict.bo-m-ok { color:var(--bo-text); }
.bo-ism { margin-top:8px; }
.bo-ism summary { display:inline-flex; align-items:center; min-height:40px; cursor:pointer; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.bo-ism form { padding:8px 0 4px; }
.bo-ism fieldset { display:flex; flex-wrap:wrap; gap:4px 24px; border:0; padding:0; margin:0 0 8px; }
.bo-ism legend { padding:0; margin-bottom:2px; font-size:12px; font-weight:600; color:var(--bo-muted); }
.bo-ism fieldset label { display:flex; gap:8px; align-items:center; min-height:40px; }
.bo-reason { display:block; font-size:12px; font-weight:600; color:var(--bo-muted); }
.bo-ism textarea { display:block; width:100%; margin-top:4px; font-size:14px; font-weight:400; }
.bo-actions { display:flex; align-items:center; gap:16px; margin-top:12px; }
.bo-actions small { font-size:12px; color:var(--bo-muted); }
.bo-save { background:#f6edb8!important; color:#353114!important; font-weight:700!important; padding:8px 18px!important; min-height:40px; }
.bo-save:hover { background:#f0e49e!important; }
.bo-save:disabled { cursor:wait; color:#6b6644!important; }
.bo-message:empty { display:none; }
.bo-message { margin:8px 0 0; color:var(--bo-ng); font-size:13px; }

@media (prefers-reduced-motion: reduce) { .bo-drawer[open] { animation:none; } }
@media (max-width:760px) {
  .bo { --bo-name-w:108px; --bo-slot:24px; }
  .bo-note { display:none; }
  /* 店舗名の検索欄と再読込を1行に並べ、表を上へ寄せる */
  .bo-toolbar { display:grid; grid-template-columns:1fr auto; align-items:end; gap:8px 16px; margin-bottom:12px; }
  .bo-toolbar > .bo-field:first-child, .bo-toolbar > .bo-asof { grid-column:1 / -1; }
  .bo-field, .bo-field:first-child, .bo input[type="search"] { width:100%; min-width:0; }
  .bo input[type="search"], .bo textarea, .bo-toolbar .combo input { font-size:16px; }
  .bo-asof { margin:0; }
  /* スマホは表を縦に区切らず、ページ全体のスクロールに任せる（二重スクロールを作らない） */
  .bo-scroll { max-height:none; }
  .bo-link, .bo-ism summary, .bo-ism fieldset label, .bo-save { min-height:44px; }
  .bo-name, .bo-sort { min-height:44px; }
  .bo-close { width:44px; height:44px; }
  .bo th, .bo td { padding:6px 8px; }
  .bo-matrix .bo-name-col { white-space:normal; line-height:1.35; }
  /* スマホは項目別の○×を優先し、達成数・未達数は詳細で見る */
  .bo-matrix .bo-c-ok, .bo-matrix .bo-c-ng, .bo-matrix .bo-c-unknown { display:none; }
  /* 店舗名に続けて差引点も固定し、横に動かしても行の合計を見失わない */
  .bo-matrix .bo-name-col { box-sizing:border-box; max-width:var(--bo-name-w); }
  .bo-matrix .bo-c-net { position:sticky; left:var(--bo-name-w); z-index:1; border-right:1px solid var(--bo-line); }
  .bo-matrix thead .bo-c-net { z-index:3; }
  /* スマホは1列: 期間・店舗名・前後の移動・合計の順。閉じるは右上に固定 */
  .bo-dhead { grid-template-columns:1fr; padding:10px 16px 10px; }
  .bo-dhead > * { grid-column:1!important; grid-row:auto!important; }
  .bo-eyebrow { min-height:44px; display:flex; align-items:center; padding-right:48px; }
  .bo-dbody { padding:0 16px 32px; }
  .bo-dnav { gap:0 16px; }
  .bo-close { position:absolute; top:10px; right:8px; }
}
