:root {
  --bg: #f7f5ef;
  --card: #ffffff;
  --text: #2b2a26;
  --muted: #6b675d;
  --accent: #4f7a3a;
  --accent-dark: #3c5f2b;
  --border: #ddd8cb;
  --danger: #b4432f;
  --admin: #8a5a1f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--accent); color: #fff;
}
.site-header a.brand { color: #fff; text-decoration: none; font-weight: bold; }
.logout { display: flex; align-items: center; gap: 8px; margin: 0; }
.who { font-size: 14px; opacity: .9; }
.link-btn { background: none; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 6px; padding: 4px 10px; font-size: 14px; cursor: pointer; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
a { color: var(--accent-dark); }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 14px 16px; margin: 10px 0; font-size: 1.05rem; font-weight: bold; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: #fff; color: var(--accent-dark); border: 2px solid var(--accent); }
.btn.admin { background: var(--admin); }
.btn.danger { background: var(--danger); }
.btn-row { display: flex; gap: 12px; }
.btn-small { border: none; border-radius: 6px; padding: 6px 12px; font-size: .9rem; color: #fff; cursor: pointer; white-space: nowrap; }
.btn-small.danger { background: var(--danger); }
.btn-row .btn { flex: 1; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin: 12px 0; }
.field { display: block; font-weight: bold; margin: 14px 0 4px; }
input[type=text], input[type=password], input[type=date], select, textarea {
  width: 100%; font-size: 16px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
textarea { min-height: 160px; }
.radio-row { display: flex; gap: 24px; padding: 6px 0; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-size: 1.05rem; }

.error { color: var(--danger); font-weight: bold; }
.message { font-size: 1.2rem; font-weight: bold; }
.muted { color: var(--muted); }
.back { display: inline-block; margin-top: 20px; }
.detail { white-space: pre-wrap; word-break: break-word; }

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #ece8dc; font-size: .9rem; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.empty { padding: 16px; color: var(--muted); }

.hatake { margin: 20px 0; }
.hatake h2 { margin-bottom: 6px; }
.hatake img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

.filter { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filter label { flex: 1; min-width: 140px; font-weight: bold; }
.filter label.full { flex-basis: 100%; }
.count { margin: 4px 0 8px; font-size: 1.05rem; }
.note { background: #fff8e1; border-left: 4px solid #e0b040; padding: 8px 12px; border-radius: 4px; }

/* スマホでは表をカード型に */
@media (max-width: 600px) {
  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive tr { border-bottom: 1px solid var(--border); padding: 6px 0; }
  table.responsive td { border: none; padding: 3px 10px; }
  table.responsive td[data-label]::before { content: attr(data-label) "："; color: var(--muted); font-size: .85rem; }
}
