:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1d232b;
  --muted: #5d6772;
  --line: #dde1e6;
  --accent: #2f5d3a;
  --accent-soft: #e9f2ea;
  --sun: #d0342b;
  --sat: #1f63b6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 45, 0.06), 0 4px 16px rgba(20, 30, 45, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic UI', Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- ヘッダー・フッター ---- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.logo img { width: 26px; height: 26px; }
.nav {
  display: flex;
  gap: 4px 16px;
  margin-left: auto;
  overflow-x: auto;
  font-size: 14px;
  white-space: nowrap;
  scrollbar-width: none;
}
.nav a {
  padding: 6px 2px;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current='page'] { color: var(--accent); }
.lang-switch {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .site-head .wrap { flex-wrap: wrap; gap: 0 12px; padding-top: 6px; }
  .nav { order: 3; width: 100%; margin-left: 0; padding-bottom: 4px; }
  .lang-switch { margin-left: auto; }
}

.site-foot {
  margin-top: 64px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}
.site-foot a { color: var(--muted); }

/* ---- 本文 ---- */
main { display: block; }
.hero { padding: 32px 0 8px; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4.2vw, 36px);
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.hero p { margin: 0; color: var(--muted); }
.crumbs {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs li + li::before { content: '›'; margin: 0 6px 0 2px; }
section.block { margin-top: 40px; }
h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.4;
}
h3 { margin: 24px 0 8px; font-size: 17px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.note { color: var(--muted); font-size: 14px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 36px; }

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.field { display: block; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field select,
.field input[type='text'] {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #c9cfd6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 14px;
}
.checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.1); }
.btn.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.gen-actions { margin-top: 18px; }
.gen-actions .btn { width: 100%; }
.gen-actions .note { margin: 10px 0 0; font-size: 13px; line-height: 1.6; }

.tbl-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 15px;
}
table.data th,
table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.data thead th {
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--muted);
}
table.data td.sun,
table.data td.hol { color: var(--sun); }
table.data td.sat { color: var(--sat); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.facts ul { margin: 0; padding-left: 1.2em; }
.facts h3 { margin-top: 0; }
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.faq details {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.faq details + details { margin-top: 8px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; }

/* ---- 計算ツール共通 ---- */
.tool { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
@media (max-width: 900px) { .tool { grid-template-columns: minmax(0, 1fr); } }
.tool-form .fields { margin-top: 0; }
.field small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.field input[type='number'] { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid #c9cfd6; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat b { display: block; font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.stat small { display: block; font-size: 12px; color: var(--muted); }
.stat.hot b { color: var(--sun); }
.stat.good b { color: #1d7a46; }
.chart { margin: 20px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.chart figcaption { font-size: 13px; font-weight: 700; color: var(--muted); }
.chart svg { display: block; width: 100%; height: auto; }
.disclaimer { margin-top: 24px; padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); font-size: 14px; }
.cross { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cross a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.cross a:hover { border-color: var(--accent); }
.cross small { display: block; color: var(--muted); }
table.data th { white-space: nowrap; }
.prose table.data th { width: 9em; }

/* ---- 登記の期限チェッカー ---- */
.field input[type='date'] { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid #c9cfd6; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.tool-form .fields { grid-template-columns: minmax(0, 1fr); }
.verdict { padding: 18px 20px; border: 1px solid var(--line); border-left: 6px solid #1d7a46; border-radius: 10px; background: #fff; }
.verdict.warn { border-left-color: #d98a00; }
.verdict.hot { border-left-color: var(--sun); }
.verdict h2 { margin: 0 0 10px; font-size: 18px; }
.deadline { margin-bottom: 12px; padding: 12px 14px; border-radius: 8px; background: #f2f9f5; }
.deadline.warn { background: #fff7e6; }
.deadline.hot { background: #fdeceb; }
.deadline span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.deadline b { font-size: 24px; line-height: 1.4; }
.deadline em { margin-left: 10px; font-style: normal; font-weight: 700; }
.deadline p { margin: 6px 0 0; font-size: 14px; }
.verdict-hint { padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
.tabs { display: flex; gap: 8px; margin: 20px 0 0; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; }
.tabs a[aria-current='page'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ---- 小さな画面の調整 ---- */
@media (max-width: 720px) {
  .logo { white-space: normal; line-height: 1.3; min-width: 0; }
}
.prose table.data th { width: auto; white-space: nowrap; }
.tbl-wrap table.data td { min-width: 11em; }

/* ---- 入力欄 ---- */
.field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.inline select { width: auto; flex: none; min-height: 40px; padding: 6px 10px; border: 1px solid #c9cfd6; border-radius: 8px; background: #fff; font: inherit; font-size: 15px; }

/* ---- 土地活用の診断結果 ---- */
.options { display: grid; gap: 10px; margin-top: 12px; }
.option { border: 1px solid var(--line); border-left: 6px solid #9aa4ae; border-radius: 10px; background: #fff; padding: 0 14px; }
.option > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 0; cursor: pointer; list-style: none; }
.option > summary::-webkit-details-marker { display: none; }
.option > summary::after { content: '＋'; margin-left: auto; color: var(--muted); }
.option[open] > summary::after { content: '－'; }
.option > summary b { flex: 1 1 14em; min-width: 0; line-height: 1.4; }
.option meter { width: 90px; height: 10px; }
.option .badge { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0f2; color: var(--muted); }
.option.lv-good { border-left-color: #1d7a46; }
.option.lv-good .badge { background: #e3f3ea; color: #1d7a46; }
.option.lv-fair { border-left-color: #5b9a4a; }
.option.lv-fair .badge { background: #eef6e9; color: #3f7a30; }
.option.lv-cond { border-left-color: #d98a00; }
.option.lv-cond .badge { background: #fff4dc; color: #8a5a00; }
.option.lv-poor, .option.lv-no { border-left-color: #c9cfd6; }
.option.lv-no b { color: var(--muted); }
.option .desc { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.option h4 { margin: 10px 0 4px; font-size: 14px; }
.option ul { margin: 0 0 12px; padding-left: 1.2em; font-size: 14px; }
.option ul.metrics { padding: 8px 12px 8px 2em; border-radius: 8px; background: var(--accent-soft); font-weight: 700; }
@media (max-width: 480px) {
  .option meter { width: 64px; }
}
