/* 分散とデータの整合。style.css・flow.css・cm.css の上に重ねる（接頭辞 cs-） */
.cs-h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.cs-nl { display: block; margin: 6px 0 0; }
.cs-tips { margin-top: 12px; }
.cs-tnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* 操作の枠 */
.cs-ctl { padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; }
.cs-crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cs-lab { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 5em; }
.cs-scene { margin: 0; font-size: 13px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 11px; }

/* 送信箱の体験 */
.cs-ob { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: start; }
.cs-obseq, .cs-obmx, .cs-odres, .cs-sgsteps, .cs-sgask, .cs-sglog { padding: 12px 14px; min-width: 0; }
.cs-seq { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: cs; }
.cs-st { display: grid; grid-template-columns: 22px 6.5em minmax(0, 1fr); gap: 0 8px; align-items: baseline; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; background: var(--any-bg); border: 1px solid var(--line2); }
.cs-st b { font-size: 12px; color: var(--muted); }
.cs-sm { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; align-self: center; }
.cs-m-ok .cs-sm { background: #dcfce7; color: #15803d; }
.cs-m-ng { background: #fef2f2; border-color: #fecaca; }
.cs-m-ng .cs-sm { background: #fee2e2; color: #b91c1c; }
.cs-m-crash { background: #fff7ed; border-color: #fed7aa; }
.cs-m-crash .cs-sm { background: #ea580c; color: #fff; }
.cs-m-warn .cs-sm { background: #fef3c7; color: #b45309; }
.cs-verdict { margin-top: 10px; }
.cs-v { margin: 0; border-radius: 10px; padding: 9px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.cs-v b { font-size: 15px; }
.cs-v.cs-ok { background: #f0fdf4; color: #14532d; }
.cs-v.cs-ng { background: #fef2f2; color: #7f1d1d; }
.cs-mwhat { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.cs-tbl { font-size: 12.5px; }
.cs-tbl th, .cs-tbl td { padding: 6px 8px; }
.cs-tbl th small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.cs-mx { min-width: 620px; }
.cs-mx tbody th { white-space: normal; min-width: 11em; }
.cs-cell { appearance: none; font: inherit; font-size: 12px; font-weight: 700; width: 100%; text-align: center; cursor: pointer; border-radius: 8px; padding: 6px 4px; border: 1px solid transparent; }
.cs-cell.cs-ok { background: #f0fdf4; color: #14532d; }
.cs-cell.cs-ng { background: #fef2f2; color: #991b1b; }
.cs-cell:hover { border-color: #94a3b8; }
.cs-cell[aria-pressed="true"] { border-color: #0f172a; box-shadow: inset 0 0 0 1px #0f172a; }
.cs-year { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.cs-year > p { margin: 0 0 8px; font-size: 12.5px; color: var(--ink2); }
.cs-ykpi { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cs-ykpi div { border-radius: 10px; padding: 7px 10px; border: 1px solid var(--line); background: var(--any-bg); min-width: 0; }
.cs-ykpi dt { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cs-ykpi dd { margin: 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cs-ykpi .cs-ok { background: #f0fdf4; border-color: #bbf7d0; }
.cs-ykpi .cs-ng { background: #fef2f2; border-color: #fecaca; }
.cs-ykpi .cs-ng dd { color: #7f1d1d; }

/* 入れ替わりの練習 */
.cs-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cs-msgs li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 8px; align-items: baseline; font-size: 13px; }
.cs-msgs li small { grid-column: 2; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-mv { width: 22px; height: 22px; border-radius: 50%; background: #0f172a; color: #fff; font: 600 12px/22px var(--latin); text-align: center; align-self: center; }
.cs-odtbl { min-width: 760px; }
.cs-odtbl tbody th { min-width: 12em; }
.cs-ord { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cs-odtbl thead th { white-space: nowrap; }
.cs-mk { font-weight: 700; text-align: center !important; }
.cs-why { min-width: 16em; color: var(--ink2); }
.cs-tbl tr.cs-okr .cs-mk { color: #15803d; }
.cs-tbl tr.cs-ngr th, .cs-tbl tr.cs-ngr td { background: #fef2f2; }
.cs-tbl tr.cs-ngr .cs-mk { color: #b91c1c; }
.cs-sum { margin: 10px 0 0; font-size: 13px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 11px; }

/* Saga を 1 歩ずつ */
.cs-sg { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.cs-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cs-step { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--paper); }
.cs-step.cs-next { border-color: #15803d; box-shadow: inset 0 0 0 1px #15803d; }
.cs-step.cs-s-done { background: #f7fef9; }
.cs-step.cs-s-fail { background: #fef2f2; border-color: #fecaca; }
.cs-step.cs-s-undone { background: #fff7ed; border-color: #fed7aa; }
.cs-sn { width: 24px; height: 24px; border-radius: 50%; background: var(--line2); color: var(--ink2); font: 600 12px/24px var(--latin); text-align: center; }
.cs-s-done .cs-sn { background: #15803d; color: #fff; }
.cs-s-fail .cs-sn { background: #b91c1c; color: #fff; }
.cs-s-undone .cs-sn { background: #ea580c; color: #fff; }
.cs-stb { min-width: 0; }
.cs-sh { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.cs-sw { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.cs-sst { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cs-s-done .cs-sst { color: #15803d; }
.cs-s-fail .cs-sst { color: #b91c1c; }
.cs-s-undone .cs-sst { color: #c2410c; }
.cs-kind { font-style: normal; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 0 7px; white-space: nowrap; }
.cs-k-comp { background: #e0f2fe; color: #075985; }
.cs-k-pivot { background: #fee2e2; color: #991b1b; }
.cs-k-retry { background: #dcfce7; color: #166534; }
.cs-key { margin: 10px 0 0; display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); }
.cs-key span { display: flex; align-items: center; gap: 6px; }
.cs-sgside { display: grid; gap: 10px; min-width: 0; }
.cs-q { margin: 0 0 8px; font-size: 13px; color: var(--ink2); }
.cs-opts { display: grid; gap: 5px; }
.cs-opt { appearance: none; font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.cs-opt:hover { border-color: #94a3b8; }
.cs-opt[aria-pressed="true"] { background: var(--line2); border-color: #94a3b8; }
.cs-fb { margin-top: 10px; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; }
.cs-fb p { margin: 0 0 4px; }
.cs-fb.cs-ok { background: #f0fdf4; color: #14532d; }
.cs-fb.cs-ng { background: #fef2f2; color: #7f1d1d; }
.cs-fb .srcl, .cs-fb .cm-go { margin: 4px 0 0; }
.cs-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 300px; overflow-y: auto; }
.cs-log li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; font-size: 12.5px; color: var(--ink2); padding: 3px 6px; border-radius: 6px; }
.cs-ln { font: 600 11px/18px var(--latin); color: var(--muted); text-align: right; }
.cs-l-ok { background: #f7fef9; }
.cs-l-ng { background: #fef2f2; color: #7f1d1d !important; }
.cs-l-warn { background: #fffbeb; }
.cs-l-comp { background: #fff7ed; }
.cs-l-none { display: block !important; color: var(--muted) !important; }

/* 残す形 */
.cs-tpls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; align-items: start; }
.cs-tpl { padding: 12px 14px; min-width: 0; }
.cs-tpl-wide { grid-column: 1 / -1; }
.cs-tplh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cs-tplh .cs-h4 { margin: 0; }
.cs-ltbl { min-width: 1200px; }
.cs-ltbl td { min-width: 6em; }
.cs-pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 9px 11px; font: 500 11.5px/1.6 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 460px; overflow-y: auto; }

.cs-cell:focus-visible, .cs-opt:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .cs-ob, .cs-sg, .cs-tpls { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cs-ykpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-st { grid-template-columns: 22px minmax(0, 1fr); }
  .cs-st > span:last-child { grid-column: 2; }
  .cs-st b { grid-column: 2; }
  .cs-lab { min-width: 0; width: 100%; }
  .cs-step { grid-template-columns: 26px minmax(0, 1fr); }
  .cs-sst { grid-column: 2; }
}
