/* SOLVLET — Lab / 月謝台帳
   Page-only additions. Colours come only from the tokens in /style.css,
   so dark mode follows by itself. No animation anywhere. */

.gs-block {
  max-width: var(--frame);
  margin: 0 0 clamp(2rem, 5vw, 2.75rem);
}

.gs-h {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.gs-h--sub {
  margin-top: 1.75rem;
  font-size: 1rem;
}

.gs-help {
  max-width: var(--measure);
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.gs-label {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ---- 見る月: year + month selects side by side ---- */

.gs-ym {
  display: inline-flex;
  gap: 0.25rem;
}
.gs-ym .field {
  width: auto;
  min-width: 0;
  padding-inline: 0.4rem;
}

/* ---- 発表会: two short fields ---- */

.gs-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.gs-field { margin: 0; }
.gs-field .field { width: auto; min-width: 8.5em; }
.gs-field [data-field="fee"] { width: 8em; text-align: right; }

/* ---- 入力の表 ---- */

.gs-scroll {
  position: relative; /* keeps the hidden .vh headers inside the scroll box */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
}

.gs-table,
.gs-plan {
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.gs-table { width: 100%; table-layout: auto; }
.gs-table--students { min-width: 66rem; }

.gs-table th,
.gs-plan th {
  padding: 0.25rem 0.5rem 0.25rem 0;
  font-weight: 500;
  text-align: left;
  color: var(--ink-muted);
  white-space: nowrap;
}
.gs-table th {
  vertical-align: bottom;
  line-height: 1.4;
}

.gs-table td {
  padding: 0.25rem 0.5rem 0.25rem 0;
  vertical-align: middle;
}
.gs-table th:last-child,
.gs-table td:last-child { padding-right: 0; }

.gs-table .gs-r { text-align: right; }
.gs-table .gs-c { text-align: center; }

/* Checkbox and delete columns are shrink-wrapped; 曲目 takes the rest. */
.gs-table--students th:nth-child(4),
.gs-table--students td:nth-child(4),
.gs-table--students th:nth-child(7),
.gs-table--students td:nth-child(7),
.gs-table--students th:nth-child(8),
.gs-table--students td:nth-child(8),
.gs-table--students th:nth-child(10),
.gs-table--students td:nth-child(10) { width: 1%; white-space: nowrap; }

.gs-table .field { width: 100%; min-width: 4em; padding-inline: 0.4rem; }
.gs-table [data-field="name"] { min-width: 6.5em; }
.gs-table [data-field="fee"] { min-width: 5.5em; text-align: right; }
.gs-table [data-field="pay"] { min-width: 9em; }
.gs-table [data-field="tix"] { min-width: 3.75em; }
.gs-table [data-field="piece"] { min-width: 10em; }
.gs-table .field[type="date"] { min-width: 8.5em; }

.gs-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}
.gs-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--accent);
}
.gs-check input:disabled { cursor: default; }

/* ---- 操作 ---- */

.gs-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 clamp(2rem, 5vw, 2.75rem);
}
.gs-actions .btn { white-space: nowrap; }
.gs-block > .btn { white-space: nowrap; }

.gs-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent-ink);
}
.gs-status:empty { display: none; }

/* Off-screen box for the copy fallback. */
.gs-clip {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---- 結果 ---- */

.gs-empty,
.gs-none {
  max-width: var(--measure);
  color: var(--ink-muted);
}
.gs-none { margin: 0 0 1rem; font-size: 0.95rem; }

.gs-summary {
  max-width: 40rem;
  margin: 0 0 1.25rem;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.gs-summary p { margin: 0; }
.gs-summary > * + * { margin-top: 0.5rem; }
.gs-summary__total { font-weight: 600; }

.gs-plan { width: 100%; min-width: 28rem; max-width: 44rem; }
.gs-plan--unpaid { min-width: 22rem; max-width: 34rem; }

.gs-plan th,
.gs-plan td {
  padding: 0.45rem 1rem 0.45rem 0;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.gs-plan thead th { padding-top: 0.25rem; vertical-align: bottom; line-height: 1.4; }
.gs-plan tbody th,
.gs-plan td { border-top: 1px solid var(--rule); }
.gs-plan tbody th { color: var(--ink); font-weight: 500; }
.gs-plan td { color: var(--ink); }
.gs-plan .gs-r { text-align: right; }
.gs-plan .gs-muted { color: var(--ink-muted); }
.gs-plan .gs-wrap { white-space: normal; }
.gs-plan th:last-child,
.gs-plan td:last-child { padding-right: 0; }

/* お知らせの文面: one quiet box per student. */
.gs-letters {
  max-width: var(--measure);
  margin: 0 0 1rem;
}
.gs-letter {
  margin: 0;
  padding: 0.9rem 1rem;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink);
}
.gs-letter + .gs-letter { margin-top: 0.5rem; }

.gs-rec-line {
  max-width: var(--measure);
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
#gs-rec-sum { font-weight: 600; }

.gs-warn {
  max-width: var(--measure);
  margin: 0 0 1rem;
  padding: 0 0 0 1.2em;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-ink);
}
.gs-warn li + li { margin-top: 0.15rem; }

.gs-plan .is-over,
.is-over { color: var(--accent-ink); font-weight: 600; }
