/* 日本を知る。
   並び：固定ヘッダー → メインビジュアル（言葉と2つの入口＋右の日本地図の線画）
        → 地域から調べる／テーマから探す → このサイトについて → 掲載情報について
   色：総合トップは深い青で統一する。各専門サイトの色（緑・茶など）はリンク先で見せ、ここでは使わない。
       紺＝見出し・選択中・濃い帯、青＝押すボタン・リンク、薄い青＝面や枠 の3段で主従を付ける */
:root {
  --white: #FFFFFF;
  --bg-sub: #F5F7FA;
  --navy: #203750;
  --blue: #1F5FA6;
  --blue-dark: #174A84;
  --blue-tint: #EAF1FA;
  --blue-line: #B9CCE2;
  --on-navy: #A9C8EA;   /* 紺の上に置く明るい青（ラベル・矢印・選択の印） */
  --chip: #2A5384;      /* 各サイトのアイコンの背景（ファビコンの形を白で描く） */
  --text: #263238;
  --muted: #4E5C66;
  --line: #DDE4EA;

  /* 以前の名前のまま使っている所があるので、どれも青系に寄せる */
  --accent: var(--blue);
  --accent-dark: var(--blue-dark);
  --research: var(--blue);
  --research-tint: var(--blue-tint);
  --learn: var(--blue);
  --learn-tint: var(--blue-tint);
  --participate: var(--blue);
  --participate-tint: var(--blue-tint);

  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  --header-h: 68px;
  --radius: 14px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--research); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; }

/* 線画アイコン共通 */
.ico {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* 分類ごとの色の割り当て */
.cat-research { --c: var(--research); --tint: var(--research-tint); }
.cat-learn { --c: var(--learn); --tint: var(--learn-tint); }
.cat-participate { --c: var(--participate); --tint: var(--participate-tint); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--navy); text-decoration: none;
  font-weight: 900; font-size: 1.35rem; letter-spacing: .04em;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.site-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--navy); text-decoration: none; font-weight: 700; font-size: 1rem;
}
.site-nav a:hover { background: var(--bg-sub); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; padding: 0;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--white); color: var(--navy); cursor: pointer;
  }
  .menu-toggle .ico { width: 26px; height: 26px; stroke-width: 2.2; }
  .menu-toggle .i-close { display: none; }
  .menu-toggle[aria-expanded="true"] .i-open { display: none; }
  .menu-toggle[aria-expanded="true"] .i-close { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 24px rgba(32, 55, 80, .10);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column; gap: 0;
    padding: 4px max(20px, env(safe-area-inset-right, 0px)) 14px max(20px, env(safe-area-inset-left, 0px));
  }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { padding: 14px 6px; font-size: 1.08rem; border-radius: 0; }
}

/* ---------- メインビジュアル（地図がすぐ見えるよう、短くまとめる） ----------
   パソコン：左に「タイトル・ひとこと・2つの入口」、右に日本地図と虫眼鏡の線画。
   タブレット：線画を小さく。スマホ：線画は出さない（タイトルと入口を押し下げないように） */
.hero {
  background: var(--bg-sub);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 36px; align-items: center; }
.hero-main { min-width: 0; }
.hero-art { display: block; width: 100%; height: auto; max-height: 330px; padding-block: 12px; }
@media (max-width: 1023px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 200px; gap: 0 24px; } }
@media (max-width: 767px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-art { display: none; } }
.art-dot { fill: var(--navy); opacity: .42; }
.art-land { fill: url(#hero-dots); stroke: var(--navy); stroke-opacity: .3; stroke-width: 1.5; stroke-linejoin: round; }
.art-line polyline { fill: none; stroke: var(--blue); stroke-opacity: .55; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.art-line circle { fill: var(--white); stroke: var(--blue); stroke-opacity: .7; stroke-width: 3; }
.art-lens circle { fill: rgba(255, 255, 255, .45); stroke: var(--navy); stroke-opacity: .6; stroke-width: 5; }
.art-lens path { fill: none; stroke: var(--navy); stroke-opacity: .6; stroke-width: 9; stroke-linecap: round; }
.hero-inner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px;
  padding-block: 22px 20px;
}
.hero-title {
  margin: 0; color: var(--navy);
  font-weight: 900; font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.2; letter-spacing: .04em;
}
.hero-catch {
  margin: 0;
  color: var(--blue); font-weight: 900;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.6;
  background: linear-gradient(transparent 68%, var(--blue-tint) 68%);
}
.hero-catch-wrap { margin: 0; }
.hero-lead { flex-basis: 100%; margin: 6px 0 0; font-size: 1.02rem; }
.br-narrow { display: none; }
@media (max-width: 639px) {
  .hero-inner { padding-block: 18px 16px; }
  .br-narrow { display: inline; }
  .hero-lead { font-size: 1rem; }
}

/* ---------- 2つの入口（地域から調べる／テーマから探す）。同じ大きさ・同じ配色で横に並べる ---------- */
.entry { padding-bottom: 28px; }
.entry-q { margin: 0 0 10px; color: var(--navy); font-size: clamp(1.15rem, 2.4vw, 1.35rem); font-weight: 900; }
.entry-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.entry-tab {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  min-height: 96px; padding: 16px 18px; text-align: left;
  border: 2px solid #B9C7D4; border-radius: var(--radius); background: var(--white);
  color: var(--navy); font: inherit; cursor: pointer;
}
.entry-tab:hover { border-color: var(--navy); }
.entry-icon {
  grid-row: 1 / span 2; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 12px; background: var(--blue-tint); color: var(--blue);
}
.entry-icon .ico { width: 30px; height: 30px; stroke-width: 2; }
.entry-title { align-self: end; font-size: clamp(1.15rem, 2.6vw, 1.45rem); font-weight: 900; line-height: 1.35; }
.entry-sub { align-self: start; color: var(--muted); font-size: .98rem; line-height: 1.5; }
.entry-state { display: none; }
/* 選んでいる方：紺の背景と「表示中」の印（ホバーしなくても分かるように） */
.entry-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.entry-tab[aria-selected="true"] .entry-icon { background: rgba(255, 255, 255, .14); color: var(--on-navy); }
.entry-tab[aria-selected="true"] .entry-sub { color: #D5E0EA; }
.entry-tab[aria-selected="true"] .entry-state {
  display: block; position: absolute; top: 8px; right: 10px;
  padding: 0 10px; border-radius: 999px; background: var(--on-navy); color: var(--navy);
  font-size: .82rem; font-weight: 900; line-height: 1.7;
}
.entry-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: -10px;
  width: 18px; height: 18px; border-radius: 3px; background: var(--navy);
  transform: translateX(-50%) rotate(45deg);
}
.entry-tab:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
@media (max-width: 639px) {
  .entry { padding-bottom: 22px; }
  .entry-tabs { gap: 10px; }
  .entry-tab {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 4px;
    justify-items: center; text-align: center;
    min-height: 136px; padding: 14px 8px 12px;
  }
  .entry-icon { grid-row: auto; width: 44px; height: 44px; }
  .entry-title { align-self: auto; font-size: 1.12rem; }
  .entry-sub { align-self: auto; font-size: .86rem; }
  .entry-tab[aria-selected="true"] .entry-state { top: 6px; right: 6px; padding: 0 7px; font-size: .74rem; }
}
/* 選んだ方だけを表示する。JavaScript が動かないときは、入口のボタンを出さずに両方とも表示する */
.js .entry-panel:not(.is-open) { display: none; }
html:not(.js) .entry { display: none; }

/* ---------- テーマから探す（12サイトの見出し） ---------- */
.themes-head { padding-block: 32px 0; background: var(--white); }
.themes-head h2 { margin: 0; color: var(--navy); font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 900; line-height: 1.35; }
.themes-head p { margin: 6px 0 0; max-width: 46em; color: var(--muted); font-size: 1.02rem; }
.themes-head h2, .themes-head > .wrap { scroll-margin-top: calc(var(--header-h) + 8px); }
#themes { scroll-margin-top: var(--header-h); }
.theme-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.theme-jump a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 6px 16px;
  border: 2px solid var(--c); border-radius: 10px; background: var(--white);
  color: var(--c); font-weight: 900; text-decoration: none;
}
.theme-jump a:hover { background: var(--tint); }
.tj-n { color: var(--muted); font-size: .92rem; font-weight: 700; }

/* ---------- 目的別のカード ---------- */
.cat-section { padding-block: 40px 48px; }
.cat-section.alt { background: var(--bg-sub); }
.section-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.section-icon {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--tint); color: var(--c);
}
.section-icon .ico { width: 30px; height: 30px; stroke-width: 2; }
.section-head h2, .section-head h3 {
  margin: 0; color: var(--navy);
  font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 900; line-height: 1.35;
  text-wrap: balance;
}
.section-head p { margin: 6px 0 0; max-width: 42em; color: var(--muted); font-size: 1.02rem; }

.count-pill {
  display: inline-block; margin-left: 10px; padding: 2px 12px; vertical-align: .25em;
  border-radius: 999px; background: var(--tint); color: var(--c);
  font-size: .95rem; font-weight: 700; line-height: 1.6; white-space: nowrap;
}

/* 各サイトのアイコン：リンク先のファビコンと同じ形を、総合トップの青い四角に白で描く（色はそろえる） */
.brand-ico {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--chip); color: var(--chip);
}
.brand-ico svg { width: 30px; height: 30px; }

/* カードの中身は「アイコンとサイト名・1行の要約・要点・補足・ボタン」の5段。
   同じ行のカードどうしで各段の高さをそろえる（subgrid）ので、ボタンの位置が横一列にそろう。
   スマホでは1列の縦並び（横にスライドさせない） */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; row-gap: 0; }
@media (max-width: 1023px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .cards { grid-template-columns: minmax(0, 1fr); } }

.card {
  position: relative;
  display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 10px;
  margin-bottom: 16px; padding: 18px;
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(32, 55, 80, .10); }
.card:focus-within { border-color: var(--blue); }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-title { margin: 0; color: var(--navy); font-size: 1.16rem; font-weight: 900; line-height: 1.4; }
.card-summary { margin: 0; color: var(--blue); font-size: 1rem; font-weight: 700; line-height: 1.55; }
.card-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .97rem; line-height: 1.55; }
.card-points li { position: relative; padding-left: 1.05em; }
.card-points li::before {
  content: ""; position: absolute; left: .1em; top: .62em;
  width: .42em; height: .42em; border-radius: 50%; background: var(--blue);
}
.card-extra { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.card-extra:empty { display: none; }
.card-note, .card-guide, .card-credit, .card-updated, .pair { margin: 0; }
.card-note { color: var(--navy); font-weight: 700; }
/* ページの更新日：補足の段のいちばん下に寄せ、同じ行のカードで高さをそろえる（ボタンのすぐ上） */
.card-updated { margin-top: auto; }
.card-credit a, .pair-link { position: relative; z-index: 2; color: var(--blue); font-weight: 700; text-underline-offset: 3px; }
.card-credit a:hover, .pair-link:hover { color: var(--blue-dark); }

/* 「詳しく調べる版」と「図で学ぶ版」をつなぐ案内（1行） */
.pair-label { font-weight: 700; }
.pair-link { display: inline-flex; align-items: center; gap: 4px; }
.pair-link .ico { width: 15px; height: 15px; }

/* 行動ボタン：どのカードも同じ見た目・文言・位置（総合トップの主役の青） */
.card-foot { align-self: end; }
.btn-site {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; padding: 0 16px;
  background: var(--blue); color: #fff;
  border-radius: 10px;
  font-size: 1.02rem; font-weight: 700; text-decoration: none;
  transition: background-color .15s;
}
.btn-site::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.btn-site .ico { width: 19px; height: 19px; stroke-width: 2; }
.btn-site:hover, .card:hover .btn-site { background: var(--blue-dark); }
.btn-site:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

.noscript { margin: 24px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-sub); }

/* ---------- このサイトについて ---------- */
.about { background: var(--navy); color: #E8EEF4; padding-block: 76px; }
.about-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
.eyebrow { margin: 0 0 10px; font-size: .95rem; font-weight: 700; letter-spacing: .12em; color: var(--on-navy); }
.about h2 { margin: 0; color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.4; }
.about-body p { margin: 0 0 14px; font-size: 1.05rem; line-height: 1.95; }
.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
  margin: 40px 0 0; padding: 0; list-style: none;
}
.steps li {
  position: relative;
  padding: 18px 12px; text-align: center;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px;
  color: #fff; font-size: 1.2rem; font-weight: 900; line-height: 1.5;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -20px;
  width: 12px; height: 12px;
  border-top: 2.5px solid var(--on-navy); border-right: 2.5px solid var(--on-navy);
  transform: translateY(-50%) rotate(45deg);
}
.about-close { margin: 24px 0 0; color: #fff; font-size: 1.1rem; font-weight: 700; }

@media (max-width: 860px) {
  .about { padding-block: 56px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .steps li:not(:last-child)::after { display: none; }
}

/* ---------- 掲載情報について ---------- */
.policy { padding-block: 64px; }
.policy-box {
  max-width: 880px;
  padding: 32px 36px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.policy h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; color: var(--navy); font-size: 1.5rem; font-weight: 900;
}
.policy h2 .ico { width: 28px; height: 28px; color: var(--accent); stroke-width: 2; }
.policy p { margin: 0 0 12px; font-size: 1rem; }
.policy .policy-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
@media (max-width: 639px) { .policy-box { padding: 24px 20px; } }

/* ---------- フッター ---------- */
.site-footer { background: var(--navy); color: #D5E0EA; padding-block: 40px 28px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px 40px; }
.site-footer p { margin: 4px 0 0; }
.footer-brand { margin: 0; color: #fff; font-size: 1.3rem; font-weight: 900; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: #fff; text-decoration: none; font-weight: 500; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .18); color: #B7C6D4; font-size: .92rem; }

/* ---------- 上へ戻る ---------- */
.to-top {
  position: fixed; z-index: 40;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--navy); color: #fff;
  box-shadow: 0 6px 18px rgba(32, 55, 80, .25);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top .ico { stroke-width: 2.4; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .card:hover { transform: none; }
}

.nowrap { white-space: nowrap; }

/* ---------- 掲載情報についての補足（長い説明は折りたたむ） ---------- */
.policy-points { margin: 4px 0 18px; padding-left: 1.3em; }
.policy-points li { margin: 0 0 4px; }
.policy-more { border-top: 1px solid var(--line); }
.policy-more:last-child { border-bottom: 1px solid var(--line); }
.policy-more summary {
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 10px 4px; cursor: pointer; list-style: none;
  color: var(--navy); font-size: 1.05rem; font-weight: 900;
}
.policy-more summary::-webkit-details-marker { display: none; }
.policy-more summary::before {
  content: ""; flex: none; width: 10px; height: 10px; margin: 0 4px;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.policy-more[open] summary::before { transform: rotate(45deg); }
.policy-more ul { margin: 0 0 14px; padding-left: 1.3em; font-size: .97rem; }
.policy-more li { margin: 0 0 6px; }
.policy-terms { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 14px; font-size: .97rem; }
.policy-terms dt { font-weight: 900; color: var(--navy); }
.policy-terms dd { margin: 0; }
@media (max-width: 639px) {
  .policy-terms { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .policy-terms dd { margin-bottom: 8px; }
}
.scope-key { font-weight: 900; white-space: nowrap; }
.scope-key.is-exact { color: var(--accent-dark); }
.scope-key.is-wider { color: #8A5A00; }
.scope-key.is-top { color: #59656F; }
.scope-key.is-all, .scope-key.is-nation { color: var(--navy); }

/* ---------- スマホ：12サイトのカードは1列の縦並び（横にスライドさせない） ---------- */
@media (max-width: 639px) {
  .cat-section { padding-block: 28px 24px; }
  .cat-section .section-icon { display: none; }
  .section-head { margin-bottom: 14px; }
  .section-head p { font-size: .97rem; line-height: 1.75; }
  .themes-head { padding-block: 32px 0; }
  .card { padding: 16px; margin-bottom: 12px; }
  .card-title { font-size: 1.1rem; }
  .brand-ico { width: 40px; height: 40px; }
  .brand-ico svg { width: 28px; height: 28px; }
}

.hero-title:focus { outline: none; }
