.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 10px 35px rgba(31, 48, 98, 0.1);
}

.site-header .notice {
  overflow: hidden;
  max-height: 36px;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.site-header.scrolled .notice {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--indigo));
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(31, 48, 98, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(31, 48, 98, 0.34);
}

.back-to-top > span {
  font-size: 19px;
  line-height: 1;
}

.back-to-top small {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header .notice,
  .back-to-top {
    transition: none;
  }
}
