/* フッター（トップ・都道府県・映画館・ランキング・このサイトについての下。ui/footer.js が今の画面の下へ移す）:
   ロゴと一言・案内のリンク・言語・都道府県のリンク（PC は地方ごとの列、スマホはたたむ）・収録数と出典 */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--tint);
  color: var(--ink);
}

/* 余白のある画面では、余白の外まで広げる */
.pane:not(#pick) > .site-foot {
  margin-right: calc(-1 * var(--gutter-right));
  margin-left: calc(-1 * var(--gutter-left));
}

.foot-inner {
  display: grid;
  grid-template-areas:
    'brand'
    'links'
    'langs'
    'prefs'
    'notes';
  gap: 20px;
  max-width: var(--content);
  margin: 0 auto;
  padding: 32px var(--gutter-right) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter-left);
}

.foot-brand {
  display: flex;
  flex-direction: column;
  grid-area: brand;
  gap: 8px;
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

/* ロゴ（ヘッダーと同じアイコンとロゴの文字。アイコンは平らな絵なので影を付けない） */
.foot-logo img {
  width: 36px;
  height: 36px;
}

.foot-logo b {
  font-family: var(--font-head);
  letter-spacing: calc(var(--head-tracking) - 0.025em);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.foot-brand p {
  max-width: 34em;
  margin: 0;
  word-break: auto-phrase;
  color: var(--sub);
  font-size: 13px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  grid-area: links;
  gap: 6px 22px;
}

.foot-links a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--accent-ink);
}

.foot-langs {
  display: inline-flex;
  grid-area: langs;
  justify-self: start;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.foot-langs button {
  padding: 5px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--sub);
  font-size: 12.5px;
}

.foot-langs button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--text-on-dark);
}

/* 都道府県（スマホはたたむ。PC は ui/footer.js が開いておく） */
.foot-prefs {
  grid-area: prefs;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.foot-prefs summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.foot-prefs summary::-webkit-details-marker {
  display: none;
}

.foot-prefs summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--sub);
  border-bottom: 2px solid var(--sub);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out);
}

.foot-prefs[open] summary::after {
  transform: rotate(-135deg);
}

.foot-regions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  padding: 4px 0 16px;
}

.foot-region h4 {
  margin: 0 0 4px;
  color: var(--sub);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.foot-region ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-region a {
  display: inline-block;
  padding: 3px 0;
  color: var(--prose);
  font-size: 12.5px;
  text-decoration: none;
}

.foot-region a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.foot-notes {
  display: flex;
  flex-direction: column;
  grid-area: notes;
  gap: 4px;
}

.foot-notes .foot {
  line-height: 1.7;
}

@media (min-width: 960px) {
  .foot-inner {
    grid-template-areas:
      'brand links langs'
      'prefs prefs prefs'
      'notes notes notes';
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: start;
    gap: 24px 40px;
    padding-top: 44px;
  }

  .foot-links {
    padding-top: 8px;
  }

  .foot-langs {
    margin-top: 4px;
  }

  .foot-prefs {
    border-bottom: 0;
  }

  /* PC は開いたまま（見出しの行は出さない） */
  .foot-prefs summary {
    display: none;
  }

  .foot-regions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding-top: 20px;
  }

  .foot-region ul {
    flex-direction: column;
  }
}
