* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  margin: 0; background: #f5f5f7; color: #1d1d1f; padding: 24px;
}
.hidden { display: none !important; }
.muted { color: #86868b; font-size: 14px; }
.error { color: #c62828; }
h1 { font-size: 22px; }
h2 { font-size: 18px; margin-top: 28px; }

.card {
  max-width: 380px; margin: 80px auto; background: #fff; padding: 28px;
  border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 12px;
}
.card input { padding: 12px; font-size: 16px; border: 1px solid #d2d2d7; border-radius: 10px; }

button {
  padding: 10px 18px; font-size: 15px; border: none; border-radius: 10px;
  background: #0071e3; color: #fff; cursor: pointer;
}
button:hover { filter: brightness(1.05); }
button.ghost { background: #e8e8ed; color: #1d1d1f; }
button:disabled { opacity: .5; cursor: not-allowed; }

.topbar { display: flex; justify-content: space-between; align-items: center; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 20px 0; }
.controls select { padding: 8px; border-radius: 8px; border: 1px solid #d2d2d7; }

.problems { margin: 12px 0; }
.ok { color: #1b7a37; font-weight: 600; }
.warn-head { color: #b35309; font-weight: 700; margin-bottom: 6px; }
.warn-row { background: #fff4e5; border-left: 4px solid #f59e0b; padding: 8px 12px; margin-bottom: 4px; border-radius: 6px; font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #fafafa; font-weight: 600; }
tr.bad td { background: #fff4e5; }
.badge { background: #f59e0b; color: #fff; padding: 2px 8px; border-radius: 999px; font-size: 12px; }

.hint { margin: -8px 0 12px; }
.hint b { color: #0071e3; }

/* ---- 月間グリッド（Clouza風） ---- */
table.grid { font-size: 13px; }
table.grid th, table.grid td {
  padding: 4px 6px; text-align: center; border: 1px solid #e3e3e6; white-space: nowrap;
}
table.grid th { background: #fafafa; }
table.grid td.num { font-weight: 600; width: 32px; }
.sun { color: #c62828; }
.sat { color: #1565c0; }
table.grid tr.bad td.tot { color: #b35309; }

/* 時刻セル＝input[type=time]。通常は文字に見せ、修正中だけ枠を出す */
input.t {
  width: 78px; padding: 3px 2px; font-size: 13px; text-align: center;
  border: 1px solid transparent; background: transparent; border-radius: 6px;
  color: #1d1d1f; font-variant-numeric: tabular-nums; -webkit-appearance: none;
}
input.t:disabled { color: #1d1d1f; opacity: 1; -webkit-text-fill-color: #1d1d1f; }
input.t:not(:disabled) { border-color: #0071e3; background: #fff; }
input.t.corrected { color: #b35309; font-weight: 600; -webkit-text-fill-color: #b35309; }
/* 空セルは表示中だけ '--:--' を隠す（修正中＝有効化されたら出す） */
input.t.empty:disabled { color: transparent; -webkit-text-fill-color: transparent; }

td.miss { background: #ffe2e2; }
tr.editing td { background: #eef6ff; }
tr.editing td.miss { background: #ffd9d9; }

.fixcol { min-width: 130px; text-align: center; }
.fix { font-size: 12px; cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 3px; }
.save { padding: 4px 10px; font-size: 12px; margin-left: 6px; }
