/* Excel・CSV（設計図 §6.5）。格子は自前でスクロールし、列名・行番号と（固定時）1行目・左端の列を貼り付ける */
.sv { height: var(--view-h); display: flex; flex-direction: column; --sz: 1; --hh: 0px; --rw: 0px; }
.sv-grid { flex: 1; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; position: relative; background: var(--bg); }
.sg { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: calc(var(--fs) * .8 * var(--sz)); line-height: 1.45; }
.sg th, .sg td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .4em .6em; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; background: var(--surface); vertical-align: top; }
.sg thead th { position: sticky; top: 0; z-index: 3; background: var(--th-bg); color: var(--sub); font-weight: 500; text-align: center; font-size: .82em; }
.sg tbody th { position: sticky; left: 0; z-index: 2; background: var(--th-bg); color: var(--sub); font-weight: 500; text-align: right; font-size: .82em; }
.sg thead th:first-child { left: 0; z-index: 5; }
.sg td { cursor: pointer; }
.sg td.n { text-align: right; font-variant-numeric: tabular-nums; }
.sg td.f { color: var(--sub); font-family: var(--mono); font-size: .9em; }
.freeze .sg tr.r1 > td { position: sticky; top: var(--hh); z-index: 2; background: var(--th2-bg); font-weight: 600;
  box-shadow: 0 1px 0 var(--line-strong); }
.freeze .sg td.c1 { position: sticky; left: var(--rw); z-index: 1; background: var(--th2-bg); box-shadow: 1px 0 0 var(--line-strong); }
.freeze .sg tr.r1 > td.c1 { z-index: 4; }
.sv-more { position: sticky; left: 0; display: block; min-height: 44px; margin: 12px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; }
.sv-note { position: sticky; left: 0; margin: 0; padding: 10px 14px; font-size: 12px; color: var(--sub); }
.sv-name { max-width: 9em; }
