/* ranknaviファミリー共通フッター（正本 common-core/src/Footer.php）。
   構成（2026-09-27 ユーザー指定）＝PC：左の中段にロゴ（マーク／改行／ロゴタイプ）・左の最下部にお問い合わせと ©、
   右にサイト一覧をブロックで配置。リンクの hover は shigoto-net のフッターと同じ「下線が中央から両端へ伸びる」。
   地は濃い色（#211c15）・左寄せ（2026-09-27 ユーザー確定）。
   全サイトが https://ranknavi.com/assets/family/footer.css を読む。**サイトのトークンに依存しない**
   （サイトごとにトークンの名前も値も違うため、全サイトで同じ見た目にするには値をここに持つしかない）。
   値はファミリー共通の配色（stats・weather の tokens.json）・濃い地のアクセント #e8a071（brand-identity §2）・
   global-conventions §2-3・§2-4 の凍結スケールの写し。根の class は各サイトの CSS とぶつからない専用名。 */

.family-footer {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(36px, 4.5vw, 56px) clamp(48px, 6vw, 72px);
  padding: clamp(48px, 6vw, 72px) max(2vw, calc((100% - 1160px) / 2));
  background: #211c15;
  color: #f7f4ef;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(0.875rem, 0.85rem + 0.13vw, 0.95rem);
  line-height: 1.6;
  text-align: left;
}

.family-footer a { color: inherit; text-decoration: none; }
.family-footer p { margin: 0; }

/* ── 左：ロゴを中段に・お問い合わせと © を最下部に ───── */

.family-footer > div:first-child {
  display: flex;
  flex-direction: column;
  gap: clamp(13px, 1.5vw, 20px);
}

.family-footer > div:first-child > p:first-child { margin-block: auto; }

/* ロゴ＝マーク（改行）ロゴタイプ（Monomaniac One＝全サイト共通で読み込み済み・rules/brand-identity.md） */
.family-footer > div:first-child > p:first-child > a {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(13px, 1.5vw, 20px);
}

.family-footer svg {
  width: clamp(48px, 6vw, 72px);
  height: clamp(48px, 6vw, 72px);
  fill: #e8a071;
}

.family-footer > div:first-child > p:first-child span {
  font-family: "Monomaniac One", "Noto Sans JP", sans-serif;
  font-size: clamp(1.875rem, 1.20rem + 3.40vw, 3rem);
  line-height: 1;
}

.family-footer small { font-size: clamp(0.75rem, 0.73rem + 0.10vw, 0.80rem); }
.family-footer small + small { margin-left: clamp(13px, 1.5vw, 20px); }

/* ── 右：サイト一覧のブロック（2列＝10サイトで5段・空きを作らない） ───── */

.family-footer ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family-footer li > a,
.family-footer li > span {
  display: block;
  padding: clamp(7px, 0.8vw, 10px) clamp(13px, 1.5vw, 20px);
  background: rgb(247 244 239 / 6%);
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
  /* 折り返すなら「RankNavi」と名前のあいだの空白で（SP で「ミュージッ／ク」と語の途中で切れたため） */
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.family-footer li > a:hover { background: rgb(247 244 239 / 12%); }

/* 自サイト＝リンクにせず、アクセント色で「いまここ」を示す */
.family-footer li > span[aria-current="page"] {
  color: #e8a071;
  background: rgb(232 160 113 / 14%);
}

/* ── hover の下線（shigoto-net と同じ＝中央から両端へ伸びる） ───── */

.family-footer li > * > span,
.family-footer > div:first-child > p:not(:first-child) a {
  position: relative;
  display: inline-block;
}

.family-footer li > a > span::after,
.family-footer > div:first-child > p:not(:first-child) a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: #e8a071;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.family-footer li > a:hover > span::after,
.family-footer li > a:focus-visible > span::after,
.family-footer > div:first-child > p:not(:first-child) a:hover::after,
.family-footer > div:first-child > p:not(:first-child) a:focus-visible::after {
  left: 0;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .family-footer li > a,
  .family-footer li > a > span::after,
  .family-footer > div:first-child > p:not(:first-child) a::after { transition: none; }
}

/* ── お問い合わせの窓 ─────────────── */

.family-contact { position: fixed; inset: 0; z-index: 100; }
.family-contact[hidden] { display: none; }
.family-contact > div:first-child { position: absolute; inset: 0; background: rgb(33 28 21 / 55%); }

.family-contact > div[role="dialog"] {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  width: min(92vw, 560px);
  height: min(84svh, 680px);
  background: #f7f4ef;
  border-radius: 4px;
  overflow: hidden;
}

.family-contact button {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9999px;
  background: #211c15;
  color: #f7f4ef;
  cursor: pointer;
}

.family-contact iframe { width: 100%; flex: 1; border: 0; }

/* ── SP（W≤640）＝ロゴ → ブロック → お問い合わせ → © の順に積む ───── */

@media screen and (max-width: 640.98px) {
  .family-footer { grid-template-columns: minmax(0, 1fr); }
  .family-footer > div:first-child { display: contents; }
  .family-footer > div:first-child > p:first-child { order: 1; margin-block: 0; }
  .family-footer > nav { order: 2; }
  .family-footer > div:first-child > p:nth-child(2) { order: 3; }
  .family-footer > div:first-child > p:nth-child(3) { order: 4; }
}

/* ── サブドメイン固有の表記（出典・クレジット・免責）＝各サイトの main の最下部 ─────
   色はサイトの本文色を引き継ぐ。**クレジットの見た目（色・大きさ）を変えない**
   （Yahoo! の規定＝「CSSなどを利用してクレジットの表示色を変更したり、表示サイズを極端に小さくしたりすることも禁止」）。 */

.site-notes {
  margin-top: clamp(48px, 6vw, 72px);
  font-size: clamp(0.75rem, 0.73rem + 0.10vw, 0.80rem);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.site-notes > h2 {
  margin: 0 0 4px;
  font-size: inherit;
  font-weight: 700;
}

.site-notes p { margin: 0 0 4px; }
