:root {
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d8dee8;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --accent: #136f63;
  --warning: #9a5b00;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.65;
}

a { color: var(--accent); font-weight: 700; }

.header, main, footer {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.label, h1, h2, p { margin-top: 0; }
.label { margin-bottom: 2px; color: var(--muted); font-size: .85rem; font-weight: 700; }
h1 { margin-bottom: 0; font-size: 2rem; line-height: 1.25; }
h2 { margin-bottom: 8px; font-size: 1.25rem; }

nav { display: flex; gap: 12px; white-space: nowrap; }
nav a { color: var(--ink); text-decoration: none; }

main { padding: 22px 0 34px; }

.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.summary article, .panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.summary article { padding: 14px; }
.summary span { display: block; color: var(--muted); font-size: .82rem; font-weight: 700; }
.summary strong { display: block; margin-top: 3px; color: var(--accent); font-size: 1.45rem; line-height: 1.2; }

.panel { margin-bottom: 14px; padding: 16px; }
.compact p:last-child { margin-bottom: 0; }

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.panel-head p, .result, .note, .system-status, #formMessage, footer { color: var(--muted); }

.system-status {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid #c8d0dc;
  background: #f7fafc;
  font-size: .86rem;
  font-weight: 700;
}

code {
  padding: 1px 4px;
  border: 1px solid #d8dee8;
  background: #f7fafc;
  font-family: Consolas, "Courier New", monospace;
  font-size: .92em;
}

button, input, select {
  min-height: 40px;
  border: 1px solid #c8d0dc;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

button {
  padding: 7px 12px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}

button:hover, button:focus-visible { background: #0d5149; }

.filters {
  display: grid;
  grid-template-columns: 160px 160px 1fr 84px;
  gap: 10px;
  margin: 14px 0 10px;
}

label { display: grid; gap: 4px; font-weight: 700; }
label span, legend { color: var(--muted); font-size: .8rem; }
input, select { width: 100%; padding: 6px 9px; }
.filters button { align-self: end; }
.result { margin: 0 0 10px; font-weight: 700; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; min-width: 940px; border-collapse: collapse; background: #fff; }

th, td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .92rem;
}

th { background: #eef2f7; font-size: .82rem; white-space: nowrap; }
.table-wrap th:last-child, .table-wrap td:last-child { width: 58px; text-align: center; }
.table-wrap td:last-child a { white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
small { color: var(--muted); }
.evidence { display: inline-block; margin-top: 4px; }

.status {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: #f7fafc;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}

.status.watch { color: var(--accent); border-color: #9bd4cb; background: #ecf8f6; }
.status.closed { color: var(--warning); border-color: #e7c993; background: #fff8ea; }
.status.regional, .status.prep { color: #275d8d; border-color: #abcbe6; background: #eef7ff; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form { display: grid; gap: 10px; }
fieldset { margin: 0; padding: 10px; border: 1px solid var(--line); }
fieldset label { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
input[type="checkbox"] { width: auto; min-height: auto; }
.small-table { min-width: 0; }
.small-table th { width: 120px; }
.note { margin: 12px 0 0; font-weight: 700; }

.publish-list { margin: 0; display: grid; gap: 8px; }
.publish-list div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.publish-list div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-weight: 700; }
dd { margin: 0; overflow-wrap: anywhere; }
footer { padding: 0 0 28px; font-size: .9rem; }

@media (max-width: 760px) {
  .header { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 1.55rem; }
  nav { width: 100%; overflow-x: auto; }
  .summary, .filters, .grid { grid-template-columns: 1fr; }
  .panel-head, .publish-list div { display: block; }
  .panel-head button { margin-top: 10px; }
  table { min-width: 820px; }
}
