/* ---- reset ---- */ 

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}



#particles-js, #particles-ume {
  position: fixed; /* 画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#particles-js ,#particles-ume {
  background-color: transparent;position: relative
}
#particles-js { z-index: 2; }
#particles-ume { z-index: 3; pointer-events: none; }

/* ---- reset ---- */
body {
  margin: 0;
  font: normal 75% Arial, Helvetica, sans-serif;
}
canvas {
  display: block;
  vertical-align: bottom;
} /* ---- particles.js container ---- */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #b61924;
  background-image: url("https://pure2z.com/2026hny/bg2026-2.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  overflow: hidden; /* これが最重要。右にはみ出した馬を切り捨てる */
    touch-action: none; /* スマホの意図しないスクロールも防止 */
} /* ---- stats.js ---- */
.count-particles {
  background: #000022;
  position: absolute;
  top: 48px;
  left: 0;
  width: 80px;
  color: #13e8e9;
  font-size: 0.8em;
  text-align: left;
  text-indent: 4px;
  line-height: 14px;
  padding-bottom: 2px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
}
.js-count-particles {
  font-size: 1.1em;
}
#stats,
.count-particles {
  -webkit-user-select: none;
  margin-top: 5px;
  margin-left: 5px;
}
#stats {
  border-radius: 3px 3px 0 0;
  overflow: hidden;
}
.count-particles {
  border-radius: 0 0 3px 3px;
}

/* 馬の共通スタイル */
.haniwa-run {
    position: absolute;
    pointer-events: none; /* 馬自体を触れないようにしてタップを邪魔しない */
    transform: translate(-50%, -50%) !important; /* 座標の中心を馬の腹あたりにする */
    width: 150px; /* サイズは適宜調整 */
    z-index: 100;
    transform: translate(-50%, -50%) !important; 
}

/* 正面顔：下からヌッと出る */
.haniwa-front {
    position: absolute;
    bottom: -13%; /* 最初は隠しておく */
    left: 40%;
    transform: translateX(-50%);
    /*width: 40vw !important;*/
  height: 60vh !important;
    z-index: 101;
    transition: bottom 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* バウンドする動き */
}
.haniwa-front.is-active {
    bottom: 0;
}

/* メッセージ：上から叩きつけられるスタンプ */
.message-stamp {
    position: absolute;
    transform: translate(-50%, -50%) scale(1); 
    top: 48%; /* 馬の顔の上あたり */
    left: 60%;
    transform: translate(-50%, -50%) scale(1) !important;
    
    opacity: 0;
    width: 60vw; /* height指定よりwidth指定の方がレスポンシブで安定します */
    height: auto;
    z-index: 102;
    animation: stamp-drop 0.3s forwards ease-in;
    
    /* 右側へのはみ出しを物理的に隠す保険 */
    max-width: 100%;
}

@keyframes stamp-drop {
    0% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
    80% {transform: translate(-50%, -50%) scale(1);opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; } /* わずかに跳ね返る */
}

