/* #25 資金繰り表：答えは文なので大きさを下げる。月ごとの表は幅が要るので、くわしい条件を開いたら1列にする */
#result .ks-ans-big b { font-size: 26px; letter-spacing: 0; line-height: 1.35; }
@media (max-width: 420px) { #result .ks-ans-big b { font-size: 22px; } }
@media (min-width: 861px) { .tool-layout:has(#more[open]) { grid-template-columns: 1fr; } }

/* 入力の表 */
.bs-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.bs-grid th, .bs-grid td { padding: 4px; border-bottom: 1px solid var(--grid); background: var(--surface); text-align: left; font-weight: 400; white-space: nowrap; vertical-align: middle; }
.bs-grid thead th { font-weight: 600; color: var(--ink-2); }
.bs-grid .bs-head { position: sticky; left: 0; z-index: 1; min-width: 9.5em; max-width: 12em; white-space: normal; line-height: 1.4; }
.bs-grid .bs-head small { display: block; font-size: 11px; color: var(--muted); }
.bs-grid .bs-group th { padding-top: 10px; font-weight: 600; color: var(--accent); }
.bs-cell { width: 6.8em; height: 36px; padding: 0 6px; font: inherit; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; }
.bs-cell.bs-text { width: 9em; text-align: left; }
.bs-cell:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.bs-cell.bad { border-color: var(--s2); border-width: 2px; }
@media (max-width: 560px) { .bs-cell { font-size: 16px; } }

/* 保存と CSV */
.bs-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.bs-btn { display: inline-block; min-height: 40px; padding: 8px 14px; font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--accent); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; }
.bs-btn:hover { background: var(--accent-soft); }
.bs-btn:focus-visible, .bs-file:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.bs-btn[hidden] { display: none; }
.bs-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* 足りない月 */
table.data td.bs-short { font-weight: 700; color: var(--ink); }
table.data td.bs-short small { display: block; font-weight: 600; font-size: 11px; color: var(--ink-2); }
