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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: white;
  touch-action: none;
  cursor: pointer;
}

/* サムネイル */
#thumb {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  transition: filter 0.6s ease;
  z-index: 10;
}

/* 動画 */
#mv-video {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 10;
}

/* ===== SVGプログレス枠線 ===== */
#progress-svg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow: visible;
  /* filter: blur をここでは指定しない */
}

#progress-svg.show {
  opacity: 1;
}

#progress-rect {
  fill: none;
  stroke-linecap: round;
}

/* ===== フラッシュ演出 ===== */
#flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255,255,255,1)   0%,
    rgba(220,235,255,0.8) 40%,
    rgba(180,210,255,0.3) 70%,
    rgba(255,255,255,0)   100%
  );
}

/* クラスを付けたときだけアニメーション発火 */
#flash-overlay.active {
  animation: flashAnim 1.2s ease-out forwards;
}

@keyframes flashAnim {
  0%   { opacity: 0; transform: scale(0.5); }
  15%  { opacity: 1; transform: scale(1);   }
  100% { opacity: 0; transform: scale(1.8); }
}

/* カウント表示 */
#count-display {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(6rem, 25vw, 18rem);
  font-weight: bold;
  color: white;
  text-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  user-select: none;
}

#count-display.show {
  opacity: 1;
}

/* リセットボタン */
#reset-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  padding: 18px 36px;
  font-size: 22px;
  font-weight: bold;
  background: #666;
  color: #fff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.1s;
}
#reset-btn:hover  { background: #999; }
#reset-btn:active { transform: scale(0.95); }

/* ロゴ */
#shimada-logo {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  width: 240px;
  opacity: 0.8;
  pointer-events: none;
}