.floating-rail,
.line-qr-float {
  display: none;
}
@media (min-width: 1200px) {
  .floating-rail {
    position: fixed;
    right: 14px;
    top: 67%;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    transform: translateY(-43%);
  }
  .rail-line,
  .rail-nav a,
  .rail-top {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    text-decoration: none;
    transition:
      transform 0.2s ease,
      color 0.2s ease,
      background 0.2s ease,
      box-shadow 0.2s ease;
  }
  .rail-line::after,
  .rail-nav a::after,
  .rail-top::after {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 11px);
    top: 50%;
    min-width: max-content;
    padding: 7px 11px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    color: #fff;
    background: rgba(16, 36, 62, 0.96);
    box-shadow: 0 12px 28px rgba(16, 36, 62, 0.2);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translate(9px, -50%);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }
  .rail-line:hover::after,
  .rail-line:focus-visible::after,
  .rail-nav a:hover::after,
  .rail-nav a:focus-visible::after,
  .rail-top:hover::after,
  .rail-top:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
  }
  .rail-line {
    color: #fff;
    background: linear-gradient(145deg, #12bc55, #06983d);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 28px rgba(6, 199, 85, 0.28);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.03em;
  }
  .rail-line:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 32px rgba(6, 199, 85, 0.38);
  }
  .rail-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 30px;
    background: linear-gradient(
      180deg,
      rgba(23, 50, 77, 0.98),
      rgba(16, 36, 62, 0.98)
    );
    box-shadow: 0 20px 42px rgba(16, 36, 62, 0.28);
  }
  .rail-nav a {
    width: 42px;
    height: 42px;
    color: #245fc8;
    background: linear-gradient(145deg, #fffdf8, #fff1c7);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 5px 14px rgba(3, 16, 31, 0.15);
  }
  .rail-nav a:hover,
  .rail-nav a.is-active {
    color: #fff;
    background: linear-gradient(145deg, #3a7bf2, #2458bd);
    transform: translateX(-2px);
    box-shadow: 0 8px 18px rgba(47, 111, 237, 0.34);
  }
  .rail-nav .ui-icon {
    width: 20px;
    height: 20px;
  }
  .rail-top {
    color: var(--gold);
    background: linear-gradient(145deg, #1f4d80, #10243e);
    border: 1px solid rgba(245, 158, 11, 0.38);
    box-shadow: 0 10px 24px rgba(16, 36, 62, 0.28);
    font-size: 1.25rem;
    font-weight: 900;
  }
  .rail-top:hover {
    transform: translateY(-2px);
  }
  .rail-top[hidden] {
    display: none;
  }
  .line-qr-float {
    position: fixed;
    left: 14px;
    bottom: 22px;
    z-index: 78;
    display: block;
  }
  .line-qr-float a {
    display: block;
    width: 124px;
    padding: 9px;
    border: 1px solid rgba(6, 199, 85, 0.34);
    border-radius: 16px;
    color: inherit;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 42px rgba(16, 36, 62, 0.18);
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }
  .line-qr-float a:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(16, 36, 62, 0.23);
  }
  .line-qr-float span {
    display: block;
    margin-bottom: 6px;
    color: #069b43;
    font-size: 0.73rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
  }
  .line-qr-float img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rail-line,
  .rail-nav a,
  .rail-top,
  .line-qr-float a,
  .rail-line::after,
  .rail-nav a::after,
  .rail-top::after {
    transition: none;
  }
}
