/* ===== Marble Cursor（WebGL の流体マーブル球体カーソル） =====
   Sakura Rin HP（app/globals.css）と同じ指定。marble-cursor.js と一緒に読み込む。 */

/* WebGL の初期化に成功したときだけ（html に .marble-cursor-active が付く）標準カーソルを隠す。
   マウス・トラックパッドの端末だけ。失敗時やタッチ端末は標準カーソルのまま */
@media (hover: hover) and (pointer: fine) {
  html.marble-cursor-active,
  html.marble-cursor-active * {
    cursor: none !important;
  }
}

.marble-cursor {
  position: fixed;
  top: 0;
  left: 0;
  /* ベースボックス: 実際の大きさは JS が width/height を 84px にし、transform: scale() で拡縮する */
  width: 100px;
  height: 100px;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.25s ease;
}

.marble-cursor__lens,
.marble-cursor__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}

/* シャボン玉のガラス感: 背後をわずかに反転・彩度アップして屈折させる。
   縁にいくほどマスクで効果を消し、黒い縁が出ないようにする */
.marble-cursor__lens {
  -webkit-backdrop-filter: invert(0.12) saturate(1.5) hue-rotate(8deg) brightness(1.05);
  backdrop-filter: invert(0.12) saturate(1.5) hue-rotate(8deg) brightness(1.05);
  -webkit-mask: radial-gradient(circle at center,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.85) 35%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0) 80%);
  mask: radial-gradient(circle at center,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.85) 35%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0) 80%);
}
