:root {
  --bg: #f6fbfe;
  --card: #ffffff;
  --line: #d6e9f5;
  --sky: #dff1fb;
  --sky-strong: #3a9ad9;
  --mint: #dcf6ec;
  --mint-strong: #1fa67f;
  --text: #1d3a4f;
  --muted: #5f7b8e;
  --warn: #d9772f;
  --warn-bg: #fdeede;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }
.top { margin-bottom: 8px; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 28px 0 10px; padding-left: 10px; border-left: 4px solid var(--mint-strong); }
.muted { color: var(--muted); }
.small { font-size: .82rem; margin: 4px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 14px; }
.grid.sites { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid.sites, .grid.projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid.sites, .grid.projects { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 1.3rem; }
}
.site-name { font-weight: 700; font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.site-name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--sky-strong)); }
.metric { padding: 10px 0; border-top: 1px dashed var(--line); }
.metric:first-of-type { border-top: 0; padding-top: 0; }
.metric .label { font-size: .8rem; color: var(--muted); }
.metric .value { font-size: 1.7rem; font-weight: 700; letter-spacing: .01em; }
.metric .value.na { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.delta { display: inline-block; font-size: .8rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.delta.up { background: var(--mint); color: #11785b; }
.delta.down { background: var(--warn-bg); color: #a9500f; }
.delta.flat { background: var(--sky); color: var(--muted); }
.note { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.warn { color: #a9500f; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.status.work { background: var(--sky); color: #1a6fa8; }
.status.wait { background: var(--warn-bg); color: #a9500f; }
.status.done { background: var(--mint); color: #11785b; }
.status.na { background: #eef2f5; color: var(--muted); }
.proj-name { font-weight: 700; margin: 0 0 8px; overflow-wrap: anywhere; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; padding: 4px 0; }
.kv span:first-child { color: var(--muted); }
.list .row { display: grid; grid-template-columns: 11.5em 1fr; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.list .row:first-child { border-top: 0; padding-top: 0; }
.list .row:last-child { padding-bottom: 0; }
.list .when { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .list .row { grid-template-columns: 1fr; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 6px; font-size: .88rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; }
.tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: .8rem; box-shadow: 0 4px 14px rgba(40, 100, 140, .12); white-space: nowrap; transform: translate(-50%, -110%); }
.empty { color: var(--muted); padding: 8px 0; }
