{ window.location.href = href }, 220); }, handleScroll(){ const currentY = window.scrollY; const diff = currentY - this.lastScrollY; if (currentY <= 50) { this.showHeader = true; // 最上部では必ず表示 } else if (diff > 5) { this.showHeader = false; // 下スクロール(5px以上の感度) } else if (diff < -20) { this.showHeader = true; // 上スクロール(20px以上戻った時だけ出す) } this.lastScrollY = currentY; } }" x-init="window.addEventListen

