/* しまんちゅ工房 共通シェル Ver.1
   まずトップページから、ページ末尾のUIを共通化します。
   ヘッダー本体の見た目は、移行中は各ページ既存CSSを利用します。 */

html {
  scroll-behavior: smooth;
}

.footer-back-to-top {
  background: #14264b;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer-back-to-top__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  transition: background-color .2s ease;
}

.footer-back-to-top__arrow {
  margin-left: 9px;
  color: #70dff7;
  font-size: 18px;
  line-height: 1;
}

.back-to-top {
  position: fixed;
  z-index: 900;
  right: 16px;
  bottom: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid rgba(112, 223, 247, .5);
  border-radius: 999px;
  background: rgba(20, 38, 75, .95);
  box-shadow: 0 8px 24px rgba(9, 18, 38, .22);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background-color .2s ease;
}

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

.back-to-top:focus-visible,
.footer-back-to-top__link:focus-visible {
  outline: 3px solid #70dff7;
  outline-offset: 3px;
}

@media (hover: hover) {
  .back-to-top:hover { background: #1698c0; }
  .footer-back-to-top__link:hover { background: #1b3768; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .back-to-top,
  .footer-back-to-top__link { transition: none; }
}

@media print {
  .back-to-top,
  .footer-back-to-top { display: none !important; }
}
