/* テンプレート固定の共通フッター。作品別CSSへ複製しない。 */
.site-footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 16px;
  padding: 12px 20px;
  overflow: hidden;
  text-align: center;
  background: var(--paper-color, #fff);
  border-top: 4px solid var(--brand, #f472b6);
  box-shadow: 0 -4px 12px rgba(244, 114, 182, 0.05);
}

.footer-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.back-to-top-btn {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0 0.9rem;
  border: 1px solid var(--brand-light, #fbcfe8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent, #be185d);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(244, 114, 182, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.back-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover,
.back-to-top-btn:focus-visible {
  background: var(--paper-color, #fff);
  border-color: var(--brand, #f472b6);
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--accent, #be185d);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-nav .footer-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: none;
  min-height: 2rem;
  padding: 0 12px;
  border: 1px solid var(--brand-light, #fbcfe8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent, #be185d);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
}

.footer-nav .footer-top-link:hover,
.footer-nav .footer-top-link:focus-visible {
  border-color: var(--brand, #f472b6);
  background: var(--paper-color, #fff);
  text-decoration: none;
}

.footer-secondary-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
}

.footer-secondary-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85rem;
  padding: 0 10px;
  border: 1px solid var(--brand-light, #fbcfe8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent, #be185d);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

.footer-secondary-links a:hover,
.footer-secondary-links a:focus-visible {
  border-color: var(--brand, #f472b6);
  background: var(--paper-color, #fff);
  text-decoration: none;
}

.copyright {
  margin: 0;
  color: var(--text-muted, #6b7280);
  font-size: 0.9rem;
  line-height: 1.35;
}

.footer-disclaimer {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  line-height: 1.3;
}

.footer-disclaimer-full {
  display: inline;
}

.footer-disclaimer-short {
  display: none;
}

@media (min-width: 851px) {
  .site-footer {
    padding: 7px 20px 6px;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 18px;
  }

  .footer-nav {
    display: contents;
  }

  .footer-nav .footer-top-link {
    grid-column: 1;
    grid-row: 1;
    white-space: nowrap;
  }

  .footer-secondary-links {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    white-space: nowrap;
  }

  .footer-secondary-links a {
    white-space: nowrap;
  }

  .copyright {
    display: contents;
    color: var(--text-muted, #6b7280);
    font-size: 0.68rem;
    line-height: 1.08;
  }

  .footer-copyright-label {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    align-self: center;
    color: var(--text-muted, #6b7280);
    font-size: 0.68rem;
    line-height: 1.08;
    white-space: nowrap;
  }

  .footer-disclaimer {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    display: inline;
    margin-top: 0;
    margin-left: 0;
    color: var(--text-muted, #6b7280);
    font-size: 0.68rem;
    line-height: 1.08;
    text-align: right;
    white-space: nowrap;
  }
}

@media (max-width: 850px) {
  .site-footer {
    margin-top: 10px;
    padding: 10px 10px 9px;
  }

  .footer-inner {
    max-width: 100%;
    margin: 0;
  }

  .back-to-top-btn {
    min-height: 1.95rem;
    padding: 0 0.78rem;
    font-size: 0.76rem;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .footer-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-items: center;
    column-gap: 4px;
    margin-bottom: 3px;
  }

  .footer-nav a {
    font-size: 0.88rem;
  }

  .footer-nav .footer-top-link {
    flex: 0 0 auto;
    min-width: 2.55rem;
    min-height: 1.75rem;
    padding: 0 6px;
    font-size: 0;
  }

  .footer-nav .footer-top-link::after {
    content: "推し活";
    font-size: 0.68rem;
    line-height: 1;
  }

  .footer-secondary-links {
    display: inline-flex;
    justify-self: end;
    justify-content: flex-end;
    gap: 4px;
    margin-left: 0;
    min-width: 0;
    max-width: 100%;
  }

  .footer-secondary-links a {
    min-height: 1.65rem;
    padding: 0 7px;
    font-size: 0.74rem;
    flex: 0 0 auto;
  }

  .copyright {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    font-size: 0.6rem;
    line-height: 1.15;
    white-space: normal;
    text-align: left;
  }

  .footer-copyright-label {
    justify-self: start;
    color: var(--text-muted, #6b7280);
    font-size: 0.6rem;
    line-height: 1.15;
    white-space: nowrap;
  }

  .footer-disclaimer {
    display: block;
    justify-self: end;
    margin-top: 0;
    margin-left: 0;
    max-width: 100%;
    color: var(--text-muted, #6b7280);
    font-size: 0.6rem;
    line-height: 1.15;
    text-align: right;
    white-space: nowrap;
  }

  .footer-disclaimer-full {
    display: none;
  }

  .footer-disclaimer-short {
    display: inline;
  }
}
