/* SOLVLET — Lab / 法要・親戚手帳
   Page-only additions. Colours come only from the tokens in /style.css,
   so dark mode follows by itself. No animation anywhere. */

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

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

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

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

/* ---- 年 ---- */

.ho-year { max-width: 12rem; }

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

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

.ho-table,
.ho-plan {
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.ho-table { width: 100%; max-width: 48rem; table-layout: auto; }
.ho-table--dead { min-width: 26rem; max-width: 36rem; }
.ho-table--people { min-width: 36rem; }
.ho-table--gifts { min-width: 40rem; }

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

.ho-table td {
  padding: 0.25rem 0.5rem 0.25rem 0;
  vertical-align: middle;
}

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

/* Column widths live on the static <th>s; the name column takes the
   rest, the checkbox and delete columns are shrink-wrapped. */
.ho-table--dead th:nth-child(2) { width: 7em; }
.ho-table--dead th:nth-child(3) { width: 10em; }
.ho-table--dead th:nth-child(4),
.ho-table--dead td:nth-child(4) { width: 1%; white-space: nowrap; }

.ho-table--people th:nth-child(2) { width: 7em; }
.ho-table--people th:nth-child(3) { width: 7.5em; }
.ho-table--people th:nth-child(4),
.ho-table--people td:nth-child(4),
.ho-table--people th:nth-child(5),
.ho-table--people td:nth-child(5),
.ho-table--people th:nth-child(6),
.ho-table--people td:nth-child(6) { width: 1%; white-space: nowrap; }

.ho-table--gifts th:nth-child(1) { width: 9.5em; }
.ho-table--gifts th:nth-child(3) { width: 7em; }
.ho-table--gifts th:nth-child(4) { width: 7.5em; }
.ho-table--gifts th:nth-child(5),
.ho-table--gifts td:nth-child(5),
.ho-table--gifts th:nth-child(6),
.ho-table--gifts td:nth-child(6) { width: 1%; white-space: nowrap; }

.ho-table .field { width: 100%; min-width: 4.2em; padding-inline: 0.4rem; }
.ho-table [data-field="name"] { min-width: 7em; }
.ho-table [data-field="rel"] { min-width: 5.5em; }
.ho-table [data-field="kind"] { min-width: 5.5em; }
.ho-table [data-field="amount"] { min-width: 6.5em; text-align: right; }
.ho-table .field[type="date"] { min-width: 8.5em; }
.ho-table select.field { min-width: 5.5em; }

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

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

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

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

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

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

.ho-empty,
.ho-none {
  max-width: var(--measure);
  color: var(--ink-muted);
}

.ho-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;
}
.ho-summary p { margin: 0; }
.ho-summary > * + * { margin-top: 0.5rem; }
.ho-summary__total { font-weight: 600; }

.ho-plan { width: 100%; min-width: 30rem; max-width: 48rem; }

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

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

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