/* 左メニューとは別の、キャッチ本数管理内の項目切り替え。 */
.catch-count-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.catch-count-tabs button {
  font: inherit;
  font-size: 14px;
  padding: 10px 16px;
  min-height: 44px;
  max-width: 100%;
  border: 1px solid #cbcfc8;
  border-radius: 8px;
  background: #fff;
  color: #354638;
  cursor: pointer;
  text-align: left;
}
.catch-count-tabs button[aria-selected="true"] {
  background: #354f3d;
  border-color: #354f3d;
  color: #fff;
  font-weight: 700;
}
.catch-count-tabs button:focus-visible,
.catch-count-panel:focus-visible {
  outline: 3px solid #92723b;
  outline-offset: 3px;
}
.catch-count-panel {
  padding: 24px;
  border: 1px solid #e0e3dc;
  border-radius: 12px;
  background: #fff;
}
.catch-count-panel[hidden] { display: none; }
.catch-count-empty {
  margin-top: 24px;
  padding: 24px;
  background: #f5f6f2;
  border-radius: 8px;
  color: #50594e;
}
.catch-count-empty p { margin-bottom: 0; }
@media (max-width: 600px) {
  .catch-count-tabs { gap: 6px; }
  .catch-count-tabs button { flex: 1 1 145px; }
  .catch-count-panel, .catch-count-empty { padding: 16px; }
}

.cc-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 16px 0; }
.cc-filters label { display: grid; gap: 4px; font-size: 13px; max-width: 100%; }
.cc-filters input, .cc-filters select { font: inherit; min-height: 40px; padding: 6px 8px; border: 1px solid #cbd0c8; border-radius: 6px; max-width: 100%; }
.cc-block { margin: 24px 0; min-width: 0; }
.cc-block h4 { margin: 0; padding: 10px 12px; background: #eaf0e7; color: #354f3d; }
.cc-scroll { overflow-x: auto; max-width: 100%; }
.cc-table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.cc-table th, .cc-table td { border: 1px solid #dfe3da; padding: 9px 12px; white-space: nowrap; text-align: right; }
.cc-table thead th { background: #f5f6f2; }
.cc-table th:first-child { text-align: left; }
.cc-table .cc-red { background: #f4cccc; }
.cc-table .cc-yellow { background: #fff2cc; }
.cc-table .cc-blue { background: #cfe2f3; }
.cc-rankings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.cc-warning { padding: 12px; background: #fff4d6; border: 1px solid #cfab61; border-radius: 6px; overflow-wrap: anywhere; }
#catch-count-content { min-width: 0; }
#catch-count-content .nm-period__sel { min-width: 0; max-width: 100%; }
#catch-count-content .nm-period { flex-wrap: wrap; }

/* キャッチャー成績：参考表と同じ列・評価色。 */
.catch-results-view { min-width: 0; }
.catch-results-view .nm-period { flex-wrap: wrap; }
.catch-results-view .nm-period__sel { min-width: 0; max-width: 100%; }
.cr-overview { display: flex; flex-wrap: wrap; gap: 24px; align-items: start; }
.cr-overview > .cc-block { flex: 1 1 600px; min-width: 0; }
.cr-company { flex: 0 1 300px; padding: 16px; border: 1px solid #adb9af; margin-top: 24px; background: #fff; }
.cr-company h4 { margin: 0 0 12px; }
.cr-company dl { margin: 0; }
.cr-company dl > div { display: flex; justify-content: space-between; border-bottom: 1px solid #d3d9d3; padding: 8px 0; }
.cr-company dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.cr-commission { display: block; font-size: 20px; }
.cr-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px; background: #f2f2f2; border: 1px solid #aaa; font-size: 12px; }
.cr-legend > div { flex: 1 1 150px; }
.catch-results-view .cc-table thead th { background: #b7ded2; }
.catch-results-view .cc-table .cc-red { background: #ff1c1c; color: #111; }
.catch-results-view .cc-table .cc-yellow { background: #ffff00; color: #111; }
.catch-results-view .cc-table .cc-blue { background: #00eeee; color: #111; }
.cr-ranking .cc-block > h4 { text-align: center; color: #18549b; background: #cfe2f3; font-size: 22px; }
.cr-ranking .cc-table tbody th { background: #e8f0fe; }
.cr-ranking .cc-top { font-size: 18px; font-weight: 700; }
.cr-ranking .cc-place-1 th { background: #ffd966; }
.cr-ranking .cc-place-2 th { background: #d9d9d9; }
.cr-ranking .cc-place-3 th { background: #f6b26b; }
.cc-filters label[hidden] { display: none; }
.cr-ranking .cc-table tbody tr.cr-top > * { font-size: 18px; font-weight: 700; }
.cr-ranking .cc-table tbody tr.cr-place-1 > th { background: #ffd966; }
.cr-ranking .cc-table tbody tr.cr-place-2 > th { background: #d9d9d9; }
.cr-ranking .cc-table tbody tr.cr-place-3 > th { background: #f6b26b; }
.cr-ranking .cc-table td:nth-child(2) { text-align: left; }

/* 参照スプレッドシートに合わせて、成績画面の密度を上げる。 */
#tab-catch-count > .admin-h2 { margin-bottom: 4px; }
#tab-catch-count > .admin-note { margin: 4px 0 8px; font-size: 12px; }
.catch-count-tabs { gap: 4px; margin: 10px 0; }
.catch-count-tabs button { min-height: 32px; padding: 5px 9px; font-size: 12px; border-radius: 4px; }
#catch-count-panel-results { padding: 12px; border-radius: 4px; }
#catch-count-panel-results > .admin-h3 { margin: 0 0 4px; font-size: 15px; }
#catch-count-panel-results > .admin-note { margin: 0 0 8px; font-size: 11px; }
.catch-results-view { font-size: 11px; line-height: 1.4; }
.catch-results-view .nm-period { padding: 6px 8px; gap: 6px; margin: 8px 0; }
.catch-results-view .nm-period__lbl { font-size: 11px; }
.catch-results-view .nm-period__sel { font-size: 13px; padding: 3px 8px; min-height: 30px; }
.catch-results-view .nm-period__btn { font-size: 12px; padding: 3px 8px; min-width: 30px; min-height: 30px; }
.catch-results-view .cc-filters { gap: 8px; margin: 8px 0; }
.catch-results-view .cc-filters label { font-size: 11px; gap: 2px; }
.catch-results-view .cc-filters input, .catch-results-view .cc-filters select { min-height: 30px; padding: 3px 5px; }
.catch-results-view .cc-filters .admin-btn { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.catch-results-view .admin-note { font-size: 11px; margin: 6px 0; }
.catch-results-view .cc-block { margin: 12px 0; width: 540px; max-width: 100%; }
.catch-results-view .cc-block h4 { padding: 4px 6px; font-size: 12px; }
.catch-results-view .cc-table { width: 100%; font-family: Arial, "Noto Sans JP", sans-serif; font-size: 11px; line-height: 1.3; }
.catch-results-view .cc-table th, .catch-results-view .cc-table td { padding: 2px 5px; height: 20px; border-color: #777; font-size: 11px; }
.catch-results-view .cc-table thead th { font-weight: 400; text-align: center; }
.catch-results-view .cc-table tbody th { font-weight: 400; }
.catch-results-view .cc-table td { text-align: center; }
.cr-overview { gap: 12px; }
.cr-overview > .cc-block { flex: 0 1 680px; width: 680px; }
.cr-overview > .cc-block > h4 { background: #eee; color: #c65d50; text-align: center; }
.cr-company { flex: 0 1 220px; margin-top: 12px; padding: 0; border-color: #777; }
.cr-company h4 { font-size: 11px; padding: 3px 5px; margin: 0; background: #eee; }
.cr-company dl > div { padding: 2px 5px; min-height: 20px; border-color: #777; }
.cr-company dt, .cr-company dd { font-size: 11px; font-weight: 400; }
.cr-company > p { margin: 0; padding: 3px 5px; font-size: 10px; border-top: 1px solid #777; }
.cr-commission { font-size: 12px; font-weight: 400; padding: 2px 5px; }
.cr-method { margin: 6px 0; font-size: 11px; color: #566254; }
.cr-method summary { cursor: pointer; }
.cr-method p { margin: 4px 0; }
.cr-legend { width: 540px; max-width: 100%; box-sizing: border-box; gap: 8px; padding: 6px; font-size: 10px; }
.cr-legend > div { flex: 1 1 120px; }
.cr-ranking-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cr-ranking { width: 540px; max-width: 100%; min-width: 0; }
.cr-ranking .cc-block > h4 { font-size: 18px; padding: 4px 6px; }
.cr-ranking .cc-table tbody tr.cr-top > * { font-size: 14px; font-weight: 700; height: 26px; }
@media (max-width: 600px) {
  .catch-count-tabs button { flex: 0 1 auto; min-height: 36px; }
  #catch-count-panel-results { padding: 8px; }
  .catch-results-view .cc-filters input, .catch-results-view .cc-filters select,
  .catch-results-view .cc-filters .admin-btn { min-height: 36px; }
  .catch-results-view .cc-scroll { -webkit-overflow-scrolling: touch; }
}
.cr-ranking { width: 520px; }
.cr-ranking .cc-block { width: 100%; }

/* 順位ごとの淡い青。成績の閾値色と上位3位のメダル色は維持する。 */
.cc-ranked tbody tr > th:first-child,
.cr-ranking .cc-ranked tbody tr > th:first-child{background:var(--cc-rank-bg,#f0f7fc)}
.cr-ranking .cc-ranked tbody tr.cr-place-1 > th{background:linear-gradient(135deg,#ffe9a6,#f4c64f)}
.cr-ranking .cc-ranked tbody tr.cr-place-2 > th{background:linear-gradient(135deg,#f2f3f5,#c4c9cf)}
.cr-ranking .cc-ranked tbody tr.cr-place-3 > th{background:linear-gradient(135deg,#ffe1c2,#e7ad72)}

/* 個人成績の右に終了日だけの細い確認表。狭い画面では順番を保って折り返す。 */
.cr-performance-pair{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}
.cr-performance-main{width:540px;max-width:100%;min-width:0}
.cr-end-day{width:220px;max-width:100%;min-width:0}
.catch-results-view .cr-performance-main .cc-block,.catch-results-view .cr-end-day .cc-block{width:100%}
.catch-results-view .cr-end-day .cc-block h4{font-size:11px;line-height:1.5}
.catch-results-view .cr-end-day .cc-table{table-layout:fixed;min-width:0}
.catch-results-view .cr-end-day .cc-table th:first-child,.catch-results-view .cr-end-day .cc-table td:first-child{width:54%;white-space:normal;overflow-wrap:anywhere}
.catch-results-view .cr-end-day .cc-table th,.catch-results-view .cr-end-day .cc-table td{padding:2px 4px}

/* 本数確認用：アプリへの反映（2026-10-22・saiji-catch-release.js） */
.cr-rel-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 16px 0; padding: 14px 16px; border-radius: 10px; background: #eaf0e7; color: #354f3d; }
.cr-rel-now strong { font-size: 22px; }
.cr-rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cr-rel-grid[hidden] { display: none; }
.cr-rel-box { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid #dfe3da; border-radius: 10px; background: #fafbf8; min-width: 0; }
.cr-rel-box h4 { margin: 0; font-size: 15px; }
.cr-rel-box p { margin: 0; font-size: 13px; color: #50594e; }
.cr-rel-box label { display: grid; gap: 4px; font-size: 13px; }
.cr-rel-box input, .cr-rel-box select, .cr-rel-box textarea { font: inherit; min-height: 40px; padding: 6px 8px; border: 1px solid #cbd0c8; border-radius: 6px; max-width: 100%; min-width: 0; }
.cr-rel-box--warn { border-color: rgba(179, 38, 30, 0.25); background: #fffafa; }
.cr-rel-msg { min-height: 1.5em; margin: 12px 0; font-weight: 600; }
.cr-rel-h { margin: 20px 0 8px; }
.cr-rel-log td { text-align: left; white-space: normal; }
.cr-rel-box textarea { resize: vertical; line-height: 1.6; }
.cr-rel-log td:nth-child(4) { white-space: pre-line; min-width: 240px; }

/* ---- キャッチ本数・フェーズ別成績表：紙の成績表（スプレッドシート）と同じ詰まった見た目（2026-10-22・saiji-catch-sheets.js）----
   ご指示「こんな感じのレイアウトになってほしい。現状大きすぎたり見にくい」（紙のシートの画像）。
   表は中身の幅だけ・小さめの字・細い行・濃いめの罫線。色は GAS の値そのまま。
   続き（同日）「もうちょっとだけ右に広くていいかも」→ 左右の余白 8px→14px・名前の欄を少し広く。 */
.ck-wrap { max-width: 100%; overflow-x: auto; margin: 0 0 14px; }
.ck-table { border-collapse: collapse; width: auto; font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums; background: #fff; }
.ck-table th, .ck-table td { border: 1px solid #9a9a9a; padding: 2px 14px; white-space: nowrap; text-align: center; color: #000; }
.ck-table tbody th[scope="row"] { text-align: left; font-weight: 400; min-width: 110px; }
.ck-table .ck-head th { background: #f1efe8; font-weight: 700; }
.ck-table tr.ck-total th, .ck-table tr.ck-total td { font-weight: 700; }
.ck-table tr.ck-total th, .ck-table tr.ck-total td:not([class]) { background: #f3f3f3; }
/* 題名の行（表と同じ幅） */
.ck-cap { font-size: 13px; font-weight: 700; padding: 4px 8px !important; }
.ck-cap--grand { background: #ffe599; color: #7f6000 !important; }
.ck-cap--team { background: #fce5cd; color: #7a4019 !important; }
.ck-cap--dark { background: #434343; color: #fff !important; }
.ck-cap--gray { background: #d9d9d9; color: #333 !important; }
.ck-cap--band { background: #e8eaed; }
/* 条件の色（GAS の #ff0000・#ffff00・#00ffff。赤は字を濃い赤に） */
.ck-table .cc-red { background: #ff0000; color: #600 !important; }
.ck-table .cc-yellow { background: #ffff00; }
.ck-table .cc-blue { background: #00ffff; }
/* サマリー */
.ck-summary tbody th[scope="row"] { font-weight: 700; white-space: normal; max-width: 150px; }
.ck-summary td { text-align: right; min-width: 130px; }
.ck-h-period { background: #cfe2f3 !important; }
.ck-h-week { background: #d9ead3 !important; }
/* フェーズ別：フェーズの帯は表と同じ幅 */
.ck-phase-sec { width: fit-content; max-width: 100%; margin: 18px 0 8px; }
.ck-banner { margin: 0 0 6px; padding: 4px 8px; font-size: 14px; background: var(--ck-bg, #1155cc); color: var(--ck-fg, #fff); }
/* キャッチ本数：フェーズの大きな表と、ランキングシート（入れば横並び・入らなければ下へ） */
.ck-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ck-split > .ck-wrap { margin: 0; }
/* ⚠ 縦帯は見出し行（.ck-head）の中にあるので、見出しのベージュに負けないよう強く指定する（2026-10-22 不具合：色が付いていなかった） */
.ck-table .ck-head th.ck-band, .ck-big .ck-band { width: 72px; white-space: normal; font-size: 13px; font-weight: 700; background: var(--ck-bg, #1155cc); color: var(--ck-fg, #fff) !important; }
/* 左の帯は縦書き（2026-10-23 ご指示「キャッチ本数の班名の所縦書きがいい」） */
.ck-big .ck-band { width: 34px; padding: 6px 4px; writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 2px; text-align: center; vertical-align: middle; white-space: nowrap; }
.ck-big tbody.ck-grp--next tr:first-child > * { border-top: 3px double #000; }
.ck-big td:nth-child(n+8) { text-align: right; }
.ck-ph { background: var(--ck-bg, #fff) !important; color: var(--ck-fg, inherit); }
.ck-ranks { border: 2px solid #000; }
.ck-ranks .ck-name { text-align: left; min-width: 100px; }
.ck-ranks .ck-num { text-align: right; min-width: 76px; }
.ck-ranks .ck-rk { min-width: 24px; }
.ck-ranks .ck-gap { border: none; width: 6px; padding: 0; background: #fff; }
/* 凡例はランキング表から1行ぶん空けて（シートと同じ・2026-10-22 ご指示「ここ、こんな感じでスペース開けてほしい」） */
.ck-legend { display: flex; flex-wrap: wrap; gap: 0; align-items: center; margin: 30px 0 0; font-size: 12px; }
.ck-legend b { flex-basis: 100%; margin: 0 0 6px; }
.ck-legend .ck-ph { min-width: 130px; padding: 3px 12px; border: 1px solid #9a9a9a; font-weight: 700; text-align: center; }
/* 大きな表・ランキングと、その下の「データなし」のあいだも空ける */
.ck-split { margin-bottom: 36px; }
/* サマリーの下の注釈・いちばん下の注意書き（2026-10-22） */
.ck-note { margin: 4px 0 0; font-size: 12px; color: #555; }
.ck-foot { margin-top: 24px; padding-top: 10px; border-top: 1px solid #dfe3da; }
.ck-foot .admin-note { margin: 2px 0; font-size: 12px; }
/* 班設定（2026-10-22・saiji-catch-teams.js） */
.ct-range { margin: 4px 0 8px; font-size: 13px; }
.ct-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; padding: 8px 10px; background: #fffbe6; border: 1px solid #e6d98a; border-radius: 8px; }
.ct-bar span { font-weight: 700; margin-right: auto; }
.ct-msg { min-height: 1.4em; margin: 6px 0; font-weight: 700; }
.ct-warn { margin: 6px 0; padding: 6px 10px; background: #fdecea; color: #8a1f17; border-radius: 6px; font-size: 13px; }
.ct-table select { font: inherit; font-size: 12px; padding: 2px 4px; border: 1px solid #bbb; border-radius: 4px; max-width: 160px; }
.ct-table tr.ct-dirty th, .ct-table tr.ct-dirty td { background: #fff3b0; }
.ct-since { font-size: 11px; color: #555; text-align: left !important; }
.ct-reset { margin-left: 6px; font-size: 11px; padding: 1px 6px; border: 1px solid #b3261e; color: #b3261e; background: #fff; border-radius: 4px; cursor: pointer; }
.ct-teams { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 14px; font-size: 13px; }
.ct-teams > b { margin-right: 4px; }
.ct-chip { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 10px; border: 1px solid #e3c8a8; border-radius: 999px; background: #fce5cd; color: #7a4019; font-weight: 700; }
.ct-chip small { font-weight: 400; color: #8a6040; }
.ct-chip--empty { background: #fff; border-style: dashed; }
/* 班の並びを長押しで動かす（2026-11-02）。⚠ 札の上では画面のスクロールを止める（長押しのあと動かせるように） */
.ct-chip--move { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ct-chip--move.is-drag { cursor: grabbing; transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,.25); outline: 2px solid #7a4019; position: relative; z-index: 2; }
.ct-dragging .ct-chip--move:not(.is-drag) { opacity: .7; }
.ct-sorthint { margin: -8px 0 12px; font-size: 12px; color: #6b5a48; }
.ct-add { padding: 3px 10px; border: 1px dashed #7a4019; border-radius: 999px; background: #fff; color: #7a4019; cursor: pointer; font: inherit; font-size: 13px; }
.ct-empty { text-align: left !important; color: #666; white-space: normal !important; }
.ct-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; padding: 10px 12px; border: 1px dashed #7a4019; border-radius: 8px; background: #fffaf3; font-size: 13px; }
.ct-new select { font: inherit; padding: 4px 6px; border: 1px solid #bbb; border-radius: 6px; }
.ct-table select[data-k="team"] { font-weight: 700; }
/* 班設定：見せ方の切り替え・中の枠（2026-10-22） */
.ct-view { display: inline-flex; gap: 0; align-items: center; margin: 0 0 12px; font-size: 13px; }
.ct-view b { margin-right: 8px; }
.ct-view button { padding: 5px 16px; border: 1px solid #9a9a9a; background: #fff; font: inherit; cursor: pointer; }
.ct-view button + button { border-left: none; }
.ct-view button.is-on { background: #354f3d; color: #fff; font-weight: 700; }
.ct-table .ct-subhead th { text-align: left !important; font-size: 12px; font-weight: 700; padding: 3px 10px !important; border-top: 2px solid #666; }
.ct-table select[data-k="phase"] { font-weight: 700; }

/* 【前週比】（2026-10-23・saiji-catch-compare.js）：前の期間の行は灰色の字・増減の行は太字・人の境目は太線 */
.ck-table tr.cmp-old th, .ck-table tr.cmp-old td { color: #555 !important; }
.ck-table tr.cmp-diff th, .ck-table tr.cmp-diff td { font-weight: 700; }
.ck-table tr.cmp-sep > * { border-top: 2px solid #666; }
.cmp-h-diff { background: #fff2cc !important; }

/* 本数確認用（日別・2026-10-23・saiji-catch-daily.js）。氏名と区分は横に動かしても左に残す */
.hs-wrap { max-height: 75vh; overflow: auto; }
.hs-table th, .hs-table td { padding: 2px 4px; }
.hs-table thead th { position: sticky; top: 0; z-index: 2; }
.hs-table .hs-name { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 96px; text-align: left; }
.hs-table thead .hs-name { z-index: 3; background: #f1efe8; }
.hs-table .hs-lbl { position: sticky; left: 96px; z-index: 1; min-width: 62px; font-size: 11px; font-weight: 700; }
.hs-table thead .hs-lbl { z-index: 3; background: #f1efe8; }
.hs-lbl--apo, .hs-apo { background: #e8f0fe; }
.hs-lbl--sei, .hs-sei { background: #e6f4ea; }
.hs-day { min-width: 34px; font-size: 11px; line-height: 1.15; }
.hs-day small { display: block; font-weight: 400; }
.hs-table th.hs-sat { color: #1a56c4; }
.hs-table th.hs-sun { color: #c62828; }
.hs-apo { white-space: nowrap; }
.hs-chk { margin: 0 0 0 2px; width: 12px; height: 12px; vertical-align: middle; cursor: pointer; }
.hs-table td.ck-off { background: #d9d9d9 !important; color: #888; }
.hs-x { margin-left: 2px; color: #888; font-size: 10px; }
.hs-total { min-width: 44px; font-weight: 700; background: #fff2cc; }
.hs-total--chk { background: #d9ead3; }
.hs-person tr:first-child > * { border-top: 2px solid #666; }
.hs-out-head th { text-align: left !important; background: #f4cccc; font-weight: 700; padding: 4px 8px !important; }
.hs-out .hs-name { background: #fdf2f2; }
.hs-daytotal th, .hs-daytotal td { font-weight: 700; }
.hs-daytotal tr:first-child > * { border-top: 3px double #000; }
/* 班設定の歩合（2026-10-23）：対象＝緑・対象外＝薄い黄（紙の成績表GAS と同じ色） */
.ct-comm { display: inline-block; padding: 1px 10px; border-radius: 4px; font-weight: 700; font-size: 12px; }
.ct-comm.is-on, .ct-comm-sel.is-on { background: #b7f5b7; color: #0b5e0b; }
.ct-comm.is-off, .ct-comm-sel.is-off { background: #fff2cc; color: #7a5a00; }
.ct-comm-sel { font: inherit; font-size: 12px; font-weight: 700; padding: 2px 4px; border: 1px solid #bbb; border-radius: 4px; }

/* 歩合管理（2026-10-23・saiji-catch-commission.js）。
   ⚠ 名前は ckm-（2026-11-06）。cm- は期間メンバー成績（catch-custom-view.css）と同じ名前で、週の見出しが崩れていた */
.ckm-table th, .ckm-table td { padding: 2px 6px; }
.ckm-week { min-width: 92px; font-size: 11px; }
.ckm-cell { text-align: center; font-size: 11px; line-height: 1.3; }
.ckm-cell.is-on { background: #e3fbe3; }
.ckm-cell.is-off { background: #fffaf0; }
.ckm-badge { display: inline-block; padding: 0 6px; border-radius: 3px; font-weight: 700; }
.ckm-cell.is-on .ckm-badge { background: #b7f5b7; color: #0b5e0b; }
.ckm-cell.is-off .ckm-badge { background: #fff2cc; color: #7a5a00; }
.ckm-cell small { margin-left: 4px; color: #555; }
.ckm-nums { font-variant-numeric: tabular-nums; }
.ckm-table .ckm-on { background: #e3fbe3; font-weight: 700; text-align: right; }
.ckm-table .ckm-off { background: #fff8e1; text-align: right; }
.ckm-table thead .ckm-on, .ckm-table thead .ckm-off { text-align: center; }

/* キャッチャー成績：歩合対象の人の名前は緑（2026-10-23・GAS の #00ff00） */
.catch-results-view .cc-table .cc-comm, .cr-comm-sample { background: #00ff00; color: #111; }
.cr-comm-sample { padding: 0 6px; font-weight: 700; }

/* 本数確認用：歩合対象外の週の日（班設定で決まる・2026-10-23） */
.hs-table td.ck-noncomm { background: repeating-linear-gradient(135deg, #e6e6e6 0 6px, #d4d4d4 6px 12px) !important; color: #777; }

/* 本数確認用：対象外の日を手で入れた日（薄い緑）・フェーズの見出し（2026-10-23） */
.hs-table td.ck-addon { background: #d7f7d7 !important; }
.hs-phase-head th { text-align: left !important; font-weight: 700; padding: 4px 10px !important; border-top: 3px solid #333; }

/* ---- 出勤日数調整（2026-10-23・saiji-catch-adjust.js）：紙のシートと同じ「出勤 −0.5 ／ 出勤 ＋0.5」の2つの表 ---- */
.ca-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 10px 0 6px; padding: 12px; border: 1px solid #ddd; border-radius: 8px; background: #fafafa; }
.ca-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.ca-form select, .ca-form input { font: inherit; font-weight: 400; padding: 6px 8px; border: 1px solid #bbb; border-radius: 6px; min-height: 36px; }
.ca-note-in input { width: 220px; }
.ca-btns { display: flex; gap: 8px; }
.ca-minus-btn { background: #fde2e1; border-color: #e3a4a0; }
.ca-plus-btn { background: #dff3e4; border-color: #9fd0ac; }
.ca-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 8px; }
.ca-table th, .ca-table td { padding: 3px 12px; }
.ca-table .ca-minus { background: #fde2e1 !important; }
.ca-table .ca-plus { background: #dff3e4 !important; }
.ca-note { text-align: left !important; max-width: 220px; white-space: normal !important; }
.ca-empty { color: #777 !important; padding: 8px 12px !important; }
.ca-del { font: inherit; font-size: 12px; padding: 2px 8px; border: 1px solid #c99; color: #a33; background: #fff; border-radius: 4px; cursor: pointer; }

/* キャッチャー成績：日報・勤怠をシートから取り込むボタン（2026-10-27・saiji-sheet-import.js・一時的なもの） */
.csi { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin: 0 0 10px; }
.csi-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 10px; border: 1px dashed #c9a227; border-radius: 8px; background: #fffbea; }
.csi-lead { font-size: 12px; font-weight: 700; color: #7f6000; }
.csi-btn { font-size: 13px; padding: 6px 12px; }
.csi-msg { max-width: 640px; font-size: 12.5px; text-align: right; }
.csi-msg p { margin: 0; }
.csi-msg.is-ok { color: #1f5c32; }
.csi-msg.is-err { color: #b42318; font-weight: 700; }
.csi-more { text-align: left; margin-top: 4px; }
.csi-more p { margin: 4px 0 0; font-size: 12px; color: #444; }

/* まとまり（上の段・2026-11-06）。下の段（.catch-count-tabs）はその中の項目 */
.catch-count-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.catch-count-groups button { font: inherit; font-size: 14px; font-weight: 700; padding: 8px 16px; min-height: 40px; border: 1px solid #b9c2b6; border-radius: 8px 8px 0 0; border-bottom-width: 3px; background: #f3f5f0; color: #354638; cursor: pointer; }
.catch-count-groups button[aria-pressed="true"] { background: #354f3d; border-color: #354f3d; color: #fff; }
.catch-count-groups button:focus-visible { outline: 3px solid #92723b; outline-offset: 2px; }
.catch-count-groups + .catch-count-tabs { margin-top: 0; padding: 8px; background: #f3f5f0; border: 1px solid #dfe4dc; border-radius: 0 8px 8px 8px; }
.catch-count-tabs button[hidden] { display: none; }
@media (max-width: 600px) {
  .catch-count-groups button { flex: 1 1 45%; font-size: 13px; padding: 8px 10px; border-radius: 8px; border-bottom-width: 1px; }
  .catch-count-groups + .catch-count-tabs { margin-top: 6px; border-radius: 8px; }
}

/* 歩合管理（2026-11-06） */
.pay-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pay-head .admin-h3 { margin: 0; }
.ckm-find { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 10px; font-size: 13px; }
.ckm-find input { font: inherit; padding: 6px 10px; min-height: 36px; width: 14em; max-width: 100%; border: 1px solid #c9cfc6; border-radius: 6px; }
.ckm-find__n { color: #566254; }
/* 本数確認用・歩合管理：キャッチャー／その他のタブと名前で探す（2026-11-06） */
.ckd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 10px; }
.ckd-bar .ckm-find { margin: 0; }
.ckd-tabs { display: inline-flex; border: 1px solid #b9c2b6; border-radius: 8px; overflow: hidden; }
.ckd-tabs button { font: inherit; font-size: 13px; font-weight: 700; padding: 7px 16px; min-height: 36px; border: 0; background: #fff; color: #354638; cursor: pointer; }
.ckd-tabs button + button { border-left: 1px solid #b9c2b6; }
.ckd-tabs button[aria-selected="true"] { background: #354f3d; color: #fff; }
.ckd-tabs button:focus-visible { outline: 3px solid #92723b; outline-offset: -3px; }
/* 歩合管理を日ごとに（2026-11-09） */
.ckm-day { min-width: 38px; font-size: 11px; line-height: 1.2; }
.ckm-day small { display: block; font-size: 10px; font-weight: 400; }
.ckm-dcell { text-align: center; font-size: 11px; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; padding: 2px 3px; }
.ckm-dcell small { display: block; font-size: 10px; color: #566254; }
.ckm-legend { font-size: 12px; color: #566254; margin: 4px 0 6px; }
.ckm-legend .ckm-cell { display: inline-block; padding: 0 6px; border-radius: 3px; font-weight: 700; }
.ckm-table--day .hs-sat { color: #1a56b0; }
.ckm-table--day .hs-sun { color: #c0392b; }
.ckd-tabs button[aria-pressed="true"] { background: #354f3d; color: #fff; }

/* 日ごとの役割確認。黄色の除外と赤い警告は併記できる。 */
.ckm-table .ckm-cell.has-role-mismatch { background:#fff1f2; box-shadow:inset 0 0 0 2px #d92d20; }
.ckm-table .ckm-cell.is-acting { background:#fff1a8; color:#713f12; }
.ckm-table .ckm-acting-label { color:#713f12; font-weight:700; }
.ckm-role-warning, .ckm-name-warning { color:#b42318; font-size:11px; white-space:normal; }
.ckm-role-warning summary, .ckm-name-warning summary { cursor:pointer; font-weight:700; }
.ckm-name-warning { margin-top:4px; }

/* 歩合・本数確認：見出し固定と表をつかむ移動 */
#catch-commission .ckm-scroll { max-height: 65vh; overflow: auto; scrollbar-gutter: stable; cursor: grab; border: 1px solid #c9cfc6; }
#catch-commission .ckm-scroll:focus-visible { outline: 2px solid #246c52; outline-offset: 2px; }
#catch-commission .ckm-scroll.is-dragging { cursor: grabbing; user-select: none; }
#catch-commission .ckm-table { border-collapse: separate; border-spacing: 0; }
#catch-commission .ckm-table thead { position: sticky; top: 0; z-index: 3; background: #f1efe8; }
#catch-commission .ckm-table .hs-name { position: sticky; left: 0; z-index: 2; min-width: 110px; max-width: 160px; background: #fff; text-align: left; box-shadow: 1px 0 #c9cfc6; }
#catch-commission .ckm-table thead .hs-name { z-index: 4; background: #f1efe8; }
#catch-commission .ckm-table .ck-total .hs-name { background: #f1efe8; }
.ckm-scroll-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 8px 0; font-size: 12px; color: #566254; }
.ckm-scroll-tools > div { display: flex; gap: 6px; }
.ckm-scroll-tools button { padding: 5px 12px; min-height: 34px; background: #fff; border: 1px solid #b8c8bd; border-radius: 6px; color: #245540; cursor: pointer; }
.ckm-scroll-tools button:hover { background: #edf5ef; }
@media (pointer: coarse) { .ckm-scroll-tools > span { display: none; } }

.ckm-complete { display: flex; justify-content: flex-end; margin: 8px 0 12px; }
.ckm-complete__link { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border-radius: 7px; background: #1c6048; color: #fff; font-weight: 700; text-decoration: none; }
.ckm-complete__link:hover { background: #144b38; }
.ckm-complete__link:focus-visible { outline: 3px solid #b49135; outline-offset: 3px; }

.ckm-complete { gap: 8px; align-items: center; }
.ckm-complete__link { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.ckm-complete__link:disabled { opacity: .5; cursor: not-allowed; }
.ckm-confirmation { padding: 8px 12px; background: #edf6ef; color: #245540; border-radius: 6px; }
/* CL候補の一覧：班・フェーズ設定と共通の表・見せ方・変更バー。 */
.cl-promotions-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.cl-promotions-tools label { font-size: 13px; }
.cl-promotions-table input { box-sizing: border-box; width: 145px; max-width: 100%; font: inherit; padding: 4px 6px; border: 1px solid #bbb; border-radius: 4px; background: #fff; }
.cl-promotions-table input[type="text"] { width: 210px; }
.cl-promotions-table input:disabled { color: #444; background: #f5f5f5; opacity: 1; }
/* メンバー・役職設定 */
.mr-tabs { display:flex; flex-wrap:wrap; }
.mr-name { border:0; padding:3px 0; background:none; color:#245d48; font:inherit; font-weight:700; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.mr-table input[type="date"] { display:block; padding:4px 6px; border:1px solid #bbb; border-radius:4px; font:inherit; width:150px; background:#fff; }
.mr-weekday,.mr-scheduled,.mr-error { display:block; font-size:11px; margin-top:4px; }
.mr-scheduled { color:#795a12; }
.mr-error { color:#982d28; white-space:normal; min-width:150px; }
.mr-heading { margin:4px 0 14px; font-size:18px; color:#354f3d; }
.mr-summary { margin:15px 0 8px; font-size:13px; font-weight:700; }
.mr-history-table { min-width:760px; width:100%; }
.mr-pending td,.mr-pending th { background:#fff9e9; }
.mr-dialog { width:980px; max-width:calc(100vw - 32px); max-height:calc(100vh - 48px); box-sizing:border-box; border:1px solid #d7dfd3; border-radius:12px; padding:24px; color:#263c2c; box-shadow:0 24px 70px #15291d44; }
.mr-dialog::backdrop { background:#263b3266; }
.mr-dialog-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:18px; }
.mr-dialog-head h3 { margin:0 0 8px; font-size:21px; }
.mr-dialog-head p { margin:0; font-size:13px; color:#61705c; }
.mr-dialog .mr-history-table { min-width:640px; }
.mr-dialog .ck-wrap { overflow:auto; }

.ct-remove { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 3px; font-size: 18px; line-height: 1; }
