:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --ink: #1d1f21;
  --muted: #5f6368;
  --line: #e2e2de;
  --accent: #1f5fa8;
  --ok: #1e7a4f;
  --ok-bg: #e6f4ec;
  --warn: #8a5a00;
  --warn-bg: #fdf1d8;
  --none: #5f6368;
  --none-bg: #eeeeec;
  --hit: #9b2c2c;
  --err: #9b2c2c;
  --err-bg: #fbeaea;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; }
a { color: var(--accent); }

.bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.site { margin: 0; font-weight: 700; letter-spacing: .04em; }
.site a { color: inherit; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.nav:empty { display: none; }
.navbtn { font: inherit; padding: 2px 10px; }
.site .sub { font-weight: 400; letter-spacing: 0; color: var(--muted); font-size: 13px; margin-left: 6px; }

.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr); }
.mapwrap { position: relative; display: flex; flex-direction: column; min-height: 320px; }
.mapbox { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--none-bg); }
.maploading { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center; background: var(--none-bg); color: var(--muted); font-size: 14px; }
.maploading[hidden] { display: none; }
.tilemsg { flex: none; margin: 0; padding: 4px 10px; font-size: 12px; color: var(--warn); background: var(--warn-bg); }
.tilemsg[hidden] { display: none; }

.tools { position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px;
  max-width: calc(100% - 70px); padding: 8px 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); font-size: 13px; }
.radius { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; }
.radius legend { float: left; margin-right: 4px; color: var(--muted); }
.paste { display: flex; gap: 4px; }
.paste input { font: inherit; width: 13em; min-width: 0; flex: 1; padding: 2px 6px; }
.tools button { font: inherit; }
.make { font-weight: 700; padding: 4px 10px; }
.pickmsg { color: var(--warn); }
.pickmsg:empty { display: none; }

.panel { overflow-y: auto; padding: 16px 20px 24px; background: var(--panel); border-left: 1px solid var(--line); }
.guide h1 { font-size: 17px; margin: 0 0 8px; }
.guide ol { margin: 0 0 8px; padding-left: 1.4em; }
.guide li { margin-bottom: 4px; }
.guide .range { margin: 0; color: var(--muted); font-size: 14px; }
.links { font-size: 14px; margin-top: 10px; }
.links a { margin-right: 14px; }
.links[hidden] { display: none; }
.status { margin: 0 0 12px; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.status.info { background: var(--none-bg); color: var(--muted); }
.status.error { background: var(--err-bg); color: var(--err); }
.status[hidden] { display: none; }
.stale { margin: 0 0 12px; padding: 8px 10px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.stale[hidden] { display: none; }
.report[hidden] { display: none; }
/* 見本の頁の案内 */
.sample-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 6px; background: var(--ok-bg); font-size: 14px; }
.sample-note p { margin: 0 0 6px; }
.sample-note p:last-child { margin-bottom: 0; }
.foot { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.foot p { margin: 2px 0; }

@media (max-width: 860px) {
  body { display: block; height: auto; }
  .layout { grid-template-columns: 1fr; }
  .mapwrap { height: 55vh; }
  .panel { overflow: visible; border-left: 0; border-top: 1px solid var(--line); padding: 16px; }
}

.report h1 { font-size: 18px; margin: 0 0 4px; }
.report h2 { font-size: 15px; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.meta { color: var(--muted); font-size: 13px; margin: 0; }
.scope { margin: 10px 0 0; font-size: 14px; }
.scope .sub { display: block; }
.item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.row .right { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.name { font-weight: 600; }
.result { font-weight: 700; }
.result.hit { color: var(--hit); }
.chip { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.chip.obtained, .chip.in_scope { color: var(--ok); background: var(--ok-bg); }
.chip.needs_check { color: var(--warn); background: var(--warn-bg); }
.chip.not_obtained, .chip.out_of_scope { color: var(--none); background: var(--none-bg); }
.value { font-size: 14px; margin-top: 2px; }
.value.max { font-weight: 600; }
.sub, .reason, .lines { font-size: 13px; color: var(--muted); margin-top: 2px; }
.lines div { margin-top: 1px; }
.reason .kind { display: inline-block; font-size: 12px; padding: 0 6px; margin-right: 4px; border-radius: 4px;
  color: var(--warn); background: var(--warn-bg); }
.reason b { color: var(--warn); font-weight: 600; margin-right: 4px; }
.count { font-size: 20px; font-weight: 700; }
.notes p, .sources p { font-size: 12.5px; color: var(--muted); margin: 6px 0; }
.sources .title { font-weight: 600; color: var(--ink); font-size: 13px; margin-top: 14px; }
.notice { display: block; font-size: 11.5px; color: var(--muted); }
a.url { word-break: break-all; }
.maplibregl-ctrl-attrib { font-size: 11px; }

@media print {
  html, body { height: auto; background: #ffffff; display: block; }
  .bar, .mapwrap, .guide, .status, .stale, .foot { display: none !important; }
  .sample-note { border: 1px solid #999999; background: #ffffff; }
  .layout { display: block; }
  .panel { overflow: visible; border: 0; padding: 0; }
  .item { break-inside: avoid; }
  a { color: inherit; }
}
