/* SOLVLET — Lab / 民泊清掃ボード
   Page-only additions. Colours come only from the tokens in /style.css,
   so dark mode follows by itself. No animation anywhere. */

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

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

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

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

/* ---- 見る月（年と月の select を 2 つ） ---- */

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

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

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

.mp-table,
.mp-plan {
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.mp-table { width: 100%; table-layout: auto; }
.mp-table--rooms { min-width: 20rem; max-width: 30rem; }
.mp-table--staff { min-width: 14rem; max-width: 20rem; }
.mp-table--books { min-width: 40rem; max-width: 48rem; }

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

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

.mp-table .mp-r { text-align: right; }
.mp-table .mp-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. */
.mp-table--rooms th:nth-child(2) { width: 9em; }
.mp-table--rooms th:nth-child(3),
.mp-table--rooms td:nth-child(3),
.mp-table--staff th:nth-child(2),
.mp-table--staff td:nth-child(2) { width: 1%; white-space: nowrap; }

.mp-table--books th:nth-child(2),
.mp-table--books th:nth-child(3) { width: 9.5em; }
.mp-table--books th:nth-child(4) { width: 6.5em; }
.mp-table--books th:nth-child(5),
.mp-table--books td:nth-child(5),
.mp-table--books th:nth-child(6),
.mp-table--books td:nth-child(6) { width: 1%; white-space: nowrap; }

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

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

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

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

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

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

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

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

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

.mp-plan { width: 100%; min-width: 34rem; max-width: 48rem; }
.mp-plan--each { min-width: 24rem; max-width: 30rem; }

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

.mp-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);
}
.mp-warn li + li { margin-top: 0.15rem; }

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