:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #1d2330; --muted: #5d6676;
  --line: #dde1e8; --accent: #1f6feb; --accent-weak: #e8f0fe; --error: #c62828;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --card: #1b2029; --text: #e6e9ef; --muted: #9aa3b2;
    --line: #2d3442; --accent: #6ea8ff; --accent-weak: #1d2a40; --error: #ff7b7b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
}
.top, main, .foot { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: 24px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
input, select {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 8px; }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--accent); margin-bottom: 8px; }
.note { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
.error { color: var(--error); font-weight: 600; }
.shift { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; position: relative; }
.shift-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shift-grid label.chk { flex-direction: row; align-items: center; gap: 6px; }
.shift-grid label.chk input { width: auto; }
@media (max-width: 520px) { .shift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
button {
  font: inherit; border-radius: 8px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
button.sub { background: var(--accent-weak); color: var(--accent); }
button.del { margin-top: 8px; background: transparent; color: var(--muted); border-color: var(--line); padding: 4px 10px; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.total { font-size: 1.8rem; font-weight: 700; margin: 0; }
.total small { font-size: .9rem; font-weight: 400; color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .9rem; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: right; }
th:first-child, td:first-child { text-align: left; }
.tbl { overflow-x: auto; }
.wall { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wall:last-child { border-bottom: 0; }
.bar { height: 8px; background: var(--accent-weak); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.foot { padding-bottom: 32px; }
.foot a { color: var(--accent); }
article h2 { margin-top: 24px; }
.tbl.txt th, .tbl.txt td { text-align: left; }
input[type="time"], input[type="date"] { min-width: 0; }
.month { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.month-head strong { font-size: 1.1rem; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; }
.mgrid > div { background: var(--bg); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; }
.mgrid span { font-size: .78rem; color: var(--muted); }
.mgrid b { font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 520px) { .shift-grid label:first-child { grid-column: 1 / -1; } }
