/* 与主站相同的主题拉绳，交互复用 /JS/theme.js。 */
.theme-rope {
  position: fixed;
  top: 0;
  left: 18px;
  z-index: 1700;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.theme-rope__line {
  width: 3px;
  height: 42px;
  background: linear-gradient(180deg, transparent 0%, var(--muted) 20%, var(--ink) 100%);
  border-radius: 2px;
  transition: height .35s cubic-bezier(.34, 1.56, .64, 1);
}
.theme-rope__knot {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4da8d9;
  box-shadow: 0 2px 8px rgba(77, 168, 217, .3);
  transition: transform .2s ease, box-shadow .2s ease;
  z-index: 1;
}
.theme-rope:hover .theme-rope__knot {
  transform: translateX(-50%) scale(1.2);
  box-shadow: 0 3px 12px rgba(77, 168, 217, .45);
}
.theme-rope.is-pulling { cursor: grabbing; }
.theme-rope.is-pulling .theme-rope__knot { transform: translateX(-50%) scale(1.15); }
.theme-rope.is-bouncing .theme-rope__line { animation: rope-bounce .5s cubic-bezier(.34, 1.56, .64, 1) forwards; }
.theme-rope.is-bouncing .theme-rope__knot { animation: knot-bounce .5s cubic-bezier(.34, 1.56, .64, 1) forwards; }
@keyframes rope-bounce {
  0% { height: 54px; }
  40% { height: 36px; }
  70% { height: 46px; }
  100% { height: 42px; }
}
@keyframes knot-bounce {
  0% { top: 46px; }
  40% { top: 28px; }
  70% { top: 38px; }
  100% { top: 34px; }
}
:root[data-theme="dark"] .theme-rope__knot {
  background: #8a5cf5;
  box-shadow: 0 2px 8px rgba(138, 92, 245, .3);
}
:root[data-theme="dark"] .theme-rope:hover .theme-rope__knot { box-shadow: 0 3px 12px rgba(138, 92, 245, .45); }
@media (prefers-reduced-motion: reduce) {
  .theme-rope__line, .theme-rope__knot { transition: none; }
  .theme-rope.is-bouncing .theme-rope__line, .theme-rope.is-bouncing .theme-rope__knot { animation: none; }
}
