/* Elite floating scroll-to-top button (site-wide) */
.jp-go-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 950;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 51, 64, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    0 12px 32px rgba(7, 17, 26, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(242, 169, 0, 0.28);
  color: #f2a900;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.85);
  transition:
    opacity 0.4s ease,
    visibility 0s linear 0.4s,
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jp-go-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.4s ease,
    visibility 0s linear 0s,
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.jp-go-top:hover {
  background: rgba(16, 35, 47, 0.96);
  box-shadow:
    0 16px 40px rgba(7, 17, 26, 0.6),
    0 0 0 8px rgba(242, 169, 0, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(242, 169, 0, 0.55);
}

.jp-go-top:active {
  transform: scale(0.9);
}

.jp-go-top:focus-visible {
  outline: 3px solid #f2a900;
  outline-offset: 5px;
}

.jp-go-top.is-down::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(242, 169, 0, 0.35);
  animation: jp-go-top-pulse 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes jp-go-top-pulse {
  0%   { transform: scale(0.82); opacity: 0.9; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

.jp-go-top-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.jp-go-top-track,
.jp-go-top-progress {
  fill: none;
  stroke-width: 3.2;
}

.jp-go-top-track {
  stroke: rgba(242, 169, 0, 0.16);
}

.jp-go-top-progress {
  stroke: url(#jp-go-top-grad);
  stroke-linecap: round;
  stroke-dasharray: 199.05;
  stroke-dashoffset: 199.05;
  filter: drop-shadow(0 0 4px rgba(242, 169, 0, 0.55));
  transition: stroke-dashoffset 0.1s linear;
}

.jp-go-top-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.jp-go-top-arrow {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  filter: drop-shadow(0 2px 6px rgba(242, 169, 0, 0.4));
}

.jp-go-top-arrow svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: url(#jp-go-top-grad);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jp-go-top:hover .jp-go-top-arrow {
  transform: translateY(-4px);
}

.jp-go-top.is-up .jp-go-top-arrow-down,
.jp-go-top.is-down .jp-go-top-arrow-up {
  display: none;
}

.jp-go-top-pct {
  font-family: "Noto Sans", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f2a900;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.jp-go-top.is-down .jp-go-top-pct {
  display: none;
}

.jp-go-top:hover .jp-go-top-pct {
  opacity: 1;
  transform: translateY(0);
}

.jp-go-top-tip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  white-space: nowrap;
  font-family: "Noto Sans", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f7f3eb;
  background: rgba(16, 35, 47, 0.95);
  border: 1px solid rgba(242, 169, 0, 0.4);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 0 8px 20px rgba(7, 17, 26, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  pointer-events: none;
}

.jp-go-top:hover .jp-go-top-tip,
.jp-go-top:focus-visible .jp-go-top-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}

@media (max-width: 620px) {
  .jp-go-top {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }

  .jp-go-top-arrow,
  .jp-go-top-arrow svg {
    width: 22px;
    height: 22px;
  }

  .jp-go-top-pct {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jp-go-top,
  .jp-go-top.is-visible,
  .jp-go-top-arrow,
  .jp-go-top-pct,
  .jp-go-top-tip {
    transition: none;
  }

  .jp-go-top::after,
  .jp-go-top.is-visible::after {
    animation: none;
    display: none;
  }
}

@media print {
  .jp-go-top {
    display: none !important;
  }
}